Skip to content

Commit b0073de

Browse files
Switch to one-directory PyInstaller build, and update application version to 2.0.3.
1 parent 76a634d commit b0073de

5 files changed

Lines changed: 38 additions & 28 deletions

File tree

BUILD.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
@echo off
33
setlocal
44

5-
set PYTHON_EXECUTABLE=.\py\python.exe
5+
set PYTHON_EXECUTABLE=.\venv\Scripts\python.exe
66

77
echo Cleaning previous build...
8-
if exist "dist\td_launcher_plus.exe" del /f "dist\td_launcher_plus.exe"
8+
if exist "dist\td_launcher_plus" rmdir /s /q "dist\td_launcher_plus"
99
if exist "build\td_launcher_plus" rmdir /s /q "build\td_launcher_plus"
1010

1111
echo Installing dependencies...
1212
%PYTHON_EXECUTABLE% -m pip install -r requirements.txt
1313

14-
%PYTHON_EXECUTABLE% .\py\Scripts\pyinstaller.exe --noconfirm --log-level=WARN ^
15-
--onefile --nowindow ^
14+
%PYTHON_EXECUTABLE% -m PyInstaller --noconfirm --log-level=WARN ^
15+
--onedir ^
1616
--windowed ^
1717
--name="td_launcher_plus" ^
1818
--icon="td_launcher_plus.ico" ^

TD Launcher Plus.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ app = BUNDLE(
7979
],
8080
'CFBundleDisplayName': 'TD Launcher Plus',
8181
'CFBundleGetInfoString': 'TD Launcher Plus - TouchDesigner Project Launcher',
82-
'CFBundleShortVersionString': '2.0.2',
83-
'CFBundleVersion': '2.0.2',
82+
'CFBundleShortVersionString': '2.0.3',
83+
'CFBundleVersion': '2.0.3',
8484
'NSHighResolutionCapable': True,
8585
'LSMinimumSystemVersion': '10.9.0'
8686
}

inno/TD_Launcher_Inno_Compiler.iss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "TD Launcher Plus"
5-
#define MyAppVersion "2.0.2"
5+
#define MyAppVersion "2.0.3"
66
#define MyAppPublisher "Dan Molnar ( Function Store )"
77
#define MyAppURL "https://www.functionstore.xyz/link-in-bio"
88
#define MyAppExeName "td_launcher_plus.exe"
@@ -39,10 +39,11 @@ WizardStyle=modern
3939
Name: "english"; MessagesFile: "compiler:Default.isl"
4040

4141
[Tasks]
42-
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
42+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
4343

4444
[Files]
45-
Source: "..\dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
45+
Source: "..\dist\td_launcher_plus\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
46+
Source: "..\dist\td_launcher_plus\_internal\*"; DestDir: "{app}\_internal"; Flags: ignoreversion recursesubdirs createallsubdirs
4647
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
4748

4849
[Registry]

td_launcher.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434
# Version
35-
APP_VERSION = "2.0.2"
35+
APP_VERSION = "2.0.3"
3636

3737
# Sentinel for the "Default" template entry (launch TD without a file)
3838
DEFAULT_TEMPLATE = "__default__"
@@ -2052,12 +2052,21 @@ def _on_key_press(self, sender, app_data):
20522052
self._move_picker_selection(1)
20532053
return
20542054

2055-
# Enter - launch
2056-
if key_code in (
2057-
getattr(dpg, 'mvKey_Enter', None),
2055+
# Enter - launch (use Windows API fallback for packaged builds)
2056+
_enter_codes = (
20582057
getattr(dpg, 'mvKey_Return', None),
2059-
getattr(dpg, 'mvKey_KeyPadEnter', None),
2060-
):
2058+
getattr(dpg, 'mvKey_NumPadEnter', None),
2059+
257, # GLFW_KEY_ENTER
2060+
335, # GLFW_KEY_KP_ENTER
2061+
)
2062+
enter_pressed = key_code in _enter_codes
2063+
if not enter_pressed and platform.system() == 'Windows':
2064+
try:
2065+
# VK_RETURN = 0x0D covers both Enter and NumPad Enter
2066+
enter_pressed = bool(ctypes.windll.user32.GetAsyncKeyState(0x0D) & 0x8000)
2067+
except Exception:
2068+
pass
2069+
if enter_pressed:
20612070
if self.selected_file:
20622071
self._on_launch(sender, app_data)
20632072
return

td_launcher_plus.spec

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# -*- mode: python ; coding: utf-8 -*-
22

33

4-
block_cipher = None
5-
6-
74
a = Analysis(
85
['td_launcher.py'],
96
pathex=[],
@@ -14,32 +11,35 @@ a = Analysis(
1411
hooksconfig={},
1512
runtime_hooks=[],
1613
excludes=[],
17-
win_no_prefer_redirects=False,
18-
win_private_assemblies=False,
19-
cipher=block_cipher,
2014
noarchive=False,
15+
optimize=0,
2116
)
22-
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
17+
pyz = PYZ(a.pure)
2318

2419
exe = EXE(
2520
pyz,
2621
a.scripts,
27-
a.binaries,
28-
a.zipfiles,
29-
a.datas,
3022
[],
23+
exclude_binaries=True,
3124
name='td_launcher_plus',
3225
debug=False,
3326
bootloader_ignore_signals=False,
3427
strip=False,
3528
upx=True,
36-
upx_exclude=[],
37-
runtime_tmpdir=None,
3829
console=False,
3930
disable_windowed_traceback=False,
4031
argv_emulation=False,
4132
target_arch=None,
4233
codesign_identity=None,
4334
entitlements_file=None,
44-
icon='td_launcher_plus.ico',
35+
icon=['td_launcher_plus.ico'],
36+
)
37+
coll = COLLECT(
38+
exe,
39+
a.binaries,
40+
a.datas,
41+
strip=False,
42+
upx=True,
43+
upx_exclude=[],
44+
name='td_launcher_plus',
4545
)

0 commit comments

Comments
 (0)