build: add Linux and Windows build scripts with NSIS installer
build-linux.sh configures and builds via CMake. build-windows.sh builds in MSYS2/MINGW64, bundles Qt and transitive MinGW DLLs via windeployqt plus an ldd pass, and produces an NSIS installer (installer.nsi). Ignore the dist/ output and generated Setup.exe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
767b0b50b0
commit
7a4f3f312b
4 changed files with 216 additions and 0 deletions
78
installer.nsi
Normal file
78
installer.nsi
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
; NSIS installer for Ultimate Media Tracker
|
||||
;
|
||||
; Build with: makensis installer.nsi
|
||||
; Expects the packaged app in the dist\ folder (produced by build-windows.sh).
|
||||
|
||||
Unicode true
|
||||
|
||||
!define APPNAME "Ultimate Media Tracker"
|
||||
!define COMPANY "UMT"
|
||||
!define VERSION "1.0.0"
|
||||
!define EXE "umt.exe"
|
||||
!define SOURCEDIR "dist"
|
||||
!define REGUNINST "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||
|
||||
!include "MUI2.nsh"
|
||||
|
||||
Name "${APPNAME}"
|
||||
OutFile "UltimateMediaTracker-Setup.exe"
|
||||
InstallDir "$PROGRAMFILES64\${APPNAME}"
|
||||
InstallDirRegKey HKLM "Software\${APPNAME}" "InstallDir"
|
||||
RequestExecutionLevel admin
|
||||
|
||||
VIProductVersion "${VERSION}.0"
|
||||
VIAddVersionKey "ProductName" "${APPNAME}"
|
||||
VIAddVersionKey "CompanyName" "${COMPANY}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
VIAddVersionKey "FileDescription" "${APPNAME} Installer"
|
||||
VIAddVersionKey "LegalCopyright" "${COMPANY}"
|
||||
|
||||
!define MUI_ICON "resources\icons\appicon.ico"
|
||||
!define MUI_UNICON "resources\icons\appicon.ico"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE}"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
; First language listed is the default.
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Section "Install"
|
||||
SetOutPath "$INSTDIR"
|
||||
File /r "${SOURCEDIR}\*.*"
|
||||
|
||||
; Shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortcut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}"
|
||||
CreateShortcut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}"
|
||||
|
||||
; Uninstaller + Add/Remove Programs entry
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKLM "Software\${APPNAME}" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKLM "${REGUNINST}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "${REGUNINST}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "${REGUNINST}" "DisplayIcon" "$INSTDIR\${EXE}"
|
||||
WriteRegStr HKLM "${REGUNINST}" "Publisher" "${COMPANY}"
|
||||
WriteRegStr HKLM "${REGUNINST}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||
WriteRegDWORD HKLM "${REGUNINST}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "${REGUNINST}" "NoRepair" 1
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||
RMDir "$SMPROGRAMS\${APPNAME}"
|
||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||
|
||||
; Removes the program files only. User library/settings live in
|
||||
; %APPDATA%\UMT and are intentionally left untouched.
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
DeleteRegKey HKLM "${REGUNINST}"
|
||||
DeleteRegKey HKLM "Software\${APPNAME}"
|
||||
SectionEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue