forked from realXtend/tundra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewer_player-installer.nsi
71 lines (49 loc) · 2.27 KB
/
viewer_player-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
!define VERSION "0.4.0-RC2"
Name "Naali Player ${VERSION}"
Page directory
Page instfiles
InstallDir "$PROGRAMFILES\Naali Player ${VERSION}"
VIProductVersion "${VERSION}"
OutFile "NaaliPlayer-0.4.0-RC2.exe"
XPStyle on
RequestExecutionLevel admin
SetCompressor /FINAL /SOLID lzma
Section ""
SetOutPath $INSTDIR
File /r buildplayer\*.*
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NaaliPlayer" \
"DisplayName" "NaaliPlayer"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NaaliPlayer" \
"DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NaaliPlayer" \
"UninstallString" "$INSTDIR\uninstaller.exe"
ExecWait '"$INSTDIR\oalinst.exe"'
ExecWait '"$INSTDIR\vcredist_x86.exe" /q'
ExecWait '"$INSTDIR\dxwebsetup.exe"'
WriteUninstaller "$INSTDIR\uninstaller.exe"
Delete "$INSTDIR\vcredist_x86.exe"
Delete "$INSTDIR\oalinst.exe"
Delete "$INSTDIR\dxwebsetup.exe"
# write permissions .\tmp folder to normal users:
# this enabled some tts voices of Festival.exe
AccessControl::GrantOnFile "$INSTDIR\tmp" "(BU)" "GenericRead + GenericWrite"
SectionEnd
Section "Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\Naali Player ${VERSION}"
CreateShortCut "$SMPROGRAMS\Naali Player ${VERSION}\Naali Player ${VERSION}.lnk" "$INSTDIR\viewerp.exe"
CreateShortCut "$SMPROGRAMS\Naali Player ${VERSION}\Readme.lnk" "$INSTDIR\readme.txt"
CreateShortCut "$SMPROGRAMS\Naali Player ${VERSION}\Uninstall.lnk" "$INSTDIR\uninstaller.exe"
SectionEnd
Section "Uninstall"
RMDir /r $INSTDIR
#removing the APPDATA\roaming\realxtend doesn't seem to work properly on Vista. (maybe incorrect user information is given through add/remove programs)
# LETS EVEN PROMPT USER IF HE WANT TO REMOVE ALL PERSONAL REX DATA (ether, old viewer data, assets, textures) BEFORE WE GO AHEAD AND DELETE THEM
#SetShellVarContext all
#RMDir /r "$APPDATA\Roaming\realXtend"
#RMDir /r "$SMPROGRAMS\Naali ${VERSION}"
#SetShellVarContext current
#RMDir /r "$APPDATA\Roaming\realXtend"
#RMDir /r "$SMPROGRAMS\Naali ${VERSION}"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NaaliPlayer"
SectionEnd