[gnue] r9792 - trunk/gnue-reports/packaging/win32

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: johannes
Date: 2007-10-02 08:57:46 -0500 (Tue, 02 Oct 2007)
New Revision: 9792

Modified:
   trunk/gnue-reports/packaging/win32/setup.cmd
   trunk/gnue-reports/packaging/win32/setup.py
Log:
More work on packaging for win32


Modified: trunk/gnue-reports/packaging/win32/setup.cmd
===================================================================
--- trunk/gnue-reports/packaging/win32/setup.cmd	2007-10-02 12:18:39 UTC (rev 9791)
+++ trunk/gnue-reports/packaging/win32/setup.cmd	2007-10-02 13:57:46 UTC (rev 9792)
@@ -17,6 +17,7 @@
 )
 MKDIR %GNUE_PATH%
 MKDIR %GNUE_PATH%\Scripts
+MKDIR %GNUE_PATH%\etc
 
 COPY setup.py %GNUE_PATH%\Scripts
 COPY gnue-reports.iss %GNUE_PATH%\Scripts

Modified: trunk/gnue-reports/packaging/win32/setup.py
===================================================================
--- trunk/gnue-reports/packaging/win32/setup.py	2007-10-02 12:18:39 UTC (rev 9791)
+++ trunk/gnue-reports/packaging/win32/setup.py	2007-10-02 13:57:46 UTC (rev 9792)
@@ -102,8 +102,9 @@
     """
 
     setup( \
-        windows = [{"script": "gnue-reports",
-                    "other_resources": [(RT_MANIFEST, 1, manifest)]}],
+        console = [{"script": "gnue-reports",
+                    "other_resources": [(RT_MANIFEST, 1, manifest)]},
+                   {"script": "gnue-reports-server"}],
         options = {"py2exe":
             {"dll_excludes": ["msvcp60.dll",
                               "tcl84.dll",
@@ -125,12 +126,15 @@
     """
 
     for name in CFG_FILES:
-        fhd = open(os.path.join(GNUE_PATH, 'etc', 'sample.%s' % name))
+        fhd = open(os.path.join(GNUE_PATH, 'share', 'doc', 'gnue-reports',
+            'sample.%s' % name))
         data = [line.strip() for line in fhd.readlines()]
-        out = open(os.path.join(GNUE_PATH, 'etc', name), 'wb')
-        for line in data:
-            out.write('%s%s' % (line, os.linesep))
-        out.close()
+        dest = os.path.join(GNUE_PATH, 'etc', name)
+        if not os.path.exists(dest):
+            out = open(dest, 'wb')
+            for line in data:
+                out.write('%s%s' % (line, os.linesep))
+            out.close()
         fhd.close()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.