forked from morkt/GARbro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GARbro.nsi
143 lines (127 loc) · 5.01 KB
/
GARbro.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Unicode true
!include "MUI2.nsh"
!define RELEASE_DIR bin\Release
Name "GARbro"
OutFile GARbro-setup.exe
RequestExecutionLevel admin
ShowInstDetails show
BrandingText "$(^Name)"
InstallDir "$PROGRAMFILES\$(^Name)"
Var StartMenuFolder
!define MUI_FINISHPAGE_SHOWREADME
;!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\README.txt
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create desktop shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortCut
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_STARTMENU GARbro $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
; Uninstaller
;!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Japanese"
!macro InstallSubDir dir
CreateDirectory $INSTDIR\${dir}
SetOutPath "$INSTDIR\${dir}"
File "${RELEASE_DIR}\${dir}\*.*"
!macroend
Function CreateDesktopShortCut
CreateShortCut "$DESKTOP\$(^Name).lnk" "$INSTDIR\GARbro.GUI.exe"
FunctionEnd
Section "install"
SetOutPath $INSTDIR
File "${RELEASE_DIR}\GARbro.GUI.exe"
File "${RELEASE_DIR}\GARbro.GUI.exe.config"
File "${RELEASE_DIR}\ArcExtra.dll"
File "${RELEASE_DIR}\ArcFormats.dll"
File "${RELEASE_DIR}\ArcFormats.dll.config"
File "${RELEASE_DIR}\ArcLegacy.dll"
File "${RELEASE_DIR}\Concentus.dll"
File "${RELEASE_DIR}\Concentus.Oggfile.dll"
File "${RELEASE_DIR}\GameRes.dll"
File "${RELEASE_DIR}\GameRes.dll.config"
File "${RELEASE_DIR}\ICSharpCode.SharpZipLib.dll"
File "${RELEASE_DIR}\Microsoft.Deployment.Compression.dll"
File "${RELEASE_DIR}\Microsoft.Deployment.Compression.Cab.dll"
File "${RELEASE_DIR}\Microsoft.WindowsAPICodePack.dll"
File "${RELEASE_DIR}\Microsoft.WindowsAPICodePack.Shell.dll"
File "${RELEASE_DIR}\NAudio.dll"
File "${RELEASE_DIR}\Net20.dll"
File "${RELEASE_DIR}\NVorbis.dll"
File "${RELEASE_DIR}\System.Data.SQLite.dll"
File "${RELEASE_DIR}\System.IO.FileSystem.dll"
File "${RELEASE_DIR}\System.Security.Cryptography.Primitives.dll"
File "${RELEASE_DIR}\System.Windows.Controls.Input.Toolkit.dll"
File "${RELEASE_DIR}\WPFToolkit.dll"
File "${RELEASE_DIR}\README.txt"
File "${RELEASE_DIR}\LICENSE.txt"
File "${RELEASE_DIR}\supported.html"
!insertmacro InstallSubDir GameData
!insertmacro InstallSubDir ja-JP
!insertmacro InstallSubDir ko-KR
!insertmacro InstallSubDir ru-RU
!insertmacro InstallSubDir zh-Hans
!insertmacro InstallSubDir x64
!insertmacro InstallSubDir x86
SetOutPath $INSTDIR
WriteUninstaller "$INSTDIR\uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN GARbro
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(^Name).lnk" "$INSTDIR\GARbro.GUI.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Read me.lnk" "$INSTDIR\README.txt"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Supported formats.lnk" "$INSTDIR\supported.html"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall $(^Name).lnk" "$INSTDIR\uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section "uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER GARbro $StartMenuFolder
Delete "$SMPROGRAMS\$StartMenuFolder\$(^Name).lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Read me.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Supported formats.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall $(^Name).lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder"
Delete "$DESKTOP\$(^Name).lnk"
ClearErrors
Delete $INSTDIR\GARbro.GUI.exe
Delete $INSTDIR\GARbro.GUI.exe.config
Delete $INSTDIR\ArcExtra.dll
Delete $INSTDIR\ArcFormats.dll
Delete $INSTDIR\ArcFormats.dll.config
Delete $INSTDIR\ArcLegacy.dll
Delete $INSTDIR\Concentus.dll
Delete $INSTDIR\Concentus.Oggfile.dll
Delete $INSTDIR\GameRes.dll
Delete $INSTDIR\GameRes.dll.config
Delete $INSTDIR\ICSharpCode.SharpZipLib.dll
Delete $INSTDIR\Microsoft.Deployment.Compression.dll
Delete $INSTDIR\Microsoft.Deployment.Compression.Cab.dll
Delete $INSTDIR\Microsoft.WindowsAPICodePack.dll
Delete $INSTDIR\Microsoft.WindowsAPICodePack.Shell.dll
Delete $INSTDIR\NAudio.dll
Delete $INSTDIR\NVorbis.dll
Delete $INSTDIR\System.Data.SQLite.dll
Delete $INSTDIR\System.IO.FileSystem.dll
Delete $INSTDIR\System.Security.Cryptography.Primitives.dll
Delete $INSTDIR\System.Windows.Controls.Input.Toolkit.dll
Delete $INSTDIR\WPFToolkit.dll
Delete $INSTDIR\README.txt
Delete $INSTDIR\LICENSE.txt
Delete $INSTDIR\supported.html
Delete $INSTDIR\uninstall.exe
RMDir /r $INSTDIR\GameData
RMDir /r $INSTDIR\ja-JP
RMDir /r $INSTDIR\ko-KR
RMDir /r $INSTDIR\ru-RU
RMDir /r $INSTDIR\zh-Hans
RMDir /r $INSTDIR\x64
RMDir /r $INSTDIR\x86
RMDir $INSTDIR
SectionEnd