forked from yinghuocho/firefly-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firefly.nsi
82 lines (53 loc) · 1.79 KB
/
firefly.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
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "萤火虫翻墙代理"
; The file to write
OutFile "firefly-proxy-win-0.2.0-install.exe"
; The default installation directory
InstallDir $DESKTOP\Firefly
; Request application privileges for Windows Vista
RequestExecutionLevel user
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "萤火虫翻墙代理"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File /r "build\exe.win32-2.7\*.*"
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "开始菜单"
CreateDirectory "$SMPROGRAMS\Firefly"
CreateShortcut "$SMPROGRAMS\Firefly\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortcut "$SMPROGRAMS\Firefly\萤火虫翻墙代理.lnk" "$INSTDIR\firefly.exe"
SectionEnd
Section "快捷方式"
CreateShortcut "$DESKTOP\萤火虫翻墙代理.lnk" "$INSTDIR\firefly.exe"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove files and uninstaller
Delete "$INSTDIR\*.*"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\Firefly\*.*"
Delete "$DESKTOP\萤火虫翻墙代理.lnk"
; Remove directories used
RMDir /r "$SMPROGRAMS\Firefly"
RMDir /r "$INSTDIR"
SectionEnd