-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.nsi
64 lines (49 loc) · 1.93 KB
/
installer.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
SetCompressor /FINAL zlib
Name "ANAM Desktop Installer"
OutFile "ANAM Desktop Installer-{VERSION}.exe"
;InstallDir "$PROGRAMFILES64\ANAM Desktop"
InstallDir "C:\ANAM Desktop"
; Request application privileges for Windows Vista
RequestExecutionLevel user ; admin
;--------------------------------
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
Function .onInit
Var /GLOBAL exename
StrCpy $exename "ANAM Desktop.exe"
FunctionEnd
Section "" ;No components page, name is not important
SetOutPath "$INSTDIR"
File /oname=$exename "dist\ANAM Desktop.exe"
File "anam-desktop.settings"
File "Aide ANAM Desktop.pdf"
CreateDirectory "$INSTDIR\img"
File /oname=img\anam-desktop.png img\anam-desktop.png
File /oname=img\anam-desktop.ico img\anam-desktop.ico
File /oname=vc_redist.x64-2015.exe extras\VCruntime\vc_redist.x64-2015.exe
File /r "oraclient_win64"
WriteUninstaller $INSTDIR\uninstaller.exe
CreateDirectory "$SMPROGRAMS\ANAM Desktop"
CreateShortcut "$SMPROGRAMS\ANAM Desktop\ANAM Desktop.lnk" "$INSTDIR\ANAM Desktop.exe" "" "$INSTDIR\img\anam-desktop.ico"
CreateShortcut "$SMPROGRAMS\ANAM Desktop\Uninstall.lnk" "$INSTDIR\uninstaller.exe"
; install VisualC++ runtime 2015 (v14)
ExecWait '"$INSTDIR\vc_redist.x64-2015.exe" /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qb' $0
SectionEnd
Section "Uninstall"
Delete $INSTDIR\uninstaller.exe
Delete "$INSTDIR\ANAM Desktop.exe"
Delete $INSTDIR\anam-desk.settings
RMDir /r $INSTDIR\img
Delete "$INSTDIR\vc_redist.x64-2015.exe"
RMDir /r $INSTDIR\oraclient_win64
Delete $INSTDIR\anam-desktop.log
Delete $INSTDIR\erreurs-copie.log
Delete "Aide ANAM Desktop.pdf"
RMDir $INSTDIR
Delete "$SMPROGRAMS\ANAM Desktop\ANAM Desktop.lnk"
Delete "$SMPROGRAMS\ANAM Desktop\Uninstall.lnk"
RMDir "$SMPROGRAMS\ANAM Desktop"
SectionEnd