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))
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.