${Endif}
+ # Create our temp directory, with minimal permissions
+ SetOutPath "$TEMP\VulkanRT"
+ AccessControl::DisableFileInheritance $TEMP\VulkanRT
+ AccessControl::SetFileOwner $TEMP\VulkanRT "Administrators"
+ AccessControl::ClearOnFile $TEMP\VulkanRT "Administrators" "FullAccess"
+ AccessControl::SetOnFile $TEMP\VulkanRT "SYSTEM" "FullAccess"
+ AccessControl::GrantOnFile $TEMP\VulkanRT "Everyone" "ListDirectory"
+ AccessControl::GrantOnFile $TEMP\VulkanRT "Everyone" "GenericExecute"
+ AccessControl::GrantOnFile $TEMP\VulkanRT "Everyone" "GenericRead"
+ AccessControl::GrantOnFile $TEMP\VulkanRT "Everyone" "ReadAttributes"
+ StrCpy $1 10
+ Call CheckForError
+
+ # Check the registry to see if we are already installed
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "InstallDir"
# If the registry entry isn't there, it will throw an error as well as return a blank value. So, clear the errors.
${EndIf}
SetOutPath "$INSTDIR"
+ AccessControl::DisableFileInheritance $INSTDIR
+ AccessControl::SetFileOwner $INSTDIR "Administrators"
+ AccessControl::ClearOnFile $INSTDIR "Administrators" "FullAccess"
+ AccessControl::SetOnFile $INSTDIR "SYSTEM" "FullAccess"
+ AccessControl::GrantOnFile $INSTDIR "Everyone" "ListDirectory"
+ AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericExecute"
+ AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericRead"
+ AccessControl::GrantOnFile $INSTDIR "Everyone" "ReadAttributes"
File ${ICOFILE}
File VULKANRT_LICENSE.RTF
File LICENSE.txt
File ConfigLayersAndVulkanDLL.ps1
- StrCpy $1 10
+ StrCpy $1 15
Call CheckForError
# Add the signed uninstaller
File "Uninstall${PRODUCTNAME}.exe"
!endif
- StrCpy $1 11
+ StrCpy $1 20
Call CheckForError
# Reference count the number of times we have been installed.
WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 0
${EndIf}
- StrCpy $1 12
+ StrCpy $1 25
Call CheckForError
# Set up version number for file names
SetOutPath $WINDIR\SysWow64
File /oname=vulkan-$FileVersion.dll ..\build32\loader\Release\vulkan-${VERSION_ABI_MAJOR}.dll
File /oname=vulkaninfo-$FileVersion.exe ..\build32\demos\Release\vulkaninfo.exe
- StrCpy $1 13
+ StrCpy $1 30
Call CheckForError
# 64-bit DLLs/EXEs
##########################################
SetOutPath $WINDIR\System32
File /oname=vulkan-$FileVersion.dll ..\build\loader\Release\vulkan-${VERSION_ABI_MAJOR}.dll
- StrCpy $1 14
+ StrCpy $1 35
Call CheckForError
# vulkaninfo.exe
SetOutPath "$INSTDIR"
File ..\build\demos\Release\vulkaninfo.exe
File /oname=vulkaninfo32.exe ..\build32\demos\Release\vulkaninfo.exe
- StrCpy $1 15
+ StrCpy $1 40
Call CheckForError
# Run the ConfigLayersAndVulkanDLL.ps1 script to copy the most recent version of
${If} $PsErr != 0
SetErrors
${EndIf}
- StrCpy $1 16
+ StrCpy $1 45
Call CheckForError
# Else, running on a 32-bit OS machine
##########################################
SetOutPath $WINDIR\System32
File /oname=vulkan-$FileVersion.dll ..\build32\loader\Release\vulkan-${VERSION_ABI_MAJOR}.dll
- StrCpy $1 17
+ StrCpy $1 50
Call CheckForError
# vulkaninfo.exe
File /oname=vulkaninfo-$FileVersion.exe ..\build32\demos\Release\vulkaninfo.exe
SetOutPath "$INSTDIR"
File ..\build32\demos\Release\vulkaninfo.exe
- StrCpy $1 18
+ StrCpy $1 55
Call CheckForError
# Run the ConfigLayersAndVulkanDLL.ps1 script to copy the most recent version of
${If} $PsErr != 0
SetErrors
${EndIf}
- StrCpy $1 19
+ StrCpy $1 60
Call CheckForError
${Endif}
# If either x86 or x64 redistributables are not present, install redistributables.
# We install both resdistributables because we have found that the x86 redist
# will uninstall the x64 redist if the x64 redistrib is an old version. Amazing, isn't it?
- SetOutPath "$TEMP"
+ SetOutPath "$TEMP\VulkanRT"
${If} ${RunningX64}
File vcredist_x64.exe
- ExecWait '"$TEMP\vcredist_x64.exe" /quiet /norestart'
+ ExecWait '"$TEMP\VulkanRT\vcredist_x64.exe" /quiet /norestart'
${Endif}
File vcredist_x86.exe
- ExecWait '"$TEMP\vcredist_x86.exe" /quiet /norestart'
+ ExecWait '"$TEMP\VulkanRT\vcredist_x86.exe" /quiet /norestart'
${Endif}
- StrCpy $1 20
+ StrCpy $1 65
Call CheckForError
SectionEnd
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "InstallDir"
StrCpy $IDir $0
- StrCpy $1 21
+ StrCpy $1 70
Call un.CheckForError
SetOutPath "$IDir"
Delete /REBOOTOK "$IDir\vulkaninfo32.exe"
${EndIf}
- StrCpy $1 22
+ StrCpy $1 75
Call un.CheckForError
# Need to do a SetOutPath to something outside of install dir,
SetOutPath "$TEMP"
# Remove install directories
- Rmdir /REBOOTOK "$IDir"
+ StrCpy $0 "$IDir"
+ Call un.DeleteDirIfEmpty
StrCpy $0 "$PROGRAMFILES\${PRODUCTNAME}"
Call un.DeleteDirIfEmpty
ClearErrors
${Endif}
- StrCpy $1 23
+ StrCpy $1 80
Call un.CheckForError
+ # Remove temp dir
+ SetOutPath "$TEMP"
+ RmDir /R "$TEMP\VulkanRT"
+
SectionEnd
!endif
# Copy the uninstaller to a temp folder of our own creation so we can completely
# delete the old contents.
- SetOutPath "$TEMP\tempun"
- CopyFiles "$INSTDIR\Uninstall${PRODUCTNAME}.exe" "$TEMP\tempun"
+ SetOutPath "$TEMP\VulkanRT"
+ CopyFiles "$INSTDIR\Uninstall${PRODUCTNAME}.exe" "$TEMP\VulkanRT"
# No uninstall using the version in the temporary folder.
- ExecWait '"$TEMP\tempun\Uninstall${PRODUCTNAME}.exe" /S _?=$INSTDIR'
+ ExecWait '"$TEMP\VulkanRT\Uninstall${PRODUCTNAME}.exe" /S _?=$INSTDIR'
# Delete the copy of the uninstaller we ran
- Delete /REBOOTOK "$TEMP\tempun\Uninstall${PRODUCTNAME}.exe"
- RmDir /R /REBOOTOK "$TEMP\tempun"
+ Delete /REBOOTOK "$TEMP\VulkanRT\Uninstall${PRODUCTNAME}.exe"
+ RmDir /R /REBOOTOK "$TEMP\VulkanRT"
# Set an error message to output
SetErrorLevel $1
This folder contains the files required for building the Windows Vulkan\r
Runtime Installer Package.\r
\r
-To build the Installer:\r
+To build the Vulkan Runtime Installer:\r
\r
1. Install Nullsoft Install System version 3.0b1 or greater. (Available\r
from http://nsis.sourceforge.net/Download.)\r
\r
- 2. Build Vulkan LoaderAndTools as described in ../BUILD.md.\r
+ 2. Install the NSIS AccessControl plug-in. (Available from\r
+ http://nsis.sourceforge.net/AccessControl_plug-in.)\r
\r
- 3. Edit the InstallerRT.nsi file in this folder and modify the following\r
+ 3. Build Vulkan-LoaderAndValidationLayers as described in ../BUILD.md.\r
+\r
+ 4. Edit the InstallerRT.nsi file in this folder and modify the following\r
lines to match the version of the Windows Vulkan Runtime you wish to\r
build:\r
\r
!define VERSION_BUILDNO\r
!define PUBLISHER\r
\r
- 4. Edit the CreateInstaller.sh file and replace SIGNFILE with your\r
+ 5. Edit the CreateInstaller.sh file and replace SIGNFILE with your\r
command and necessary args for signing an executable. If you don't\r
wish to sign the uninstaller, you can comment out that line.\r
\r
- 5. Run the CreateInstaller.sh script from a Cygwin bash command prompt.\r
- The Windows Vulkan Runtime Installer package file will be created in\r
- this folder. The name of the installer file is\r
- VulkanRT-<version>-Installer.exe.\r
+ 6. Run the CreateInstaller.sh script from a Cygwin bash command prompt.\r
+ The Cygwin bash shell must be running as Administrator. The Windows\r
+ Vulkan Runtime Installer package file will be created in this folder.\r
+ The name of the installer file is VulkanRT-<version>-Installer.exe.\r
\r
\r
Some notes on the behavior of the Windows Vulkan Runtime Installer:\r