commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9607 - trunk/gnue-common


From: johannes
Subject: [gnue] r9607 - trunk/gnue-common
Date: Wed, 23 May 2007 02:56:53 -0500 (CDT)

Author: johannes
Date: 2007-05-23 02:56:53 -0500 (Wed, 23 May 2007)
New Revision: 9607

Modified:
   trunk/gnue-common/setup.py
Log:
Derive data- and config-directory for frozen environments on win32 only.  
We're using os.path.dirname() instead of '..' now.


Modified: trunk/gnue-common/setup.py
===================================================================
--- trunk/gnue-common/setup.py  2007-05-23 07:20:48 UTC (rev 9606)
+++ trunk/gnue-common/setup.py  2007-05-23 07:56:53 UTC (rev 9607)
@@ -395,10 +395,9 @@
     output.write ("# This is a workaround for McMillan packaging!!!\n")
     output.write ("# McMillan sets sys.frozen=1 in packaged exe file.\n")
     output.write ("############################\n")
-    output.write ("if hasattr(sys, 'frozen'):\n")
-    output.write ("  data    = os.path.join(os.path.dirname (sys.argv[0]), 
'..')\n")
-    output.write ("  config  = os.path.join(os.path.dirname (sys.argv[0]),
-            '..', 'etc')\n")
+    output.write ("if hasattr(sys, 'frozen') and sys.platform == 'win32':\n")
+    output.write ("  data    = 
os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])))\n")
+    output.write ("  config  = 
os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'etc')\n")
     output.write ("else:\n")
     output.write ("  data    = \"%s\"\n" % self.__quote (self.install_data))
     output.write ("  config  = \"%s\"\n" % self.__quote (self.install_config))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]