summaryrefslogtreecommitdiff
path: root/nsis/installer.nsi
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-05-02 11:57:35 -0400
committerLouie S <louie@example.com>2024-05-02 11:57:35 -0400
commit6a7cc596a79ce38c417f9abffb498be934e6dc53 (patch)
treeb50588a063705fc1da26d618f130be5727f42899 /nsis/installer.nsi
parente71d1bcbae0775ec756f3de98b5c255df3e90243 (diff)
Exploring possibilities of supporting nsis installation on Windows
Diffstat (limited to 'nsis/installer.nsi')
-rw-r--r--nsis/installer.nsi78
1 files changed, 78 insertions, 0 deletions
diff --git a/nsis/installer.nsi b/nsis/installer.nsi
new file mode 100644
index 0000000..3030a40
--- /dev/null
+++ b/nsis/installer.nsi
@@ -0,0 +1,78 @@
+;-------------------------------------------------------------------------------
+; Includes
+!include "MUI2.nsh"
+!include "LogicLib.nsh"
+!include "WinVer.nsh"
+!include "x64.nsh"
+
+;-------------------------------------------------------------------------------
+; Constants
+!define PRODUCT_NAME "Terminal Media Launcher"
+!define PRODUCT_DESCRIPTION "TODO"
+!define COPYRIGHT "GNU GPLv3"
+!define PRODUCT_VERSION "0.1.0.0"
+!define SETUP_VERSION 1.0.0.0
+
+;-------------------------------------------------------------------------------
+; Attributes
+Name "terminal-media-launcher"
+OutFile "terminal-media-launcher-Setup.exe"
+InstallDir "$PROGRAMFILES\Terminal Media Launcher"
+InstallDirRegKey HKCU "Software\Louie S\Terminal Media Launcher" ""
+RequestExecutionLevel user ; user|highest|admin
+
+;-------------------------------------------------------------------------------
+; Version Info
+VIProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
+VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
+VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}"
+VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
+VIAddVersionKey "FileVersion" "${SETUP_VERSION}"
+
+;-------------------------------------------------------------------------------
+; Modern UI Appearance
+;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
+!define MUI_HEADERIMAGE
+;!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
+;!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+
+;-------------------------------------------------------------------------------
+; Installer Pages
+!insertmacro MUI_PAGE_WELCOME
+;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+;-------------------------------------------------------------------------------
+; Uninstaller Pages
+!insertmacro MUI_UNPAGE_WELCOME
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_UNPAGE_FINISH
+
+;-------------------------------------------------------------------------------
+; Languages
+!insertmacro MUI_LANGUAGE "English"
+
+;-------------------------------------------------------------------------------
+; Installer Sections
+Section "My Application" MyApp
+ SetOutPath $INSTDIR
+ File "..\src\terminal-media-launcher.exe"
+ ;File "Readme.txt"
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+SectionEnd
+
+;-------------------------------------------------------------------------------
+; Uninstaller Sections
+Section "Uninstall"
+ Delete "$INSTDIR\terminal-media-launcher.exe"
+ Delete "$INSTDIR\Uninstall.exe"
+ ; FIXME directory is not being uninstalled
+ RMDir "$INSTDIR"
+ ;DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+SectionEnd