-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrometeus.LanguageSpec.nsi
97 lines (68 loc) · 2.54 KB
/
Prometeus.LanguageSpec.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
87
88
89
90
91
92
93
94
95
96
97
; Prometeus.LanguageSpec.nsi
; The name of the installer
Name "Prometeus.LanguageSpec"
; The file to write
OutFile "Prometeus.LanguageSpec_Install.exe"
; The default installation directory
InstallDir $PROGRAMFILES\Prometeus.LanguageSpec
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\R7\Prometeus.LanguageSpec" "Install_Dir"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
; Compressor options
SetCompressor lzma
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
; Prometeus.LanguageSpec
Section "!Prometeus.LanguageSpec"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
File "prometeus.lang"
File "README.md"
File "LICENSE.md"
File "install.cmd"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\R7\Prometeus.LanguageSpec "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prometeus.LanguageSpec" "DisplayName" "Prometeus.LanguageSpec"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prometeus.LanguageSpec" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prometeus.LanguageSpec" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prometeus.LanguageSpec" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; GEdit 2
Section "!GEdit 2 (32-bit, stable)"
SetOutPath $INSTDIR\gedit
File "gedit\gedit-setup-2.30.1-1.exe"
ExecWait "gedit\gedit-setup-2.30.1-1.exe"
; Copy to GEdit language specs
SetOutPath "$PROGRAMFILES\gedit\share\gtksourceview-2.0\language-specs"
File "prometeus.lang"
SectionEnd
; GEdit 3
Section /o "GEdit 3 (64-bit, latest and innovative)"
SetOutPath $INSTDIR\gedit
File "gedit\gedit-x86_64-3.13.4.exe"
ExecWait "gedit\gedit-x86_64-3.13.4.exe"
; Copy to GEdit language specs
SetOutPath "$PROGRAMFILES64\gedit\share\gtksourceview-3.0\language-specs"
File "prometeus.lang"
SectionEnd
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prometeus.LanguageSpec"
DeleteRegKey HKLM SOFTWARE\R7\Prometeus.LanguageSpec
; Delete files
Delete "$INSTDIR\*.*"
Delete "$INSTDIR\gedit\*.*"
; Remove directories used
RMDir "$INSTDIR\gedit"
RMDir "$INSTDIR"
SectionEnd