FreeDATA/freedata-server-nsis-config.nsi

50 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-01-30 20:41:25 +00:00
; NSIS Script for FreeData Server
; Name of the installer
OutFile "FreeData-Server-Installer.exe"
; Default installation directory
InstallDir "$PROGRAMFILES\FreeData Server"
; Registry key to store the installation directory
InstallDirRegKey HKCU "Software\FreeDataServer" "Install_Dir"
; Show installation details
ShowInstDetails show
; Show uninstallation details
ShowUninstDetails show
2024-01-31 09:19:07 +00:00
; Define GITHUB location
!define GITHUB_WORKSPACE
2024-01-30 20:41:25 +00:00
Section "MainSection" SEC01
; Set the output path to the installation directory
SetOutPath $INSTDIR
; Add the entire FreeData Server directory
2024-01-31 09:21:54 +00:00
File /r "modem\server.dist\*.*"
2024-01-30 20:41:25 +00:00
; Write the installation path to the registry
WriteRegStr HKCU "Software\FreeDataServer" "Install_Dir" "$INSTDIR"
; Create a desktop shortcut for easy access
CreateShortCut "$DESKTOP\FreeData Server.lnk" "$INSTDIR\freedata-server.exe"
SectionEnd
Section "Uninstall"
; Delete the entire FreeData Server directory
RMDir /r $INSTDIR
; Remove the registry entry
DeleteRegKey HKCU "Software\FreeDataServer"
; Delete the desktop shortcut
Delete "$DESKTOP\FreeData Server.lnk"
SectionEnd