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
54 changes: 54 additions & 0 deletions .github/workflows/generate-windows-installer-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generate Windows Installer (Debug)

on:
release:
types: [ published ]

permissions:
contents: write

jobs:
generate-windows-installer:
name: Generate Windows Installer (Debug)
runs-on: windows-latest

steps:
- name: Git Checkout ${{github.event.release.tag_name}}
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

- name: Set version number for PyInstaller
run: |
python.exe tools\windows-installer\generate-version-info.py ${{github.event.release.tag_name}} debug

- name: Run PyInstaller to create binaries
run: |
pyinstaller.exe --noconfirm turing-system-monitor-debug.spec

- name: Create InnoSetup installer from generated binaries
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
with:
path: tools/windows-installer/turing-system-monitor.iss
options: /O+

- name: '📦 Archive Windows installer'
uses: actions/upload-artifact@v4
with:
name: turing-system-monitor_${{github.event.release.tag_name}}
path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-debug.exe
if-no-files-found: error

- name: '📩 Publish Windows installer to Release'
run: |
gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}-debug.exe
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/generate-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: turing-system-monitor_${{github.event.release.tag_name}}
path: tools\windows-installer\Output\turing-system-monitor_${{github.event.release.tag_name}}.exe
path: tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe
if-no-files-found: error

- name: '📩 Publish Windows installer to Release'
run: |
gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor_${{github.event.release.tag_name}}.exe
gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor-${{github.event.release.tag_name}}.exe
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions tools/windows-installer/generate-version-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
revision = int(version[2])
build = 0 # For this project we only use 3-digit versions

if sys.argv[2] == "debug":
print (f"Generating debug version {major}.{minor}.{revision}-debug")
debug_version = True
else:
print (f"Generating version {major}.{minor}.{revision}")
debug_version = False

# Update FixedFileInfo version
info.ffi.fileVersionMS = (major << 16) + minor
info.ffi.fileVersionLS = (revision << 16) + build
Expand All @@ -49,6 +56,8 @@
for elem in info.kids[0].kids[0].kids:
if elem.name == 'ProductVersion' or elem.name == 'FileVersion':
elem.val = f"{major}.{minor}.{revision}"
if debug_version:
elem.val += "-debug"

# Update version file with new info, to be used by PyInstaller
with codecs.open(VERSION_INFO_FILE, 'w', 'utf-8') as fp:
Expand Down
2 changes: 1 addition & 1 deletion tools/windows-installer/turing-system-monitor.iss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AppSupportURL={#MyAppURL}/wiki
AppUpdatesURL={#MyAppURL}/releases
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=turing-system-monitor_{#MyAppVersion}
OutputBaseFilename=turing-system-monitor-{#MyAppVersion}
AllowNoIcons=yes
PrivilegesRequired=lowest
Compression=lzma
Expand Down
File renamed without changes.
Loading