Debian Codegraph @

Examples/Modern UI/WelcomeFinish.nsi

raw
1 ;NSIS Modern User Interface
2 ;Welcome/Finish Page Example Script
3 ;Written by Joost Verburg
4
5 ;--------------------------------
6 ;Include Modern UI
7
8 !include "MUI2.nsh"
9
10 ;--------------------------------
11 ;General
12
13 ;Name and file
14 Name "Modern UI Test"
15 OutFile "WelcomeFinish.exe"
16 Unicode True
17
18 ;Default installation folder
19 InstallDir "$LOCALAPPDATA\Modern UI Test"
20
21 ;Get installation folder from registry if available
22 InstallDirRegKey HKCU "Software\Modern UI Test" ""
23
24 ;Request application privileges for Windows Vista
25 RequestExecutionLevel user
26
27 ;--------------------------------
28 ;Interface Settings
29
30 !define MUI_ABORTWARNING
31
32 ;--------------------------------
33 ;Pages
34
35 !insertmacro MUI_PAGE_WELCOME
36 !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
37 !insertmacro MUI_PAGE_COMPONENTS
38 !insertmacro MUI_PAGE_DIRECTORY
39 !insertmacro MUI_PAGE_INSTFILES
40 !insertmacro MUI_PAGE_FINISH
41
42 !insertmacro MUI_UNPAGE_WELCOME
43 !insertmacro MUI_UNPAGE_CONFIRM
44 !insertmacro MUI_UNPAGE_INSTFILES
45 !insertmacro MUI_UNPAGE_FINISH
46
47 ;--------------------------------
48 ;Languages
49
50 !insertmacro MUI_LANGUAGE "English"
51
52 ;--------------------------------
53 ;Installer Sections
54
55 Section "Dummy Section" SecDummy
56
57 SetOutPath "$INSTDIR"
58
59 ;ADD YOUR OWN FILES HERE...
60
61 ;Store installation folder
62 WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
63
64 ;Create uninstaller
65 WriteUninstaller "$INSTDIR\Uninstall.exe"
66
67 SectionEnd
68
69 ;--------------------------------
70 ;Descriptions
71
72 ;Language strings
73 LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
74
75 ;Assign language strings to sections
76 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
77 !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
78 !insertmacro MUI_FUNCTION_DESCRIPTION_END
79
80 ;--------------------------------
81 ;Uninstaller Section
82
83 Section "Uninstall"
84
85 ;ADD YOUR OWN FILES HERE...
86
87 Delete "$INSTDIR\Uninstall.exe"
88
89 RMDir "$INSTDIR"
90
91 DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
92
93 SectionEnd