-
Notifications
You must be signed in to change notification settings - Fork 8
/
installer.nsi
41 lines (28 loc) · 894 Bytes
/
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
!define APP_NAME "HyperMc"
!define APP_VERSION "1.0.0"
!define INSTALLER_TITLE "${APP_NAME} - ${APP_VERSION} - Setup"
!define UNINSTALLER_TITLE "${APP_NAME} - ${APP_VERSION} - Uninstaller"
!addincludedir "./"
!include "MUI.nsh"
!include "MUI2.nsh"
SetCompressor lzma
!insertmacro MUI_LANGUAGE "English"
RequestExecutionLevel user
; ---------------------- PAGES ----------------------
Page directory
Page instfiles
; ---------------------- INSTALL ----------------------
Name "${INSTALLER_TITLE}"
OutFile "hypermc-setup-${APP_VERSION}.exe"
InstallDir "$PROGRAMFILES\Hypermc"
ShowUnInstDetails show
Section "MainSection" SEC01
SectionEnd
; ---------------------- FUNCITONS ----------------------
Function .onVerifyInstDir
ReadEnvStr $0 "ProgramFiles(x86)"
StrCmp $0 $INSTDIR 0 PathGood
MessageBox MB_OK "directory not valid for installation"
Abort
PathGood:
FunctionEnd