-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.nsi
73 lines (51 loc) · 2.3 KB
/
install.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
Unicode True
!include MUI2.nsh
Name "ictye-live-dm"
OutFile "ictye-live-dm-installer-x86_64.exe"
InstallDir "$PROGRAMFILES\ictye-live-dm"
Icon "icon.ico"
Var StartMenuFolder
!insertmacro MUI_LANGUAGE "SimpChinese"
;协议
!define MUI_LICENSEPAGE_TEXT_TOP "请阅读并同意此许可(写点废话不行嘛。。。。。。)"
!define MUI_LICENSEPAGE_BUTTON "下一步"
!define MUI_LICENSEPAGE_TEXT_BOTTOM "确保仔细阅读,同意此协议然后下一步喵"
!define MUI_LICENSEPAGE_RADIOBUTTONS
!define MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT "同意"
!define MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "我拒绝签字"
!insertmacro MUI_PAGE_LICENSE "LICENSE"
;开始菜单选单
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\ictye-live-dm"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!define MUI_ABORTWARNING
!define MUI_FINISHPAGE_NOAUTOCLOSE
RequestExecutionLevel admin
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
File /r "ictye-live-dm\src\*.*"
WriteUninstaller "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ictye-live-dm" "DisplayName" "ictye-live-dm"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ictye-live-dm" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ictye-live-dm" "DisplayName" "ictye-live-dm"
SetShellVarContext current
CreateShortCut "$DESKTOP\ictye-live-dm.lnk" "$INSTDIR\start.exe"
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\ictye-live-dm.lnk" "$INSTDIR\start.exe"
SectionEnd
Section "Uninstall"
Delete "$INSTDIR\uninstall.exe"
RMDir /r "$INSTDIR"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ictye-live-dm"
DeleteRegKey HKLM "Software\ictye-live-dm"
Delete "$SMPROGRAMS\$StartMenuFolder\ictye-live-dm.lnk"
Delete "$DESKTOP\ictye-live-dm.lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder"
StrCpy $0 $APPDATA
RMDir /r "$0/ictye-live-dm"
SectionEnd