-
Notifications
You must be signed in to change notification settings - Fork 3
/
installer.nsi
48 lines (38 loc) · 1.38 KB
/
installer.nsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
!include "MUI2.nsh"
Name "Gravishken"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
; Define the name of the installer
OutFile "build\GravishkenSetup.exe"
; Set the default installation directory
InstallDir "$PROGRAMFILES\Gravishken"
; Default section start
Section "MainSection" SEC01
; Set output path to installation directory
SetOutPath $INSTDIR
; Include your executable and DLL files
File "build\gravishken.exe"
File "build\urita.dll"
File "build\WebView2Loader.dll"
File "build\.env"
; Write the uninstaller executable
WriteUninstaller "$INSTDIR\Uninstall.exe"
; CreateShortCut "<shortcut_path>" "<target_executable>" "<icon_path>" "<description>" "<working_directory>"
; Create a shortcut in the Start Menu
CreateShortCut "$SMSTARTUP\Gravishken.lnk" "$INSTDIR\gravishken.exe"
; Optionally, create a shortcut on the Desktop
CreateShortCut "$DESKTOP\Gravishken.lnk" "$INSTDIR\gravishken.exe"
SectionEnd
; Create an uninstaller
Section "Uninstall"
Delete "$INSTDIR\gravishken.exe"
Delete "$INSTDIR\urita.dll"
Delete "$INSTDIR\WebView2Loader.dll"
Delete "$INSTDIR\.env"
Delete "$INSTDIR\Uninstall.exe"
Delete "$SMSTARTUP\Gravishken.lnk"
Delete "$DESKTOP\Gravishken.lnk"
RMDir "$INSTDIR" ; Remove the directory if empty
SectionEnd