-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathinstallNoSource.nsi
More file actions
123 lines (96 loc) · 4.3 KB
/
installNoSource.nsi
File metadata and controls
123 lines (96 loc) · 4.3 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
;setup names
!define PROGRAMNAME "Bridge Command 5.10"
!ifndef OUTPUTFILE
!define OUTPUTFILE "..\BridgeCommand5.10.4-alpha.1.exe"
!endif
!define INSTALLLOCATION "Bridge Command 5.10"
!define SMFOLDER "Bridge Command 5.10"
!define REGKEY "BridgeCommand5.10"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetCompressor /SOLID lzma
Name "${PROGRAMNAME}"
OutFile "${OUTPUTFILE}"
InstallDir "$PROGRAMFILES64\${INSTALLLOCATION}"
LicenseData "LICENSE"
Icon "..\src\Icon.ico"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
Page license
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
Section "Bridge Command (required)"
;set to all users for start menu
SetShellVarContext all
SectionIn RO
SetOutPath $INSTDIR
;include all files, excluding the .svn directories
File /r /x *.cpp /x *.hpp /x *.h /x *.rc /x *.bat /x *.aps /x *.depend /x *.layout /x *.cbp /x *.iobj /x *.ipdb /x *.pdb /x *.tmp /x *.gcc /x macOScopy /x makeAndBuildApp /x CMakeLists.txt /x createDeb /x "Visual Studio solution" /x Irrlicht_mingw.dll /x Irrlicht_mingw64.dll /x Irrlicht_VS.dll /x Irrlicht_VS64.dll /x libenet32.dll /x libenet64.dll /x CompilingLinuxAndMac.txt /x Makefile /x MakefileWithSound /x MakefileForDeb /x controller /x repeater /x editor /x launcher /x iniEditor /x multiplayerHub /x libs /x .svn /x .objs /x .git /x .gitignore /x EnetServer /x BridgeCommand.app /x *.db /x *.m /x *.nsi /x *.cscope_file_list /x RadarCache /x misc /x shiplights.ods /x gmon.out /x cscope.out /x Cubemaps_HLSL_Test /x Portsmouth /x StraitOfJuanDeFuca /x "h) Haro Strait" *.*
File /r /x src ..\doc
CreateDirectory "$SMPROGRAMS\${SMFOLDER}"
CreateShortCut "$SMPROGRAMS\${SMFOLDER}\${PROGRAMNAME}.lnk" "$INSTDIR\bridgecommand.exe"
CreateShortCut "$SMPROGRAMS\${SMFOLDER}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEY}" "DisplayName" "${PROGRAMNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEY}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEY}" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
Section "Uninstall"
;set to all users for start menu
SetShellVarContext all
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEY}"
; Remove files and uninstaller
RMDir /r "$INSTDIR\Models"
RMDir /r "$INSTDIR\Scenarios"
RMDir /r "$INSTDIR\media"
RMDir /r "$INSTDIR\world"
RMDir /r "$INSTDIR\shaders"
RMDir /r "$INSTDIR\doc"
RMDir /r "$INSTDIR\Sounds"
RMDir /r "$INSTDIR\Scripts"
Delete "$INSTDIR\bc5.ini"
Delete "$INSTDIR\LICENSE"
Delete "$INSTDIR\bridgecommand.exe"
Delete "$INSTDIR\bridgecommand-bc.exe"
Delete "$INSTDIR\bridgecommand-mc.exe"
Delete "$INSTDIR\bridgecommand-rp.exe"
Delete "$INSTDIR\bridgecommand-mh.exe"
Delete "$INSTDIR\bridgecommand-ed.exe"
Delete "$INSTDIR\bridgecommand-ini.exe"
Delete "$INSTDIR\bridgecommand-mh.exe"
Delete "$INSTDIR\Irrlicht.dll"
Delete "$INSTDIR\libsndfile-1.dll"
Delete "$INSTDIR\sndfile.dll"
Delete "$INSTDIR\portaudio_x86.dll"
Delete "$INSTDIR\portaudio_x64.dll"
Delete "$INSTDIR\libenet.dll"
Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\language-en.txt"
Delete "$INSTDIR\languageController-en.txt"
Delete "$INSTDIR\languageRepeater-en.txt"
Delete "$INSTDIR\languageLauncher-en.txt"
Delete "$INSTDIR\languageIniEditor-en.txt"
Delete "$INSTDIR\languageMultiplayer-en.txt"
Delete "$INSTDIR\language-fr.txt"
Delete "$INSTDIR\languageController-fr.txt"
Delete "$INSTDIR\languageRepeater-fr.txt"
Delete "$INSTDIR\languageLauncher-fr.txt"
Delete "$INSTDIR\languageIniEditor-fr.txt"
Delete "$INSTDIR\languageMultiplayer-fr.txt"
Delete "$INSTDIR\mph.ini"
Delete "$INSTDIR\map.ini"
Delete "$INSTDIR\repeater.ini"
Delete "$INSTDIR\README"
Delete "$INSTDIR\Icon.ico"
; Remove shortcuts, if any
;Delete "$SMPROGRAMS\${SMFOLDER}\Settings\*.*"
Delete "$SMPROGRAMS\${SMFOLDER}\*.*"
; Remove directories used
;RMDir "$SMPROGRAMS\${SMFOLDER}\Settings"
RMDir "$SMPROGRAMS\${SMFOLDER}"
RMDir "$INSTDIR"
SectionEnd