Skip to content

Commit b727e92

Browse files
committed
feat: update Velopack to .NET 9.0 and optimize build dependencies and runtime checks
1 parent 686d278 commit b727e92

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/stable-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Velopack Pack
8080
run: |
81-
& "$HOME\.dotnet\tools\vpk.exe" pack --packId Hammer5Tools --packVersion ${{ steps.version.outputs.app_version }} --packDir Hammer5Tools --mainExe Hammer5Tools.exe --icon src/appicon.ico --channel stable --noPortable --releaseNotes release_notes.md
81+
& "$HOME\.dotnet\tools\vpk.exe" pack --packId Hammer5Tools --packVersion ${{ steps.version.outputs.app_version }} --packDir Hammer5Tools --mainExe Hammer5Tools.exe --icon src/appicon.ico --channel stable --noPortable --releaseNotes release_notes.md --framework net9.0-x64-desktop
8282
8383
- name: Velopack Upload
8484
run: |

makefile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def build_cpp(project: str, src_dir: str, output_name: str) -> None:
152152
raise
153153

154154

155-
def build_app_pyinstaller(fast=False) -> None:
155+
def build_app_pyinstaller(fast=False, channel='stable') -> None:
156156
"""Builds the Python application using PyInstaller."""
157157
# Try to locate pre-generated pycparser tables; generate them if absent.
158158
tables = find_pycparser_tables()
@@ -200,7 +200,7 @@ def build_app_pyinstaller(fast=False) -> None:
200200
'--exclude-module=pandas',
201201
'--exclude-module=tabulate',
202202
external,
203-
*[f'--add-binary=src{os.sep}external{os.sep}{dll};external{os.sep}{dll}' for dll, _ in dotnet_dlls],
203+
*( [f'--add-binary=src{os.sep}external{os.sep}{dll};external{os.sep}{dll}' for dll, _ in dotnet_dlls] if channel == 'stable' else [] ),
204204
'src/main.py'
205205
]
206206

@@ -217,7 +217,7 @@ def build_app_pyinstaller(fast=False) -> None:
217217

218218
def build_hammer5_tools(fast=False, channel='stable') -> None:
219219
# Phase 0: cleanup moved to main() for thread safety
220-
build_app_pyinstaller(fast=fast)
220+
build_app_pyinstaller(fast=fast, channel=channel)
221221

222222
# Final distribution folder
223223
bundle_root = os.path.join(cur_dir, 'Hammer5Tools')

src/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ def allocate_console():
160160
app = QApplication(sys.argv)
161161
app.setStyleSheet(QT_Stylesheet_global)
162162

163-
# Check .NET runtime
164-
check_dotnet_runtime()
163+
# Check .NET runtime if libraries are present
164+
from src.dotnet import DotNetPaths
165+
if DotNetPaths().vrf.exists():
166+
check_dotnet_runtime()
165167

166168
# Create main window
167169
widget = Widget(dev_mode=args.dev)

0 commit comments

Comments
 (0)