230 wname = dname + "/" + wfile |
230 wname = dname + "/" + wfile |
231 |
231 |
232 return wname |
232 return wname |
233 |
233 |
234 |
234 |
235 def createPyWrapper(pydir, wfile, marker, isGuiScript=True): |
235 def createPyWrapper(pydir, wfile, isGuiScript=True): |
236 """ |
236 """ |
237 Create an executable wrapper for a Python script. |
237 Create an executable wrapper for a Python script. |
238 |
238 |
239 @param pydir the name of the directory where the Python script will |
239 @param pydir the name of the directory where the Python script will |
240 eventually be installed (string) |
240 eventually be installed (string) |
241 @param wfile the basename of the wrapper (string) |
241 @param wfile the basename of the wrapper (string) |
242 @param marker marker for the Python variant (string) |
|
243 @param isGuiScript flag indicating a wrapper script for a GUI |
242 @param isGuiScript flag indicating a wrapper script for a GUI |
244 application (boolean) |
243 application (boolean) |
245 @return the platform specific name of the wrapper (string) |
244 @return the platform specific name of the wrapper (string) |
246 """ |
245 """ |
|
246 global includePythonVariant |
|
247 |
|
248 if includePythonVariant: |
|
249 marker = PythonMarkers[sys.version_info.major] |
|
250 else: |
|
251 marker = "" |
|
252 |
247 # all kinds of Windows systems |
253 # all kinds of Windows systems |
248 if sys.platform.startswith("win"): |
254 if sys.platform.startswith("win"): |
249 wname = wfile + marker + ".bat" |
255 wname = wfile + marker + ".bat" |
250 if isGuiScript: |
256 if isGuiScript: |
251 wrapper = \ |
257 wrapper = \ |
524 Actually perform the installation steps. |
530 Actually perform the installation steps. |
525 |
531 |
526 @return result code (integer) |
532 @return result code (integer) |
527 """ |
533 """ |
528 global distDir, doCleanup, cfg, progLanguages, sourceDir, configName |
534 global distDir, doCleanup, cfg, progLanguages, sourceDir, configName |
529 global includePythonVariant |
|
530 |
535 |
531 # Create the platform specific wrappers. |
536 # Create the platform specific wrappers. |
532 wnames = [] |
537 wnames = [] |
533 if includePythonVariant: |
538 for name in ["eric5_api", "eric5_doc"]: |
534 marker = PythonMarkers[sys.version_info.major] |
539 wnames.append(createPyWrapper(cfg['ericDir'], name, False)) |
535 else: |
540 for name in ["eric5_compare", "eric5_configure", "eric5_diff", |
536 marker = "" |
541 "eric5_editor", "eric5_iconeditor", "eric5_plugininstall", |
537 wnames.append(createPyWrapper(cfg['ericDir'], |
542 "eric5_pluginrepository", "eric5_pluginuninstall", |
538 "eric5_api", marker, |
543 "eric5_qregexp", "eric5_qregularexpression", "eric5_re", |
539 False)) |
544 "eric5_snap", "eric5_sqlbrowser", "eric5_tray", |
540 wnames.append(createPyWrapper(cfg['ericDir'], |
545 "eric5_trpreviewer", "eric5_uipreviewer", "eric5_unittest", |
541 "eric5_compare", marker)) |
546 "eric5_webbrowser", "eric5"]: |
542 wnames.append(createPyWrapper(cfg['ericDir'], |
547 wnames.append(createPyWrapper(cfg['ericDir'], name)) |
543 "eric5_configure", marker)) |
|
544 wnames.append(createPyWrapper(cfg['ericDir'], |
|
545 "eric5_diff", marker)) |
|
546 wnames.append(createPyWrapper(cfg['ericDir'], |
|
547 "eric5_doc", marker, |
|
548 False)) |
|
549 wnames.append(createPyWrapper(cfg['ericDir'], |
|
550 "eric5_editor", marker)) |
|
551 wnames.append(createPyWrapper(cfg['ericDir'], |
|
552 "eric5_iconeditor", marker)) |
|
553 wnames.append(createPyWrapper(cfg['ericDir'], |
|
554 "eric5_plugininstall", marker)) |
|
555 wnames.append(createPyWrapper(cfg['ericDir'], |
|
556 "eric5_pluginrepository", marker)) |
|
557 wnames.append(createPyWrapper(cfg['ericDir'], |
|
558 "eric5_pluginuninstall", marker)) |
|
559 wnames.append(createPyWrapper(cfg['ericDir'], |
|
560 "eric5_qregexp", marker)) |
|
561 wnames.append(createPyWrapper(cfg['ericDir'], |
|
562 "eric5_qregularexpression", marker)) |
|
563 wnames.append(createPyWrapper(cfg['ericDir'], |
|
564 "eric5_re", marker)) |
|
565 wnames.append(createPyWrapper(cfg['ericDir'], |
|
566 "eric5_snap", marker)) |
|
567 wnames.append(createPyWrapper(cfg['ericDir'], |
|
568 "eric5_sqlbrowser", marker)) |
|
569 wnames.append(createPyWrapper(cfg['ericDir'], |
|
570 "eric5_tray", marker)) |
|
571 wnames.append(createPyWrapper(cfg['ericDir'], |
|
572 "eric5_trpreviewer", marker)) |
|
573 wnames.append(createPyWrapper(cfg['ericDir'], |
|
574 "eric5_uipreviewer", marker)) |
|
575 wnames.append(createPyWrapper(cfg['ericDir'], |
|
576 "eric5_unittest", marker)) |
|
577 wnames.append(createPyWrapper(cfg['ericDir'], |
|
578 "eric5_webbrowser", marker)) |
|
579 wnames.append(createPyWrapper(cfg['ericDir'], |
|
580 "eric5", marker)) |
|
581 |
548 |
582 # set install prefix, if not None |
549 # set install prefix, if not None |
583 if distDir: |
550 if distDir: |
584 for key in list(cfg.keys()): |
551 for key in list(cfg.keys()): |
585 cfg[key] = os.path.normpath(distDir + os.sep + cfg[key]) |
552 cfg[key] = os.path.normpath(distDir + os.sep + cfg[key]) |