Files
PaddleStroke 216388bab9 Windows MSI: use the installed app icon for Start shortcuts (#9366) (#9397)
* claim: #9366

* Windows MSI: install before removing the old version, so Start menu pins survive updates (#9366)

The MSI major upgrade removed the old version (solidcraft.exe and the Start
menu shortcut) before installing the new one, and Windows drops a Start menu
or taskbar pin whose target disappears. Schedule RemoveExistingProducts
afterInstallExecute so both stay at their path through an update; set
REINSTALLMODE=amus so a pre-release or nightly of the same X.Y.Z (same file
version) still replaces solidcraft.exe; skip the folder page on an update so
components keep their folder. Packaging lint checks both settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Windows MSI: a non-advertised Start menu shortcut, so its app ID and pin survive updates (#9366)

An advertised shortcut targets C:\Windows\Installer\{ProductCode}, so its
Start menu app ID changes with every build and Windows drops the pin.
Diagnosis by SamD98.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Windows MSI: name the Start menu shortcut SolidCraft CAD, so removing an older release keeps it (#9366)

Releases before this change advertised SolidCraft.lnk, and an advertised
shortcut is removed with its feature by file name. With the old product
removed after the new one is installed, that removal deleted the new
non-advertised SolidCraft.lnk, leaving no Start menu entry. A different
file name leaves the old removal only its own file. Packaging lint checks
the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Windows MSI: use the installed app icon for Start shortcuts

Keep the shortcut icon outside the per-ProductCode Windows Installer cache. Add an executable-icon authoring guard and regression coverage. Packaging-only WiX 5.0.2 and ICE50 checks pass; Start-pin persistence awaits an upgrade test.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:56:43 +00:00

77 lines
5.1 KiB
YAML

# Quick static checks for the release pipeline (seconds, no Rust build): workflow syntax, the
# packaging shell and PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata.
# Adapted from PhotoCraft's (storytold/photocraft, Apache-2.0; see ATTRIBUTION.md).
name: Packaging lint
on:
push:
branches: [main]
paths: [".github/workflows/**", "packaging/**", "assets/**"]
pull_request:
paths: [".github/workflows/**", "packaging/**", "assets/platforms/**"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: packaging-lint-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
env:
ACTIONLINT_VERSION: 1.7.12
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends shellcheck desktop-file-utils appstream libxml2-utils python3-yaml jq
curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \
| tar -xz -C "$RUNNER_TEMP" actionlint
- name: actionlint
run: '"$RUNNER_TEMP/actionlint" -color'
- name: shellcheck
run: shellcheck packaging/*.sh packaging/*/*.sh packaging/linux/AppRun
- name: Nightly release selection regression
run: python3 packaging/tests/nightly_test.py
- name: Windows executable icon validation regression
run: python3 packaging/tests/windows_icon_test.py
- name: AppImage CLI wrapper regression
run: python3 packaging/tests/apprun_test.py
- name: Flatpak desktop smoke validation regression
run: python3 packaging/tests/flatpak_test.py
- name: PowerShell
shell: pwsh
run: |
foreach ($f in Get-ChildItem packaging/windows/*.ps1) {
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$null, [ref]$errors) | Out-Null
if ($errors) { $errors | ForEach-Object { Write-Output "::error file=$($f.Name)::$_" }; exit 1 }
Write-Output "ok $($f.Name)"
}
- name: XML, desktop entry, AppStream, Flatpak manifest
run: |
xmllint --noout assets/platforms/windows/solidcraft.wxs assets/platforms/windows/solidcraft.en-us.wxl assets/platforms/macos/*.plist* assets/platforms/linux/*.xml*
# An MSI update installs before it removes the old version, so Start menu pins survive (#9366).
grep -q 'Schedule="afterInstallExecute"' assets/platforms/windows/solidcraft.wxs
grep -q 'Id="REINSTALLMODE" Value="amus"' assets/platforms/windows/solidcraft.wxs
# No advertised shortcuts: their Start menu app ID follows the ProductCode, which changes every build, so pins are dropped on update (#9366).
! grep -q 'Advertise="yes"' assets/platforms/windows/solidcraft.wxs || { echo '::error file=assets/platforms/windows/solidcraft.wxs::Advertise="yes": an advertised shortcut loses its Start menu pin on every update; use Advertise="no" (#9366)'; exit 1; }
# The Start menu shortcut is not called "SolidCraft": removing an earlier release (advertised shortcut) deletes that file by name after the new one is written (#9366).
grep -q 'Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="SolidCraft CAD"' assets/platforms/windows/solidcraft.wxs || { echo '::error file=assets/platforms/windows/solidcraft.wxs::the Start menu shortcut must stay Name="SolidCraft CAD" (#9366)'; exit 1; }
desktop-file-validate assets/platforms/linux/io.tangencylabs.solidcraft.desktop
# The window's X11 class is its app id; the old ids stay only as the rename shims.
grep -qx 'StartupWMClass=io.tangencylabs.solidcraft' assets/platforms/linux/io.tangencylabs.solidcraft.desktop
grep -q '<id>ai.storyteller.solidcraft</id>' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in
grep -q '<id>ai.storyteller.solvecraft</id>' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in
grep -qx 'X-Flatpak-RenamedFrom=ai.storyteller.solidcraft.desktop;ai.storyteller.solvecraft.desktop;' assets/platforms/linux/io.tangencylabs.solidcraft.desktop
grep -qF -e '--end-of-life-rebase=' packaging/flatpak-site.sh
sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in >"$RUNNER_TEMP/io.tangencylabs.solidcraft.metainfo.xml"
appstreamcli validate --no-net --explain "$RUNNER_TEMP/io.tangencylabs.solidcraft.metainfo.xml"
python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml')); assert m['id'] == 'io.tangencylabs.solidcraft' and m['command'] == 'solidcraft'"
python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/snap/snapcraft.yaml')); assert m['name'] == 'solidcraft' and m['confinement'] == 'strict' and m['apps']['solidcraft']['command'] == 'usr/bin/solidcraft'"
python3 -m py_compile packaging/linux/snap-smoke.py