-
Notifications
You must be signed in to change notification settings - Fork 2
/
installer_configuration.nsi
86 lines (58 loc) · 1.58 KB
/
installer_configuration.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "Little Cat Language"
OutFile "windows.exe"
Unicode True
;Default installation folder
InstallDir "$PROGRAMFILES\lclang"
;Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "LICENSE"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section
CreateDirectory "$INSTDIR"
CreateDirectory "$INSTDIR\bin"
CreateDirectory "$INSTDIR\lclang\libs"
SetOutPath "$INSTDIR\bin"
File lclang.jar
SetOutPath "$WINDIR"
File lclang.bat
SetOutPath "$INSTDIR\lclang\libs"
File "lclang\libs\"
nsExec::Exec 'setx LCLANG_HOME "$INSTDIR" /m'
ReadEnvStr $R0 "PATH"
StrCpy $R0 "$R0;$INSTDIR\bin"
System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PATH", R0).r0'
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Bin
Delete "$INSTDIR\bin\lclang.jar"
RMDir "$INSTDIR\bin"
;Libs
Delete "$INSTDIR\lclang\libs\"
RMDir "$INSTDIR\lclang\libs"
;Other
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
Delete "$WINDIR\lclang.bat"
SectionEnd