feat(packaging): desktop shortcut, icon-cache refresh, checksums, AppStream

Windows installer:
- Optional Desktop shortcut feature (default on, deselectable) via a switch to
  the WixUI_FeatureTree UI.
- Refresh the shell after install (ie4uinit -show) so .dwg/.dxf icons and
  associations appear without a reboot.
- Tidy the Add/Remove Programs entry: ARPNOREPAIR plus contact/update/comments
  metadata (Modify stays enabled for the feature tree).

Release workflow:
- Publish SHA256 sidecars for the AppImage, portable .exe, MSI and .dmg.

Linux:
- Ship an AppStream metainfo.xml for software-centre integration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-16 04:27:46 +03:00
commit e7afe35d62
4 changed files with 136 additions and 11 deletions

View file

@ -34,8 +34,10 @@ jobs:
mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
mkdir -p AppDir/usr/share/metainfo
cp target/release/OpenCADStudio AppDir/usr/bin/OpenCADStudio
cp packaging/OpenCADStudio.desktop AppDir/usr/share/applications/io.github.HakanSeven12.OpenCadStudio.desktop
cp packaging/io.github.HakanSeven12.OpenCadStudio.metainfo.xml AppDir/usr/share/metainfo/
rsvg-convert -w 256 -h 256 assets/logo.svg \
-o AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.OpenCadStudio.png
@ -60,8 +62,10 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv OpenCADStudio.AppImage OpenCADStudio-${{ github.ref_name }}-linux-x86_64.AppImage
gh release upload ${{ github.ref_name }} OpenCADStudio-${{ github.ref_name }}-linux-x86_64.AppImage --clobber --repo ${{ github.repository }}
ASSET=OpenCADStudio-${{ github.ref_name }}-linux-x86_64.AppImage
mv OpenCADStudio.AppImage "$ASSET"
sha256sum "$ASSET" > "$ASSET.sha256"
gh release upload ${{ github.ref_name }} "$ASSET" "$ASSET.sha256" --clobber --repo ${{ github.repository }}
build-windows:
runs-on: windows-latest
@ -179,11 +183,16 @@ jobs:
# .msi (installer with Start Menu shortcut + .dwg / .dxf
# file association). The `-portable` / `-installer` suffix
# makes the distinction obvious on the release page.
Move-Item target\release\OpenCADStudio.exe "OpenCADStudio-$tag-windows-x86_64-portable.exe"
Move-Item OpenCADStudio.msi "OpenCADStudio-$tag-windows-x86_64-installer.msi"
$exe = "OpenCADStudio-$tag-windows-x86_64-portable.exe"
$msi = "OpenCADStudio-$tag-windows-x86_64-installer.msi"
Move-Item target\release\OpenCADStudio.exe $exe
Move-Item OpenCADStudio.msi $msi
# SHA256 sidecars so downloads can be verified.
(Get-FileHash -Algorithm SHA256 $exe).Hash.ToLower() + " $exe" | Out-File -Encoding ascii "$exe.sha256"
(Get-FileHash -Algorithm SHA256 $msi).Hash.ToLower() + " $msi" | Out-File -Encoding ascii "$msi.sha256"
gh release upload $tag `
"OpenCADStudio-$tag-windows-x86_64-portable.exe" `
"OpenCADStudio-$tag-windows-x86_64-installer.msi" `
$exe "$exe.sha256" `
$msi "$msi.sha256" `
--clobber --repo ${{ github.repository }}
build-macos:
@ -272,8 +281,10 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv OpenCADStudio.dmg OpenCADStudio-${{ github.ref_name }}-macos-arm64.dmg
gh release upload ${{ github.ref_name }} OpenCADStudio-${{ github.ref_name }}-macos-arm64.dmg --clobber --repo ${{ github.repository }}
ASSET=OpenCADStudio-${{ github.ref_name }}-macos-arm64.dmg
mv OpenCADStudio.dmg "$ASSET"
shasum -a 256 "$ASSET" > "$ASSET.sha256"
gh release upload ${{ github.ref_name }} "$ASSET" "$ASSET.sha256" --clobber --repo ${{ github.repository }}
- name: Emit Homebrew cask sha256
if: github.event_name == 'release'

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- AppStream metadata: integrates the AppImage with Linux software centres
(name, summary, icon, categories, screenshots). Installed into
/usr/share/metainfo/ inside the AppDir by the release workflow. -->
<component type="desktop-application">
<id>io.github.HakanSeven12.OpenCadStudio</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<name>Open CAD Studio</name>
<summary>2D/3D CAD application for DWG and DXF drawings</summary>
<description>
<p>
Open CAD Studio is a 2D/3D CAD application for creating and editing
technical drawings. It reads and writes the standard DWG and DXF file
formats so drawings stay compatible with other CAD software.
</p>
</description>
<launchable type="desktop-id">io.github.HakanSeven12.OpenCadStudio.desktop</launchable>
<categories>
<category>Graphics</category>
<category>Engineering</category>
</categories>
<keywords>
<keyword>CAD</keyword>
<keyword>DWG</keyword>
<keyword>DXF</keyword>
<keyword>drawing</keyword>
<keyword>design</keyword>
<keyword>engineering</keyword>
</keywords>
<url type="homepage">https://github.com/HakanSeven12/OpenCADStudio</url>
<url type="bugtracker">https://github.com/HakanSeven12/OpenCADStudio/issues</url>
<developer id="io.github.hakanseven12">
<name>Hakan Seven</name>
</developer>
<content_rating type="oars-1.1" />
<provides>
<mediatype>image/vnd.dwg</mediatype>
<mediatype>image/vnd.dxf</mediatype>
</provides>
</component>

View file

@ -11,6 +11,7 @@
Provides:
* Per-machine install under Program Files\Open CAD Studio.
* Start Menu shortcut under Programs\Open CAD Studio.
* Desktop shortcut.
* File associations for .dwg and .dxf via a single ProgID; both
route through `OpenCADStudio.exe "%1"` so the OS hands the file
path to the app as argv[1] (consumed in OpenCADStudio::boot).
@ -51,6 +52,15 @@
<Property Id='ARPPRODUCTICON' Value='AppIcon.ico' />
<Property Id='ARPHELPLINK' Value='https://github.com/HakanSeven12/OpenCADStudio' />
<Property Id='ARPURLINFOABOUT' Value='https://github.com/HakanSeven12/OpenCADStudio' />
<Property Id='ARPURLUPDATEINFO' Value='https://github.com/HakanSeven12/OpenCADStudio/releases' />
<Property Id='ARPCONTACT' Value='Hakan Seven' />
<Property Id='ARPCOMMENTS' Value='2D/3D CAD application for DWG and DXF drawings.' />
<!--
Hide "Repair" from the Apps & Features entry — there is no repair flow.
"Modify" is deliberately left enabled: WixUI_FeatureTree supports it, so
users can add/remove the optional Desktop shortcut feature later.
-->
<Property Id='ARPNOREPAIR' Value='1' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFiles64Folder'>
@ -195,14 +205,66 @@
</Component>
</Directory>
</Directory>
<!--
Desktop shortcut. A non-advertised shortcut with an explicit Target;
the HKCU registry value is the component KeyPath (a shortcut on its own
cannot be a KeyPath for a per-user resource).
-->
<Directory Id='DesktopFolder' Name='Desktop'>
<Component Id='DesktopShortcutComp' Guid='c5c7f1c4-3d8a-4efd-b049-4662d9143dcd'>
<Shortcut
Id='DesktopShortcut'
Name='Open CAD Studio'
Description='Launch Open CAD Studio'
Target='[APPLICATIONROOTDIRECTORY]OpenCADStudio.exe'
WorkingDirectory='APPLICATIONROOTDIRECTORY'
Icon='AppIcon.ico'
IconIndex='0' />
<RegistryValue
Root='HKCU'
Key='Software\Open CAD Studio'
Name='desktop_shortcut'
Type='integer'
Value='1'
KeyPath='yes' />
</Component>
</Directory>
</Directory>
<Feature Id='Complete' Title='Open CAD Studio' Level='1'>
<Feature Id='Complete' Title='Open CAD Studio' Level='1' Display='expand'>
<ComponentRef Id='MainExecutable' />
<ComponentRef Id='DefaultPrograms' />
<ComponentRef Id='ProgramMenuDirComp' />
<!-- Optional, user-deselectable in the feature tree (default on). -->
<Feature
Id='DesktopShortcut'
Title='Desktop shortcut'
Description='Add a shortcut to Open CAD Studio on the desktop.'
Level='1'
Absent='allow'>
<ComponentRef Id='DesktopShortcutComp' />
</Feature>
</Feature>
<!--
Refresh the shell after install so the new .dwg / .dxf file-type icons
and associations appear immediately instead of only after a reboot or an
icon-cache rebuild. `ie4uinit -show` rebuilds the per-user icon cache.
Immediate execution keeps property access ([SystemFolder]); Return='ignore'
means it can never fail the install, and the NOT REMOVE condition skips it
on uninstall.
-->
<CustomAction
Id='RefreshShellIcons'
Directory='APPLICATIONROOTDIRECTORY'
ExeCommand='"[SystemFolder]ie4uinit.exe" -show'
Execute='immediate'
Return='ignore' />
<InstallExecuteSequence>
<Custom Action='RefreshShellIcons' After='InstallFinalize'>NOT REMOVE</Custom>
</InstallExecuteSequence>
<!-- Installer UI + finish-screen launch checkbox (see ui.wxs). -->
<UIRef Id='OpenCADStudioUI' />

View file

@ -6,7 +6,9 @@
(which needs `-ext WixUIExtension` for the WixUI_Minimal dialog set).
Provides:
* WixUI_Minimal wizard (Welcome → Progress → Finish).
* WixUI_FeatureTree wizard (Welcome → License → Features → Progress →
Finish). The Features page lets the user deselect the optional Desktop
shortcut feature (default on).
* A pre-ticked "Launch Open CAD Studio" checkbox on the finish screen
that starts the freshly installed exe when the user clicks Finish.
-->
@ -41,7 +43,7 @@
Impersonate='yes' />
<UI Id='OpenCADStudioUI'>
<UIRef Id='WixUI_Minimal' />
<UIRef Id='WixUI_FeatureTree' />
<Publish
Dialog='ExitDialog'
Control='Finish'