Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec14871

Browse files
author
stonebig
committed
simplify code
1 parent a06caac commit ec14871

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

make.py

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def create_batch_script(self, name, contents):
308308
fd.close()
309309

310310
def create_launcher(self, name, icon, command=None,
311-
args=None, workdir=None,
311+
args=None, workdir=r'$EXEDIR\scripts',
312312
launcher='launcher_basic.nsi'):
313313
"""Create exe launcher with NSIS"""
314314
assert name.endswith('.exe')
@@ -495,70 +495,58 @@ def _create_launchers(self):
495495
self._print("Creating launchers")
496496
self.create_launcher('WinPython Command Prompt.exe', 'cmd.ico',
497497
command='$SYSDIR\cmd.exe',
498-
args=r'/k cmd.bat',
499-
workdir='$EXEDIR\scripts')
498+
args=r'/k cmd.bat')
500499

501500
self.create_launcher('WinPython Interpreter.exe', 'python.ico',
502501
command='$SYSDIR\cmd.exe',
503-
args= r'/k python.bat',
504-
workdir='$EXEDIR\scripts')
502+
args= r'/k python.bat')
505503

506504
#self.create_launcher('IDLEX (students).exe', 'python.ico',
507505
# command='$SYSDIR\cmd.exe',
508506
# args= r'/k IDLEX_for_student.bat %*',
509507
# workdir='$EXEDIR\scripts')
510508
self.create_launcher('IDLEX (Python GUI).exe', 'python.ico',
511509
command='wscript.exe',
512-
args= r'Noshell.vbs IDLEX.bat',
513-
workdir='$EXEDIR\scripts')
510+
args= r'Noshell.vbs IDLEX.bat')
514511

515512
self.create_launcher('Spyder.exe', 'spyder.ico',
516513
command='wscript.exe',
517-
args=r'Noshell.vbs spyder.bat',
518-
workdir='$EXEDIR\Scripts')
514+
args=r'Noshell.vbs spyder.bat')
519515

520516
self.create_launcher('Spyder reset.exe', 'spyder_reset.ico',
521517
command='wscript.exe',
522-
args=r'Noshell.vbs spyder_reset.bat',
523-
workdir='$EXEDIR\Scripts')
518+
args=r'Noshell.vbs spyder_reset.bat')
524519

525520
self.create_launcher('WinPython Control Panel.exe', 'winpython.ico',
526521
command='wscript.exe',
527-
args=r'Noshell.vbs wpcp.bat',
528-
workdir='$EXEDIR\Scripts')
522+
args=r'Noshell.vbs wpcp.bat')
529523

530524
# Multi-Qt launchers (Qt5 has priority if found)
531525
self.create_launcher('Qt Demo.exe', 'qt.ico',
532526
command='wscript.exe',
533-
args=r'Noshell.vbs qtdemo.bat',
534-
workdir='$EXEDIR\Scripts')
527+
args=r'Noshell.vbs qtdemo.bat')
535528

536529
self.create_launcher('Qt Assistant.exe', 'qtassistant.ico',
537530
command='wscript.exe',
538-
args=r'Noshell.vbs qtassistant.bat',
539-
workdir='$EXEDIR\Scripts')
531+
args=r'Noshell.vbs qtassistant.bat')
540532

541533
self.create_launcher('Qt Designer.exe', 'qtdesigner.ico',
542534
command='wscript.exe',
543-
args=r'Noshell.vbs qtdesigner.bat',
544-
workdir='$EXEDIR\Scripts')
535+
args=r'Noshell.vbs qtdesigner.bat')
545536

546537
self.create_launcher('Qt Linguist.exe', 'qtlinguist.ico',
547538
command='wscript.exe',
548-
args=r'Noshell.vbs qtlinguist.bat',
549-
workdir='$EXEDIR\Scripts')
539+
args=r'Noshell.vbs qtlinguist.bat')
550540

551541
# Jupyter launchers
552542
self.create_launcher('IPython Qt Console.exe', 'ipython.ico',
553543
command='wscript.exe',
554-
args=r'Noshell.vbs qtconsole.bat',
555-
workdir='$EXEDIR\Scripts')
544+
args=r'Noshell.vbs qtconsole.bat')
556545

557546
# this one needs a shell to kill fantom processes
558547
self.create_launcher('Jupyter Notebook.exe', 'jupyter.ico',
559548
command='$SYSDIR\cmd.exe',
560-
args=r'/k ipython_notebook.bat',
561-
workdir='$EXEDIR\Scripts')
549+
args=r'/k ipython_notebook.bat')
562550

563551
self._print_done()
564552

0 commit comments

Comments
 (0)