FreeDATA/freedata-server-nsis-config.nsi

84 lines
2.1 KiB
Plaintext
Raw Normal View History

2024-01-31 11:01:46 +01:00
!include "MUI2.nsh"
2024-01-30 21:41:25 +01:00
2024-02-03 20:27:55 +01:00
; Request administrative rights
RequestExecutionLevel admin
2024-01-31 11:01:46 +01:00
; The name and file name of the installer
Name "FreeData Server"
2024-01-31 12:11:43 +01:00
OutFile "FreeData-Server-Installer.exe"
2024-01-30 21:41:25 +01:00
; Default installation directory
2024-02-04 13:44:03 +01:00
; InstallDir "$PROGRAMFILES\FreeData\freedata-server"
InstallDir "$LOCALAPPDATA\FreeData\freedata-server"
2024-01-30 21:41:25 +01:00
; Registry key to store the installation directory
2024-01-31 11:01:46 +01:00
InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
2024-01-30 21:41:25 +01:00
2024-01-31 11:01:46 +01:00
; Modern UI settings
!define MUI_ABORTWARNING
2024-01-30 21:41:25 +01:00
2024-02-03 20:44:49 +01:00
; Installer interface settings
!define MUI_ICON "documentation\icon.ico"
!define MUI_UNICON "documentation\icon.ico" ; Icon for the uninstaller
2024-01-31 11:01:46 +01:00
; Define the welcome page text
!define MUI_WELCOMEPAGE_TEXT "Welcome to the FreeData Server Setup Wizard. This wizard will guide you through the installation process."
2024-02-04 13:44:03 +01:00
!define MUI_FINISHPAGE_TEXT "Folder: $INSTDIR"
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. Its recommended using the suggested one for avoiding permission problems."
2024-01-30 21:41:25 +01:00
2024-01-31 11:01:46 +01:00
; Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE"
2024-02-04 13:44:03 +01:00
;!insertmacro MUI_PAGE_COMPONENTS
2024-01-31 11:01:46 +01:00
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
2024-01-31 10:19:07 +01:00
2024-01-31 11:01:46 +01:00
; Uninstaller
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
2024-01-31 10:19:07 +01:00
2024-01-31 11:01:46 +01:00
; Language (you can choose and configure the language(s) you want)
!insertmacro MUI_LANGUAGE "English"
2024-01-31 10:19:07 +01:00
2024-01-31 11:01:46 +01:00
; Installer Sections
2024-02-03 20:44:49 +01:00
Section "FreeData Server" SEC01
2024-01-30 21:41:25 +01:00
2024-01-31 11:01:46 +01:00
; Set output path to the installation directory
2024-01-30 21:41:25 +01:00
SetOutPath $INSTDIR
2024-01-31 11:01:46 +01:00
; Add your application files here
2024-01-31 10:21:54 +01:00
File /r "modem\server.dist\*.*"
2024-01-30 21:41:25 +01:00
2024-01-31 11:01:46 +01:00
; Additional installation commands here
2024-01-30 21:41:25 +01:00
2024-01-31 11:01:46 +01:00
; Create a shortcut in the user's desktop
2024-01-30 21:41:25 +01:00
CreateShortCut "$DESKTOP\FreeData Server.lnk" "$INSTDIR\freedata-server.exe"
2024-01-31 11:01:46 +01:00
; Create Uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
2024-01-30 21:41:25 +01:00
SectionEnd
2024-01-31 11:01:46 +01:00
; Uninstaller Section
2024-01-30 21:41:25 +01:00
Section "Uninstall"
2024-01-31 11:01:46 +01:00
; Delete files and directories
Delete $INSTDIR\freedata-server.exe
2024-01-30 21:41:25 +01:00
RMDir /r $INSTDIR
2024-01-31 11:01:46 +01:00
; Remove the shortcut
2024-01-30 21:41:25 +01:00
Delete "$DESKTOP\FreeData Server.lnk"
2024-01-31 11:01:46 +01:00
; Additional uninstallation commands here
SectionEnd