-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathinstaller.nsi.in
68 lines (54 loc) · 2.17 KB
/
installer.nsi.in
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
!include x64.nsh
!ifdef WIN64
!define PROGNAME "@CMAKE_PROJECT_NAME@ 64-bit"
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@CMAKE_PROJECT_NAME@-@[email protected]"
InstallDir $PROGRAMFILES64\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@
!else
!define PROGNAME "@CMAKE_PROJECT_NAME@"
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@CMAKE_PROJECT_NAME@-@[email protected]"
InstallDir $PROGRAMFILES\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@
!endif
Name "${PROGNAME}"
SetCompressor bzip2
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
Section "@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@ (required)"
!ifdef WIN64
${If} ${RunningX64}
${DisableX64FSRedirection}
${Endif}
!endif
SectionIn RO
SetOutPath $INSTDIR
File "@CMAKE_BINARY_DIR@\bin\${BUILDDIR}tcbench.exe"
File "@CMAKE_BINARY_DIR@\bin\${BUILDDIR}nettest.exe"
File "@CMAKE_BINARY_DIR@\bin\${BUILDDIR}wglspheres.exe"
File "@CMAKE_SOURCE_DIR@\LGPL.txt"
File "@CMAKE_SOURCE_DIR@\LICENSE.txt"
WriteRegStr HKLM "SOFTWARE\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@" "Install_Dir" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@" "DisplayName" "${PROGNAME} v@VERSION@ (@BUILD@)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
Section "Uninstall"
!ifdef WIN64
${If} ${RunningX64}
${DisableX64FSRedirection}
${Endif}
!endif
SetShellVarContext all
ExecWait "$INSTDIR\vglclient.exe -killall"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@"
DeleteRegKey HKLM "SOFTWARE\@CMAKE_PROJECT_NAME@-@VERSION@-@BUILD@"
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\tcbench.exe
Delete $INSTDIR\nettest.exe
Delete $INSTDIR\wglspheres.exe
Delete $INSTDIR\LGPL.txt
Delete $INSTDIR\LICENSE.txt
RMDir "$INSTDIR"
SectionEnd