|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | # |
3 | 3 | # Copyright © 2012 Pierre Raybaut |
| 4 | +# Copyright © 2014-2024+ The Winpython development team https://github.com/winpython/ |
4 | 5 | # Licensed under the terms of the MIT License |
5 | 6 | # (see winpython/__init__.py for details) |
6 | 7 |
|
@@ -60,23 +61,6 @@ def get_nsis_exe(): |
60 | 61 | raise RuntimeError("NSIS is not installed on this computer.") |
61 | 62 |
|
62 | 63 |
|
63 | | -def get_iscc_exe(): |
64 | | - """Return ISCC executable""" |
65 | | - localdir = str(Path(sys.prefix).parent.parent) |
66 | | - for drive in get_drives(): |
67 | | - for dirname in ( |
68 | | - r"C:\Program Files", |
69 | | - r"C:\Program Files (x86)", |
70 | | - str(Path(localdir) / "Inno Setup 5"), |
71 | | - ): |
72 | | - for subdirname in (".", "App"): |
73 | | - exe = str(Path(dirname) / subdirname / "Inno Setup 5" / "iscc.exe") |
74 | | - if Path(exe).is_file(): |
75 | | - return exe |
76 | | - else: |
77 | | - raise RuntimeError("Inno Setup 5 is not installed on this computer.") |
78 | | - |
79 | | - |
80 | 64 | def get_7zip_exe(): |
81 | 65 | """Return 7zip executable""" |
82 | 66 | localdir = str(Path(sys.prefix).parent.parent) |
@@ -204,30 +188,6 @@ def build_shimmy_launcher(launcher_name, command, icon_path, mkshim_program='mks |
204 | 188 | subprocess.run(mkshim_command, shell=True) |
205 | 189 |
|
206 | 190 |
|
207 | | -def build_iss(srcname, dstname, data): |
208 | | - """Build Inno Setup Script""" |
209 | | - ISCC_EXE = get_iscc_exe() # Inno Setup Compiler (iscc.exe) |
210 | | - portable_dir = str(Path(__file__).resolve().parent / "portable") |
211 | | - shutil.copy(str(Path(portable_dir) / srcname), dstname) |
212 | | - data = [("PORTABLE_DIR", portable_dir)] + list(data) |
213 | | - replace_in_iss_file(dstname, data) |
214 | | - try: |
215 | | - retcode = subprocess.call( |
216 | | - f'"{ISCC_EXE}" "{dstname}"', |
217 | | - shell=True, |
218 | | - stdout=sys.stderr, |
219 | | - ) |
220 | | - if retcode < 0: |
221 | | - print( |
222 | | - "Child was terminated by signal", |
223 | | - -retcode, |
224 | | - file=sys.stderr, |
225 | | - ) |
226 | | - except OSError as e: |
227 | | - print("Execution failed:", e, file=sys.stderr) |
228 | | - # os.remove(dstname) |
229 | | - |
230 | | - |
231 | 191 | def build_7zip(srcname, dstname, data): |
232 | 192 | """7-Zip Setup Script""" |
233 | 193 | SEVENZIP_EXE = get_7zip_exe() |
|
0 commit comments