-
Notifications
You must be signed in to change notification settings - Fork 4
/
object-viewer.nsi
95 lines (69 loc) · 2.8 KB
/
object-viewer.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
; Modern interface settings
!include "MUI.nsh"
!include "object-viewer.nsh"
; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\${APPNAME}"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "${APPNAME}-${APPVERSION}.exe"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL
Section "object viewer" Section1
; Set Section properties
SectionIn RO
SetOverwrite on
SetOutPath "$INSTDIR\object-viewer"
FILE "..\nel\lib\nel_drv_opengl_win_rd.dll"
; FILE "..\nel\lib\nel_drv_direct3d_win_rd.dll"
FILE "..\nel\lib\object_viewer_rd.dll"
FILE "..\nel\tools\3d\object_viewer_exe\ReleaseDebug\object_viewer.exe"
FILE "object_viewer.cfg"
FILE "..\wpkg\bin\stlport_vc645.dll"
; Set Section Files and Shortcuts
CreateDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\object viewer.lnk" "$INSTDIR\object-viewer\object_viewer.exe"
CreateShortCut "$SMPROGRAMS\${APPNAME}\About.lnk" "http://mtp-target.dyndns.org/wiki/index.php/Main/ObjectViewer"
SetOutPath "$INSTDIR\object-viewer\data"
FILE "client\cache\entity_pingoo_close.shape"
FILE "client\cache\entity_pingoo_open.shape"
FILE "..\mtp-target-original-data\texture\ping_ball_blue.tga"
FILE "..\mtp-target-original-data\texture\ping_ball_blue.psd"
;WriteUninstaller "$INSTDIR\Uninst.exe"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
SectionEnd
Section -FinishSection
WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
WriteRegStr HKCU "Software\${APPNAME}" "version" "${APPVERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Client"
; !insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Server"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;Uninstall section
Section Uninstall
;Remove from registry...
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
DeleteRegKey HKLM "SOFTWARE\${APPNAME}"
RmDir /r "$INSTDIR\object-viewer"
;Delete Start Menu Shortcuts
Delete "$SMPROGRAMS\${APPNAME}\*.*"
RmDir "$SMPROGRAMS\${APPNAME}"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${APPNAME}"
SectionEnd
BrandingText "plopida"
; eof