-
Notifications
You must be signed in to change notification settings - Fork 0
/
nsis.nsi
48 lines (34 loc) · 1.34 KB
/
nsis.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
!include MUI2.nsh
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Name 'MSFS Livery Tools'
# define name of installer
OutFile "MSFS_Livery_Tools_Installer.exe"
# define installation directory
InstallDir "$PROGRAMFILES\MSFS Livery Tools"
# For removing Start Menu shortcut in Windows 7
RequestExecutionLevel user
# start default section
Section
# set the installation directory as the destination for the following actions
SetOutPath $INSTDIR
File /r dist\*.*
CreateShortcut "$SMPROGRAMS\MSFS Livery Tools.lnk" "$INSTDIR\MSFS Livery Tools.bat" "" "$INSTDIR\resources\msfs livery tools.ico" 0 SW_SHOWMINIMIZED
# create the uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
# create a shortcut named "new shortcut" in the start menu programs directory
# point the new shortcut at the program uninstaller
CreateShortcut "$SMPROGRAMS\MSFS Livery Tools uninstaller.lnk" "$INSTDIR\uninstall.exe"
SectionEnd
# uninstaller section start
Section "uninstall"
Delete "$INSTDIR\*.*"
# first, delete the uninstaller
# Delete "$INSTDIR\uninstall.exe"
# second, remove the link from the start menu
Delete "$SMPROGRAMS\MSFS Livery Tools.lnk"
Delete "$SMPROGRAMS\MSFS Livery Tools uninstaller.lnk"
RMDir /r $INSTDIR
# uninstaller section end
SectionEnd