-
Notifications
You must be signed in to change notification settings - Fork 17
/
Windows.nsi
76 lines (56 loc) · 2.72 KB
/
Windows.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
!include "MUI2.nsh"
!define MUI_ABORTWARNING
SetCompressor /SOLID /FINAL lzma
Name "cirQWizard"
RequestExecutionLevel highest
!include "build\tmp\version.nsh"
OutFile "build\cirqwizard-${VERSION}_x64.exe" ; Installer file name
!define MUI_ICON "src\main\resources\package\windows\cirQWizard.ico"
InstallDir $PROGRAMFILES64\cirQWizard
InstallDirRegKey HKCU "Software\cirQWizard" ""
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Section ;"Required"
SetOutPath $INSTDIR
File /r build\launch4j\*.*
File /r "C:\Program files\Java\jdk1.8.0_171\jre"
File "src\main\resources\package\windows\cirQWizard.ico"
WriteUninstaller $INSTDIR\uninstaller.exe
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard" "DisplayName" "cirQWizard"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard" "DisplayVersion" ${VERSION}
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard" "Publisher" "cirqwizard.org"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard" "DisplayIcon" "$\"$INSTDIR\cirQWizard.ico$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard" "UninstallString" "$\"$INSTDIR\uninstaller.exe$\""
WriteRegStr HKCU "Software\cirQWizard" "" $INSTDIR
SectionEnd
Section "Desktop Shortcut" SecDesktopShortcut
SetOutPath $DESKTOP
CreateShortCut $DESKTOP\cirQWizard.lnk $INSTDIR\cirqwizard.exe
SectionEnd
Section "Start Menu Entry" SecStartMenu
SetOutPath $STARTMENU\cirQWizard
CreateShortCut $STARTMENU\cirQWizard\cirQWizard.lnk $INSTDIR\cirqwizard.exe
CreateShortCut $STARTMENU\cirQWizard\Uninstall.lnk $INSTDIR\uninstaller.exe
SectionEnd
LangString DESC_DesktopShortcut ${LANG_ENGLISH} "A shortcut to cirQWizard on your desktop"
LangString DESC_StartMenu ${LANG_ENGLISH} "A shortcut to cirQWizard on in your start menu"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopShortcut} $(DESC_DesktopShortcut)
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_StartMenu)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Section "Uninstall" ; Uninstaller actions
Delete $INSTDIR\*.*
RMDir /r $INSTDIR
Delete $STARTMENU\cirQWizard\cirQWizard.lnk
RMDir /r $STARTMENU\cirQWizard
Delete $DESKTOP\cirQWizard.lnk
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\cirQWizard"
SectionEnd