-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwinfaker.nsi
58 lines (46 loc) · 1.83 KB
/
winfaker.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
Name ${APPNAME}
OutFile ${BLDDIR}\${APPNAME}.exe
InstallDir $PROGRAMFILES\${APPNAME}-${VERSION}-${BUILD}
SetCompressor bzip2
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
Section "${APPNAME}-${VERSION}-${BUILD} (required)"
SectionIn RO
SetOutPath $INSTDIR
File "${BLDDIR}\bin\faker.dll"
File "${BLDDIR}\bin\wglspheres.exe"
File "${DETOURSDIR}\bin\detoured.dll"
File "${DETOURSDIR}\bin\withdll.exe"
File ".\vglrun.bat"
File ".\LICENSE.txt"
File ".\LGPL.txt"
File "LICENSE-DetoursExpress.txt"
File "${DETOURSDIR}\README.TXT"
File "${DETOURSDIR}\REDIST.TXT"
WriteRegStr HKLM "SOFTWARE\${APPNAME}-${VERSION}-${BUILD}" "Install_Dir" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}-${VERSION}-${BUILD}" "DisplayName" "${APPNAME} v${VERSION} (${BUILD})"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}-${VERSION}-${BUILD}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}-${VERSION}-${BUILD}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}-${VERSION}-${BUILD}" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
Section "Uninstall"
SetShellVarContext all
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}-${VERSION}-${BUILD}"
DeleteRegKey HKLM "SOFTWARE\${APPNAME}-${VERSION}-${BUILD}"
Delete $INSTDIR\faker.dll
Delete $INSTDIR\wglspheres.exe
Delete $INSTDIR\nettest.exe
Delete $INSTDIR\detoured.dll
Delete $INSTDIR\withdll.exe
Delete $INSTDIR\vglrun.bat
Delete $INSTDIR\LICENSE.txt
Delete $INSTDIR\LGPL.txt
Delete $INSTDIR\LICENSE-DetoursExpress.txt
Delete $INSTDIR\README.TXT
Delete $INSTDIR\REDIST.TXT
Delete $INSTDIR\uninstall.exe
RMDir "$INSTDIR"
SectionEnd