Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,17 @@ def updateExecutableIcon(executablePath, iconPath):
win32api.EndUpdateResource(handle, False)


def build_shimmy_launcher(launcher_name, command, icon_path, mkshim_program='mkshim400.py'):
"""Build .exe launcher with mkshim400.py and pywin32"""
def build_shimmy_launcher(launcher_name, command, icon_path, mkshim_program='mkshim400.py', workdir=''):
"""Build .exe launcher with mkshim_program and pywin32"""

# define where is mkshim
mkshim_program = str(Path(__file__).resolve().parent / mkshim_program)
python_program = utils.get_python_executable()

# Create the executable using mkshim.py or mkshim240.py
mkshim_command = f'{python_program} "{mkshim_program}" -f "{launcher_name}" -c "{command}"'
if workdir !='': # V03 of shim: we can handle an optional sub-directory
mkshim_command += f' --subdir "{workdir}"'
print(f"Building .exe launcher with {mkshim_program}:", mkshim_command)
subprocess.run(mkshim_command, shell=True)

Expand Down Expand Up @@ -590,7 +592,7 @@ def create_launcher_shimmy(
icon,
command=None,
args=None,
workdir=r"", # not used, use $env:WINPYDIRICONS variable in command line
workdir=r"", # ".\script" to go to sub-directory of the icon
mkshim_program="mkshim400.py", # to force another one
):
"""Create an exe launcher with mkshim.py"""
Expand All @@ -608,7 +610,7 @@ def create_launcher_shimmy(
command = "${WINPYDIR}\python.exe" #not used
iconlauncherfullname= str(Path(self.winpydir) / name)
true_command = command.replace(r"$SYSDIR\cmd.exe","cmd.exe")+ " " + args
build_shimmy_launcher(iconlauncherfullname, true_command, icon_fname, mkshim_program=mkshim_program)
build_shimmy_launcher(iconlauncherfullname, true_command, icon_fname, mkshim_program=mkshim_program, workdir=workdir)

def create_launcher(
self,
Expand Down Expand Up @@ -823,7 +825,7 @@ def _create_launchers(self):
"cmd.ico",
command=".\\cmd.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

self.create_launcher_shimmy(
Expand All @@ -847,7 +849,7 @@ def _create_launchers(self):
"python.ico",
command=".\\winpython.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

self.create_launcher_shimmy(
Expand Down Expand Up @@ -879,7 +881,7 @@ def _create_launchers(self):
"winpython.ico",
command=".\\wpcp.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

# Jupyter launchers
Expand All @@ -890,7 +892,7 @@ def _create_launchers(self):
"jupyter.ico",
command="winipython_notebook.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

self.create_launcher_shimmy(
Expand All @@ -900,15 +902,15 @@ def _create_launchers(self):
#args=r"/k winjupyter_lab.bat",
command="winjupyter_lab.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

self.create_launcher_shimmy(
"VS Code.exe",
"code.ico",
command="winvscode.bat",
args=r"",
mkshim_program="mkshim400s.py",
workdir=r".\scripts"
)

self._print_done()
Expand Down
40 changes: 0 additions & 40 deletions mkshim.py

This file was deleted.

48 changes: 0 additions & 48 deletions mkshim240.py

This file was deleted.

36 changes: 28 additions & 8 deletions mkshim400.py

Large diffs are not rendered by default.

64 changes: 0 additions & 64 deletions mkshim400s.py

This file was deleted.

2 changes: 1 addition & 1 deletion winpython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '10.3.20240901'
__version__ = '10.4.20240904'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'