Hi Jerry

On 29/05/10 10:29, Jerry Jacobs wrote:
Dear all,

I spend some time to get the first steps to let it work on Micro$oft
Windowze.
Creating monolitic executable so you dont need python installed! And a
nice NSIS installer. If you want to build it yourself see the
PACKAGING.txt inside the sourcecode.

http://code.google.com/p/asciidoc-win32/downloads

and my (hackish) clone
hope Stuart can integrate this into the Asciidoc release so this is
not a fork anymore.
The files I needed to add for windows packaging won't brake
compatibilty for *NIX but only the changed values (just do a diff on
the a2x and asciidoc file). I also enhanced the latex.conf and added
the man.conf from powerman to be able to generate Plan 9 manual pages.

http://code.google.com/r/xorgateengineering-win32

Have fun,
Jerry Jacobs


This is great, I'll put link to http://code.google.com/p/asciidoc-win32/ in the AsciiDoc Resources list (http://www.methods.co.nz/asciidoc/index.html#X2).

I'm guessing that this is you also?
http://www.xor-gate.org/writings/software/asciidoc

I downloaded your asciidoc-8.5.3-win32-src.zip source and diff'ed a2x.py and asciidoc.py against 2.5.3 (diffs attached) but I seem to be missing something -- where are PDFLATEX, PDFLATEX_OPTS defined?

Could you explain the why you would use the man.conf file, examples? I tried to use it against the AsciiDoc man page source ./doc/asciidoc.1.txt but got the following errors:

$ asciidoc -bman doc/asciidoc.1.txt
asciidoc: WARNING: missing special word macro: [monospacedwords]
asciidoc: WARNING: missing special word macro: [monospacedwords]
asciidoc: WARNING: missing template section: [mpl-block]
asciidoc: WARNING: missing template section: [mpl-block]
asciidoc: FAILED: [tabledef-default] missing section: [tabletags-header]


Thanks for the good work and apologies for taking so long to reply.


Cheers, Stuart

--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

--- asciidoc-8.5.3/latex.conf	2009-06-09 14:05:43.000000000 +1200
+++ asciidoc-8.5.3-win32-src/latex.conf	2010-05-29 00:04:06.000000000 +1200
@@ -445,6 +445,7 @@
 
 # Tables.
 # FIXME: no lines!
+[tabletags-header]
 
 [tabletags-monospaced]
 
@@ -568,6 +569,8 @@
 
 \end\{abstract\}
 
+[abstractblock]
+
 [dedication]
 \label\{{id}\}\hypertarget\{{id}\}\{\}
 \dedication\{

--- asciidoc-8.5.3/a2x.py	2010-01-17 17:45:54.000000000 +1300
+++ asciidoc-8.5.3-win32-src/a2x.py	2010-05-29 00:04:04.000000000 +1200
@@ -3,7 +3,7 @@
 a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other
       file formats)
 
-Copyright: Stuart Rackham (c) 2009
+Copyright: Stuart Rackham (c) 2010
 License:   MIT
 Email:     [email protected]
 
@@ -20,12 +20,12 @@
 import urlparse
 import zipfile
 
-PROG = os.path.basename(os.path.splitext(__file__)[0])
-VERSION = '8.5.2'
+PROG = "a2x"
+VERSION = '8.5.3'
 
 # AsciiDoc global configuration file directory.
 # NOTE: CONF_DIR is "fixed up" by Makefile -- don't rename or change syntax.
-CONF_DIR = '/etc/asciidoc'
+CONF_DIR = 'C:\Program Files\Asciidoc'
 
 
 ######################################################################
@@ -300,6 +300,7 @@
         # Append configuration file options.
         self.asciidoc_opts += ' ' + ASCIIDOC_OPTS
         self.dblatex_opts  += ' ' + DBLATEX_OPTS
+        self.pdflatex_opts  += ' ' + PDFLATEX_OPTS
         self.fop_opts      += ' ' + FOP_OPTS
         self.xsltproc_opts += ' ' + XSLTPROC_OPTS
         # Execute to_* functions.
@@ -514,7 +515,7 @@
         if self.fop:
             self.exec_fop()
         else:
-            self.exec_dblatex()
+            self.exec_pdflatex()
 
     def exec_fop(self):
         self.to_docbook()
@@ -536,6 +537,10 @@
         shell('"%s" -t %s -p "%s" -s "%s" %s "%s"' %
              (DBLATEX, self.format, xsl, sty, self.dblatex_opts, docbook_file))
 
+    def exec_pdflatex(self):
+	shell('%s %s' %
+	     (PDFLATEX, latex_file))
+
     def to_dvi(self):
         self.exec_dblatex()
 

--- asciidoc-8.5.3/asciidoc.py	2010-01-17 17:22:16.000000000 +1300
+++ asciidoc-8.5.3-win32-src/asciidoc.py	2010-05-29 00:04:04.000000000 +1200
@@ -144,7 +144,7 @@
     """
     Message functions.
     """
-    PROG = os.path.basename(os.path.splitext(__file__)[0])
+    PROG = 'asciidoc'
 
     def __init__(self):
         self.linenos = None     # Used to globally override line numbers.
@@ -5119,11 +5119,11 @@
 #---------------------------------------------------------------------------
 # Constants
 # ---------
-APP_FILE = None             # This file's full path.
-APP_DIR = None              # This file's directory.
+APP_FILE = 'C:\Program Files\Asciidoc\\asciidoc.exe'             # This file's full path.
+APP_DIR = 'C:\Program Files\Asciidoc'              # This file's directory.
 USER_DIR = None             # ~/.asciidoc
 # Global configuration files directory (set by Makefile build target).
-CONF_DIR = '/etc/asciidoc'
+CONF_DIR = 'C:\Program Files\Asciidoc'
 HELP_FILE = 'help.conf'     # Default (English) help file.
 
 # Globals
@@ -5303,12 +5303,12 @@
         sys.exit(1)
     if not os.path.exists(cmd):
         message.stderr('FAILED: Missing asciidoc command: %s' % cmd)
-        sys.exit(1)
+        #sys.exit(1)
     # Locate the executable and configuration files directory.
     global APP_FILE
-    APP_FILE = os.path.realpath(cmd)
+    #APP_FILE = os.path.realpath(cmd)
     global APP_DIR
-    APP_DIR = os.path.dirname(APP_FILE)
+    #APP_DIR = os.path.dirname(APP_FILE)
     global USER_DIR
     USER_DIR = os.environ.get('HOME')
     if USER_DIR is not None:

Reply via email to