-
Notifications
You must be signed in to change notification settings - Fork 6
/
yass.nsi
69 lines (51 loc) · 1.96 KB
/
yass.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
!include "MUI.nsh"
!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
!define MUI_ICON "..\src\win32\yass.ico"
!define MUI_UNICON "..\src\win32\yass.ico"
!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
!insertmacro MUI_PAGE_LICENSE "..\GPL-2.0.rtf"
!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
!insertmacro MUI_PAGE_INSTFILES # Installing page.
!insertmacro MUI_PAGE_FINISH # Finished installation page.
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
# Name of the installer (usually the name of the application to install).
Name "Yet Another Shadow Socket"
# define name of installer
OutFile "yass-installer.exe"
# define installation directory
InstallDir $LOCALAPPDATA\YASS
# For removing Start Menu shortcut in Windows 7
RequestExecutionLevel user
# start default section
Section "Yet Another Shadow Socket"
# set the installation directory as the destination for the following actions
SetOutPath $INSTDIR
# create the uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
# point the new shortcut at the program uninstaller
CreateShortcut "$SMPROGRAMS\YASS.lnk" "$INSTDIR\yass.exe"
CreateShortcut "$SMPROGRAMS\YASS Uninstall.lnk" "$INSTDIR\uninstall.exe"
File "yass.exe"
File /nonfatal "crashpad_handler.exe"
# DLL PLACEHOLDER
File "LICENSE"
SectionEnd
# uninstaller section start
Section "uninstall"
# kill current process
ExecWait "TASKKILL /F /IM yass.exe /T"
# first, delete the uninstaller
Delete "$INSTDIR\uninstall.exe"
# second, remove the link from the start menu
Delete "$SMPROGRAMS\YASS.lnk"
Delete "$SMPROGRAMS\YASS Uninstall.lnk"
# delete the remaining files
Rmdir /r $INSTDIR
# uninstaller section end
SectionEnd