[Mono-docs-list] mod (monodoc) without X
jluke@users.sourceforge.net
jluke@users.sourceforge.net
Sat, 23 Aug 2003 21:22:22 -0400
--=-fQiwjxh1EMLfJuf5zD1E
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello,
Someone asked in #mono if they could use monodoc without X/Gtk
installed. Since we have monodoc.dll now I made a quick change to allow
mod to work without browser.exe
Maybe a ./configure --without-X, or similar is also needed?
John
--=-fQiwjxh1EMLfJuf5zD1E
Content-Disposition: attachment; filename=mod.diff
Content-Type: text/x-patch; name=mod.diff; charset=
Content-Transfer-Encoding: 7bit
Index: mod.cs
===================================================================
RCS file: mod.cs
diff -N mod.cs
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mod.cs 24 Aug 2003 01:22:28 -0000
@@ -0,0 +1,23 @@
+// Author: John Luke <jluke@cfl.rr.com>
+
+using System;
+using Monodoc;
+
+namespace Monodoc
+{
+ public class Mod
+ {
+ static void Main (string[] args)
+ {
+ if (args.Length != 1)
+ {
+ Console.WriteLine ("Usage: mod.exe Url");
+ return;
+ }
+
+ RootTree help_tree = RootTree.LoadTree ();
+ Node n;
+ Console.WriteLine (help_tree.RenderUrl (args[0], out n));
+ }
+ }
+}
Index: Makefile.am
===================================================================
RCS file: /cvs/public/monodoc/browser/Makefile.am,v
retrieving revision 1.28
diff -u -r1.28 Makefile.am
--- Makefile.am 14 Aug 2003 07:14:31 -0000 1.28
+++ Makefile.am 24 Aug 2003 01:22:28 -0000
@@ -1,8 +1,8 @@
monodocdir = $(libdir)/monodoc
assemblydir = $(libdir)
-monodoc_DATA = browser.exe assembler.exe normalize.exe monodoc.xml
+monodoc_DATA = browser.exe assembler.exe normalize.exe monodoc.xml mod.exe
assembly_DATA = monodoc.dll Mono.Website.Handlers.Monodoc.dll monodoc.config
-CLEANFILES = monodoc.dll assembler.exe browser.exe normalize.exe Mono.Website.Handlers.Monodoc.dll
+CLEANFILES = monodoc.dll assembler.exe browser.exe normalize.exe Mono.Website.Handlers.Monodoc.dll mod.exe
CSC=mcs
@@ -41,6 +41,9 @@
b: browser.exe
mono --debug browser.exe
+mod.exe:
+ mcs mod.cs -r monodoc.dll
+
dist-hook:
mkdir $(distdir)/web
mkdir $(distdir)/web/xtree
@@ -52,4 +55,4 @@
cp $(srcdir)/web/xtree/images/xp/*png $(distdir)/web/xtree/images/xp
cp $(srcdir)/web/xtree/images/*png $(distdir)/web/xtree/images
cp $(srcdir)/web/xtree/*js $(distdir)/web/xtree
- cp $(srcdir)/web/xtree/*css $(distdir)/web/xtree
\ No newline at end of file
+ cp $(srcdir)/web/xtree/*css $(distdir)/web/xtree
--=-fQiwjxh1EMLfJuf5zD1E
Content-Disposition: attachment; filename=monodoc.in.diff
Content-Type: text/x-patch; name=monodoc.in.diff; charset=
Content-Transfer-Encoding: 7bit
Index: monodoc.in
===================================================================
RCS file: /cvs/public/monodoc/monodoc.in,v
retrieving revision 1.6
diff -u -r1.6 monodoc.in
--- monodoc.in 6 Aug 2003 05:29:35 -0000 1.6
+++ monodoc.in 24 Aug 2003 01:13:33 -0000
@@ -25,7 +25,7 @@
export MONO_MANAGED_XSLT=true
if test `basename $0` = mod; then
- (cd @monodocdir@; mono --debug browser.exe --html $1 | lynx -dump -stdin -force_html | ${PAGER:-more})
+ (cd @monodocdir@; mono --debug mod.exe $1 | lynx -dump -stdin -force_html | ${PAGER:-more})
else
(cd @monodocdir@; mono --debug browser.exe $OPTIONS $* $REST)
fi
--=-fQiwjxh1EMLfJuf5zD1E--