77 print(" -i dir temporary install prefix") |
78 print(" -i dir temporary install prefix") |
78 print(" (default: {0})".format(distDir)) |
79 print(" (default: {0})".format(distDir)) |
79 print(" -x don't perform dependency checks (use on your own risk)") |
80 print(" -x don't perform dependency checks (use on your own risk)") |
80 print(" -c don't cleanup old installation first") |
81 print(" -c don't cleanup old installation first") |
81 print(" -z don't compile the installed python files") |
82 print(" -z don't compile the installed python files") |
|
83 print(" -s don't use the 'start' variant of the Windows batch script") |
82 print() |
84 print() |
83 print("The file given to the -f option must be valid Python code defining a") |
85 print("The file given to the -f option must be valid Python code defining a") |
84 print("dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir', 'ericIconDir',") |
86 print("dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir', 'ericIconDir',") |
85 print("'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericDocDir', 'ericExamplesDir',") |
87 print("'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericDocDir', 'ericExamplesDir',") |
86 print("'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',") |
88 print("'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',") |
160 @param wfile the basename of the wrapper |
162 @param wfile the basename of the wrapper |
161 @param isGuiScript flag indicating a wrapper script for a GUI |
163 @param isGuiScript flag indicating a wrapper script for a GUI |
162 application (boolean) |
164 application (boolean) |
163 @return the platform specific name of the wrapper |
165 @return the platform specific name of the wrapper |
164 """ |
166 """ |
|
167 global useStart |
|
168 |
165 # all kinds of Windows systems |
169 # all kinds of Windows systems |
166 if sys.platform.startswith("win"): |
170 if sys.platform.startswith("win"): |
167 wname = wfile + ".bat" |
171 wname = wfile + ".bat" |
168 if isGuiScript: |
172 if isGuiScript: |
|
173 if useStart: |
|
174 start = "start " |
|
175 else: |
|
176 start = "" |
169 wrapper = \ |
177 wrapper = \ |
170 '''@echo off\r\n''' \ |
178 '''@echo off\r\n''' \ |
171 '''set PYDIR=%~dp0\r\n''' \ |
179 '''set PYDIR=%~dp0\r\n''' \ |
172 '''start "%PYDIR%\\pythonw.exe"''' \ |
180 '''{0}"%PYDIR%\\pythonw.exe"''' \ |
173 ''' "%PYDIR%\\Lib\\site-packages\\eric5\\{0}.pyw"''' \ |
181 ''' "%PYDIR%\\Lib\\site-packages\\eric5\\{1}.pyw"''' \ |
174 ''' %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n'''.format(wfile) |
182 ''' %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n'''.format( |
|
183 start, wfile) |
175 else: |
184 else: |
176 wrapper = \ |
185 wrapper = \ |
177 '''@"{0}\\python" "{1}\\{2}.py"''' \ |
186 '''@"{0}\\python" "{1}\\{2}.py"''' \ |
178 ''' %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n'''.format( |
187 ''' %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n'''.format( |
179 platBinDir, pydir, wfile) |
188 platBinDir, pydir, wfile) |
180 |
189 |
181 # Mac OS X |
190 # Mac OS X |
182 elif sys.platform == "darwin": |
191 elif sys.platform == "darwin": |
183 wname = wfile |
192 wname = wfile |
184 wrapper = \ |
193 wrapper = \ |
786 """ |
795 """ |
787 import getopt |
796 import getopt |
788 |
797 |
789 # Parse the command line. |
798 # Parse the command line. |
790 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |
799 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |
791 global sourceDir, configName |
800 global sourceDir, configName, useStart |
792 |
801 |
793 progName = os.path.basename(argv[0]) |
802 progName = os.path.basename(argv[0]) |
794 |
803 |
795 initGlobals() |
804 initGlobals() |
796 |
805 |
830 print("The configuration dictionary in '{0}' is incorrect. Aborting"\ |
839 print("The configuration dictionary in '{0}' is incorrect. Aborting"\ |
831 .format(arg)) |
840 .format(arg)) |
832 exit(6) |
841 exit(6) |
833 except: |
842 except: |
834 cfg = {} |
843 cfg = {} |
|
844 elif opt == "-s": |
|
845 useStart = False |
835 |
846 |
836 installFromSource = not os.path.isdir(sourceDir) |
847 installFromSource = not os.path.isdir(sourceDir) |
837 if installFromSource: |
848 if installFromSource: |
838 sourceDir = os.path.dirname(__file__) or "." |
849 sourceDir = os.path.dirname(__file__) or "." |
839 configName = os.path.join(sourceDir, "eric5config.py") |
850 configName = os.path.join(sourceDir, "eric5config.py") |