From b35bec4332855369c3b4e45a86f337aea00dcaec Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 3 Jul 2026 23:10:51 -0400 Subject: [PATCH 01/13] distribute executables directly --- .github/workflows/lint-and-build.yml | 21 ++++++++++++++------- scripts/build.ps1 | 18 ++++++++++++++---- src/error_messages.py | 6 +++--- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 017e0af1..7d2e1798 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -128,8 +128,6 @@ jobs: run: >- ${{ startsWith(matrix.os, 'ubuntu') && 'xvfb-run --auto-servernum' || '' }} uv run -m unittest discover --start-directory tests --verbose - - name: Add empty profile - run: echo "" > dist/settings.toml - name: Extract AutoSplit version id: artifact_vars working-directory: src @@ -138,18 +136,16 @@ jobs: echo "AUTOSPLIT_VERSION=$Env:AUTOSPLIT_VERSION" >> $Env:GITHUB_OUTPUT echo "OS=$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)" >> $Env:GITHUB_OUTPUT - name: Upload Build Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: > AutoSplit v${{ steps.artifact_vars.outputs.AUTOSPLIT_VERSION }} for ${{ steps.artifact_vars.outputs.OS }}${{ matrix.wine-compat }} (Python ${{ matrix.python-version }}) - path: | - dist/AutoSplit* - dist/settings.toml + path: dist/AutoSplit* if-no-files-found: error - name: Upload Build logs - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: > Build logs for ${{ steps.artifact_vars.outputs.OS }}${{ matrix.wine-compat }} (Python @@ -160,6 +156,17 @@ jobs: build/AutoSplit/*.html if-no-files-found: error + Merge-Build-Artifacts: + needs: Build + runs-on: ubuntu-latest + steps: + - name: Merge all executables into a single artifact + uses: actions/upload-artifact/merge@v7 + with: + name: AutoSplit v${{ needs.Build.outputs.AUTOSPLIT_VERSION }} + # Only the executables, not the per-OS build logs. Keep the individual downloads + pattern: AutoSplit v* + Release-Template: needs: Build runs-on: ubuntu-latest diff --git a/scripts/build.ps1 b/scripts/build.ps1 index da71fbdb..1c7ef683 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -58,7 +58,13 @@ try { Move-Item build/AppDir/AutoSplit/_internal build/AppDir/_internal Remove-Item build/AppDir/AutoSplit - if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'X64') { + $arch = switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) { + 'X64' { 'x86_64' } + 'Arm64' { 'aarch64' } + default { throw "Unsupported arch: $_" } + } + + if ($arch -eq 'x86_64') { # Technically UPX works for Linux executables, but trying to compress .so can still result in Segmentation fault # https://github.com/orgs/pyinstaller/discussions/8922#discussioncomment-13185670 # https://github.com/pyinstaller/pyinstaller/blob/4d28a528f8ab8632f7cfa7662fc6fcc45881e741/PyInstaller/building/utils.py#L281-L288 @@ -89,6 +95,7 @@ try { Copy-Item res/AutoSplit.desktop build/AppDir/AutoSplit.desktop Copy-Item res/splash.png build/AppDir/AutoSplit.png $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value + $pythonVersion = (uv run --active python --version) -replace ' (\d+\.\d+)\S*', '.$1' $date = Get-Date -Format 'yyyy-MM-dd' New-Item -ItemType Directory -Path build/AppDir/usr/share/metainfo -Force | Out-Null @@ -99,10 +106,13 @@ try { if (Test-Path dist) { Remove-Item dist -Recurse -Force } New-Item -ItemType Directory -Path dist | Out-Null - & 'scripts/appimagetool.AppImage' build/AppDir dist/AutoSplit.AppImage - chmod +x dist/AutoSplit.AppImage + # AppImage naming nomenclature: + # - https://github.com/AppImage/AppImageSpec/blob/master/draft.md#type-2-image-format + # - https://github.com/AppImage/appimage.github.io#:~:text=Standard%20nomenclature + $appImageName = "AutoSplit-$version.$pythonVersion-$arch.AppImage" + & 'scripts/appimagetool.AppImage' build/AppDir dist/$appImageName - Write-Host 'Created dist/AutoSplit.AppImage' + Write-Host "Created dist/$appImageName" } } finally { diff --git a/src/error_messages.py b/src/error_messages.py index 40461308..f264772c 100644 --- a/src/error_messages.py +++ b/src/error_messages.py @@ -43,7 +43,7 @@ def _set_text_message( ): # Also surface the error message in the logs plain_message = QtGui.QTextDocumentFragment.fromHtml(message).toPlainText() - sys.stderr.write(f"{plain_message}\n{details}\n" if details else f"{plain_message}\n") + print(f"{plain_message}\n{details}\n" if details else f"{plain_message}", sys.stderr) message_box = QtWidgets.QMessageBox() message_box.setWindowTitle("Error") @@ -144,9 +144,9 @@ def invalid_hotkey(hotkey_name: str): def no_settings_file_on_open(): - _set_text_message( + print( "No settings file found. " - + "One can be loaded on open if placed in the same folder as the AutoSplit executable." + + "One can be loaded on open if placed in the same folder as the AutoSplit executable.", ) From b09278f61ce171b5eb0d292dd455438e02fc4809 Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 3 Jul 2026 23:35:56 -0400 Subject: [PATCH 02/13] Disambiguate Windows builds --- .github/workflows/lint-and-build.yml | 2 +- scripts/build.ps1 | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 7d2e1798..562186be 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -178,7 +178,7 @@ jobs: # Which Asset should I download? - Python: This is the Python version bundled with AutoSplit. Try the newer version, it should be functionally identical, with a marginal performance boost. If you have any issue with it, please [report it here](https://github.com/Toufool/AutoSplit/issues) or on the Discord server and use an older Python version in the mean time. - - `arm64` vs `x64`: [Check your Processor Platform Architecture](https://www.checkadevice.com/tests/system/) (note that `x86_64` and `x64` means the same). If you're still unsure, `x64` will work either way. `arm64` should be more efficient. + - `arm64` vs `x64`: [Check your Processor Platform Architecture](https://www.checkadevice.com/tests/system/) (note that `x86_64`==`x64` and `aarch64`==`arm64`). If you're still unsure, `x64` will work either way. `arm64` should be more efficient. - WineCompat: This is for running the Windows executable under Wine on Linux '@).Trim() -replace "`n", '')) # ^ Removing newline from template because GitHub will actually decode %0A diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 1c7ef683..ae6b1902 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -4,14 +4,18 @@ param([switch]$WineCompat) $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true +if ($WineCompat) { $WineCompat = '-WineCompat' } Push-Location "$PSScriptRoot/.." # Avoid issues with space in path try { & 'scripts/compile_resources.ps1' + $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value + $pythonVersion = (uv run --active python --version) -replace ' (\d+\.\d+)\S*', '.$1' + # CI not allowed to skip splash screen, it MUST build (will fail when calling PyInstaller) - $SupportsSplashScreen = $Env:GITHUB_JOB -or [System.Convert]::ToBoolean( + $supportsSplashScreen = $Env:GITHUB_JOB -or [System.Convert]::ToBoolean( $(uv run --active scripts/check_splash_support.py)) $arguments = @( @@ -30,13 +34,14 @@ try { # Missing upx executable should be enough, but let's be explicit $arguments += '--noupx' } - if ($SupportsSplashScreen) { + if ($supportsSplashScreen) { # https://github.com/pyinstaller/pyinstaller/issues/9022 $arguments += @('--splash=res/splash.png') } if ($IsWindows) { $arguments += @( '--onefile', + "--name=AutoSplit-$version.$pythonVersion-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)$WineCompat" # Hidden import by winrt.windows.graphics.imaging.SoftwareBitmap.create_copy_from_surface_async '--hidden-import=winrt.windows.foundation') } @@ -94,8 +99,6 @@ try { ### Copy-Item res/AutoSplit.desktop build/AppDir/AutoSplit.desktop Copy-Item res/splash.png build/AppDir/AutoSplit.png - $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value - $pythonVersion = (uv run --active python --version) -replace ' (\d+\.\d+)\S*', '.$1' $date = Get-Date -Format 'yyyy-MM-dd' New-Item -ItemType Directory -Path build/AppDir/usr/share/metainfo -Force | Out-Null From ad85e6daee930669f7e186ce12da4ac218657b21 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 00:09:30 -0400 Subject: [PATCH 03/13] Properly embed version in filename --- scripts/build.ps1 | 8 ++++---- src/AutoSplit.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index ae6b1902..aea8bd2f 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -4,7 +4,6 @@ param([switch]$WineCompat) $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true -if ($WineCompat) { $WineCompat = '-WineCompat' } Push-Location "$PSScriptRoot/.." # Avoid issues with space in path @@ -12,7 +11,7 @@ try { & 'scripts/compile_resources.ps1' $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value - $pythonVersion = (uv run --active python --version) -replace ' (\d+\.\d+)\S*', '.$1' + $pythonVersion = (uv run --active python --version) -replace '^Python (\d+\.\d+).*', 'python$1' # CI not allowed to skip splash screen, it MUST build (will fail when calling PyInstaller) $supportsSplashScreen = $Env:GITHUB_JOB -or [System.Convert]::ToBoolean( @@ -39,9 +38,10 @@ try { $arguments += @('--splash=res/splash.png') } if ($IsWindows) { + $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToLower() $arguments += @( '--onefile', - "--name=AutoSplit-$version.$pythonVersion-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)$WineCompat" + "--name=AutoSplit-$version+$pythonVersion-$arch$(if ($WineCompat) {'-WineCompat'} else {''})" # Hidden import by winrt.windows.graphics.imaging.SoftwareBitmap.create_copy_from_surface_async '--hidden-import=winrt.windows.foundation') } @@ -112,7 +112,7 @@ try { # AppImage naming nomenclature: # - https://github.com/AppImage/AppImageSpec/blob/master/draft.md#type-2-image-format # - https://github.com/AppImage/appimage.github.io#:~:text=Standard%20nomenclature - $appImageName = "AutoSplit-$version.$pythonVersion-$arch.AppImage" + $appImageName = "AutoSplit-$version+$pythonVersion-$arch.AppImage" & 'scripts/appimagetool.AppImage' build/AppDir dist/$appImageName Write-Host "Created dist/$appImageName" diff --git a/src/AutoSplit.py b/src/AutoSplit.py index 0a6b6b24..bb65efa8 100755 --- a/src/AutoSplit.py +++ b/src/AutoSplit.py @@ -1200,6 +1200,9 @@ def main(): myappid = f"Toufool.AutoSplit.v{AUTOSPLIT_VERSION}" shell32.SetCurrentProcessExplicitAppUserModelID(myappid) + # Decouple from the executable basename (which varies per build) + app.setApplicationName("AutoSplit") + app.setApplicationVersion(AUTOSPLIT_VERSION) app.setWindowIcon(QtGui.QIcon(":/resources/icon.ico")) if is_already_open(): From edec4b4b16b23ad02f57dd645034d07b986500db Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 00:13:31 -0400 Subject: [PATCH 04/13] fix method invocation --- scripts/build.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index aea8bd2f..a3aca1b7 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -11,6 +11,7 @@ try { & 'scripts/compile_resources.ps1' $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value + # Semver-compliant Python version tag $pythonVersion = (uv run --active python --version) -replace '^Python (\d+\.\d+).*', 'python$1' # CI not allowed to skip splash screen, it MUST build (will fail when calling PyInstaller) @@ -38,7 +39,7 @@ try { $arguments += @('--splash=res/splash.png') } if ($IsWindows) { - $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToLower() + $arch = "$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)".ToLower() $arguments += @( '--onefile', "--name=AutoSplit-$version+$pythonVersion-$arch$(if ($WineCompat) {'-WineCompat'} else {''})" From 78770de3d5953c94fbd5ca2e4232159808bf2d7b Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 00:26:28 -0400 Subject: [PATCH 05/13] fix build artifact path --- .github/workflows/lint-and-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 562186be..0f5cea40 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -151,9 +151,9 @@ jobs: Build logs for ${{ steps.artifact_vars.outputs.OS }}${{ matrix.wine-compat }} (Python ${{ matrix.python-version }}) path: | - build/AutoSplit/*.toc - build/AutoSplit/*.txt - build/AutoSplit/*.html + build/AutoSplit*/*.toc + build/AutoSplit*/*.txt + build/AutoSplit*/*.html if-no-files-found: error Merge-Build-Artifacts: From 7a553efc33d0c8861e26a45948e287fc879a6b5b Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 00:32:59 -0400 Subject: [PATCH 06/13] ubuntu-slim based for simple runners --- .github/workflows/lint-and-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 0f5cea40..cc43d00f 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -158,7 +158,7 @@ jobs: Merge-Build-Artifacts: needs: Build - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Merge all executables into a single artifact uses: actions/upload-artifact/merge@v7 @@ -169,7 +169,7 @@ jobs: Release-Template: needs: Build - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Annotate release template URL run: | From 9720658715a046d2f181773128ae2af14ca99bfd Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 00:37:05 -0400 Subject: [PATCH 07/13] Map logs toggle to Ctrl+J --- res/design.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/design.ui b/res/design.ui index 62eb6630..0c200696 100644 --- a/res/design.ui +++ b/res/design.ui @@ -1147,7 +1147,7 @@ ClickableLabel:hover { background-color: palette(midlight); } Toggle Logs - Ctrl+L + Ctrl+J Qt::ShortcutContext::ApplicationShortcut From 6634ec7fc16c7527df2feba6b7bff1809c334a3b Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 01:07:27 -0400 Subject: [PATCH 08/13] Embed zsync update information --- scripts/build.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index a3aca1b7..3b370100 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -114,7 +114,16 @@ try { # - https://github.com/AppImage/AppImageSpec/blob/master/draft.md#type-2-image-format # - https://github.com/AppImage/appimage.github.io#:~:text=Standard%20nomenclature $appImageName = "AutoSplit-$version+$pythonVersion-$arch.AppImage" - & 'scripts/appimagetool.AppImage' build/AppDir dist/$appImageName + $arguments = @('build/AppDir', "dist/$appImageName") + # Update information + # https://docs.appimage.org/packaging-guide/optional/updates.html#using-appimagetool + # https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releases + if ($Env:GITHUB_REPOSITORY) { + # Skip update information if not doing a GitHub build + $owner, $repo = $Env:GITHUB_REPOSITORY -split '/' + $arguments += @('-u', "gh-releases-zsync|$owner|$repo|latest|AutoSplit-*-$arch.AppImage.zsync") + } + & 'scripts/appimagetool.AppImage' @arguments Write-Host "Created dist/$appImageName" } From ae637085a885edb8112ea5bc74bfb218351fd82d Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 02:39:53 -0400 Subject: [PATCH 09/13] Move zsync to dist --- scripts/build.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 3b370100..a23edb18 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -125,6 +125,12 @@ try { } & 'scripts/appimagetool.AppImage' @arguments + # appimagetool writes the .zsync file to the working directory (repo root) as the AppImage + # basename, not next to the AppImage. Move it into dist/. + if (Test-Path "$appImageName.zsync") { + Move-Item "$appImageName.zsync" "dist/$appImageName.zsync" -Force + } + Write-Host "Created dist/$appImageName" } } From 4a023193d40bf33b14b90c5e3be83047f9023040 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 12:06:23 -0400 Subject: [PATCH 10/13] Only include Python tag if multiple python builds --- .github/workflows/lint-and-build.yml | 51 ++++++++++++++++++++-------- scripts/build.ps1 | 14 +++++--- 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index cc43d00f..391edc12 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -44,7 +44,31 @@ defaults: shell: pwsh jobs: + PySentry: + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v7 + - run: uvx pysentry-rs --sources=pypa,pypi,osv --forbid-unmaintained + + # Single source of truth for the shipped Python version(s). + # GitHub Actions has no length() and `strategy` can't read `env`, so the matrix and the + # "more than one Python version" flag are both derived here and consumed via `needs`. + Setup: + runs-on: ubuntu-slim + outputs: + python-versions: ${{ steps.set.outputs.python-versions }} + include-python-version-tag: ${{ steps.set.outputs.include-python-version-tag }} + steps: + - id: set + # Only the Python version(s) we plan on shipping matter. + run: | + $pythonVersions = @('3.14') + "python-versions=$($pythonVersions | ConvertTo-Json -Compress -AsArray)" >> $Env:GITHUB_OUTPUT + "include-python-version-tag=$(if ($pythonVersions.Count -gt 1) { '-IncludePythonVersionTag' })" >> $Env:GITHUB_OUTPUT + Pyright: + needs: Setup runs-on: ${{ matrix.os }} env: # Prevent accidentally slower type-checking due to missing arm wheels. @@ -60,7 +84,7 @@ jobs: matrix: # windows arm runner slower as long as opencv doesn't provide windows arm64 wheels os: [windows-latest, ubuntu-24.04-arm] - python-version: ["3.14"] + python-version: ${{ fromJson(needs.Setup.outputs.python-versions) }} steps: - uses: actions/checkout@v6 - name: Set up uv for Python ${{ matrix.python-version }} @@ -76,23 +100,16 @@ jobs: working-directory: src/ python-version: ${{ matrix.python-version }} - PySentry: - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@v6 - - uses: astral-sh/setup-uv@v7 - - run: uvx pysentry-rs --sources=pypa,pypi,osv --forbid-unmaintained - Build: + needs: Setup runs-on: ${{ matrix.os }} outputs: AUTOSPLIT_VERSION: ${{ steps.artifact_vars.outputs.AUTOSPLIT_VERSION }} strategy: fail-fast: false - # Only the Python version we plan on shipping matters. matrix: os: [windows-latest, windows-11-arm, ubuntu-24.04, ubuntu-24.04-arm] - python-version: ["3.14"] + python-version: ${{ fromJson(needs.Setup.outputs.python-versions) }} wine-compat: [""] include: - os: windows-latest @@ -122,7 +139,7 @@ jobs: || null }} # endregion - run: scripts/install.ps1 ${{ matrix.wine-compat }} - - run: scripts/build.ps1 ${{ matrix.wine-compat }} + - run: scripts/build.ps1 ${{ matrix.wine-compat }} ${{ needs.Setup.outputs.include-python-version-tag }} - name: Run test suite # pywinctl/pymonctl connect to the X display at import-time, hence xvfb run: >- @@ -168,18 +185,22 @@ jobs: pattern: AutoSplit v* Release-Template: - needs: Build + needs: [Setup, Build] runs-on: ubuntu-slim steps: - name: Annotate release template URL run: | $version = "v${{ needs.Build.outputs.AUTOSPLIT_VERSION }}" - $body = [uri]::EscapeDataString(((@' + $pythonBullet = if ('${{ needs.Setup.outputs.include-python-version-tag }}') { + "- Python: This is the Python version bundled with AutoSplit. Try the newer version, it should be functionally identical, with a marginal performance boost. If you have any issue with it, please [report it here](https://github.com/Toufool/AutoSplit/issues) or on the Discord server and use an older Python version in the mean time." + } + else { '' } + $body = [uri]::EscapeDataString((@' # Which Asset should I download? - - Python: This is the Python version bundled with AutoSplit. Try the newer version, it should be functionally identical, with a marginal performance boost. If you have any issue with it, please [report it here](https://github.com/Toufool/AutoSplit/issues) or on the Discord server and use an older Python version in the mean time. + {{PYTHON}} - `arm64` vs `x64`: [Check your Processor Platform Architecture](https://www.checkadevice.com/tests/system/) (note that `x86_64`==`x64` and `aarch64`==`arm64`). If you're still unsure, `x64` will work either way. `arm64` should be more efficient. - WineCompat: This is for running the Windows executable under Wine on Linux - '@).Trim() -replace "`n", '')) + '@).Replace('{{PYTHON}}', $pythonBullet).Trim() -replace "`n", '') # ^ Removing newline from template because GitHub will actually decode %0A echo "::notice::${{ github.server_url }}/${{ github.repository }}/releases/new?target=main&tag=$version&title=$version&body=$body" diff --git a/scripts/build.ps1 b/scripts/build.ps1 index a23edb18..910a442e 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,6 +1,9 @@ #! /usr/bin/pwsh -param([switch]$WineCompat) +param( + [switch]$WineCompat, + [switch]$IncludePythonVersionTag +) $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true @@ -12,7 +15,10 @@ try { $version = (Select-String 'pyproject.toml' -Pattern '^version = "(.+)"').Matches.Groups[1].Value # Semver-compliant Python version tag - $pythonVersion = (uv run --active python --version) -replace '^Python (\d+\.\d+).*', 'python$1' + $pythonVersionTag = if ($IncludePythonVersionTag) { + (uv run --active python --version) -replace '^Python (\d+\.\d+).*', '+Python$1' + } + else { '' } # CI not allowed to skip splash screen, it MUST build (will fail when calling PyInstaller) $supportsSplashScreen = $Env:GITHUB_JOB -or [System.Convert]::ToBoolean( @@ -42,7 +48,7 @@ try { $arch = "$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)".ToLower() $arguments += @( '--onefile', - "--name=AutoSplit-$version+$pythonVersion-$arch$(if ($WineCompat) {'-WineCompat'} else {''})" + "--name=AutoSplit-$version$pythonVersionTag-$arch$(if ($WineCompat) {'-WineCompat'} else {''})" # Hidden import by winrt.windows.graphics.imaging.SoftwareBitmap.create_copy_from_surface_async '--hidden-import=winrt.windows.foundation') } @@ -113,7 +119,7 @@ try { # AppImage naming nomenclature: # - https://github.com/AppImage/AppImageSpec/blob/master/draft.md#type-2-image-format # - https://github.com/AppImage/appimage.github.io#:~:text=Standard%20nomenclature - $appImageName = "AutoSplit-$version+$pythonVersion-$arch.AppImage" + $appImageName = "AutoSplit-$version$pythonVersionTag-$arch.AppImage" $arguments = @('build/AppDir', "dist/$appImageName") # Update information # https://docs.appimage.org/packaging-guide/optional/updates.html#using-appimagetool From 8c16da03a4b3d096b4a3645adb9b50aa20ab9000 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 12:47:55 -0400 Subject: [PATCH 11/13] Not using deprecated appimagekit + feathered icon --- scripts/build.ps1 | 7 ++++++- scripts/install.ps1 | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 910a442e..f5f47992 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -105,7 +105,12 @@ try { # Create AppImage ### Copy-Item res/AutoSplit.desktop build/AppDir/AutoSplit.desktop - Copy-Item res/splash.png build/AppDir/AutoSplit.png + # Icon as PNG (freedesktop doesn't support .ico), converted from res/icon.ico. + # Not splash.png, which uses hard transparency for the Tcl/Tk splash. + New-Item -ItemType Directory -Path build/AppDir/usr/share/icons/hicolor/256x256/apps -Force | Out-Null + uv run --active python -c "from PIL import Image; Image.open('res/icon.ico').save('build/AppDir/AutoSplit.png')" + # Top-level -> .DirIcon (file thumbnail); hicolor copy -> desktop integration (menu/taskbar). + Copy-Item build/AppDir/AutoSplit.png build/AppDir/usr/share/icons/hicolor/256x256/apps/AutoSplit.png $date = Get-Date -Format 'yyyy-MM-dd' New-Item -ItemType Directory -Path build/AppDir/usr/share/metainfo -Force | Out-Null diff --git a/scripts/install.ps1 b/scripts/install.ps1 index fab99241..05d5f760 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -57,7 +57,7 @@ if ($IsLinux) { Write-Output 'Installing appimagetool' Invoke-WebRequest ` - -Uri "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(uname -m).AppImage" ` + -Uri "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" ` -OutFile "$PSScriptRoot/appimagetool.AppImage" chmod +x "$PSScriptRoot/appimagetool.AppImage" } From c4531cf94b43e90c4a1a8ae22aeac0637fb10739 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 12:52:49 -0400 Subject: [PATCH 12/13] Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/lint-and-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 391edc12..fdc8b14c 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -27,6 +27,9 @@ on: - "*.toml" - "uv.lock" +permissions: + contents: read + env: GITHUB_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_EXCLUDE_BUILD_NUMBER: ${{ inputs.excludeBuildNumber }} From f5e030d004fe4a0b7b0a90e78107f3454312e244 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 4 Jul 2026 15:16:23 -0400 Subject: [PATCH 13/13] fix param count --- .github/workflows/lint-and-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 391edc12..617d2aaa 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -195,12 +195,12 @@ jobs: "- Python: This is the Python version bundled with AutoSplit. Try the newer version, it should be functionally identical, with a marginal performance boost. If you have any issue with it, please [report it here](https://github.com/Toufool/AutoSplit/issues) or on the Discord server and use an older Python version in the mean time." } else { '' } - $body = [uri]::EscapeDataString((@' + $body = [uri]::EscapeDataString(((@' # Which Asset should I download? {{PYTHON}} - `arm64` vs `x64`: [Check your Processor Platform Architecture](https://www.checkadevice.com/tests/system/) (note that `x86_64`==`x64` and `aarch64`==`arm64`). If you're still unsure, `x64` will work either way. `arm64` should be more efficient. - WineCompat: This is for running the Windows executable under Wine on Linux - '@).Replace('{{PYTHON}}', $pythonBullet).Trim() -replace "`n", '') + '@).Replace('{{PYTHON}}', $pythonBullet).Trim() -replace "`n", '')) # ^ Removing newline from template because GitHub will actually decode %0A echo "::notice::${{ github.server_url }}/${{ github.repository }}/releases/new?target=main&tag=$version&title=$version&body=$body"