From 0c8dcac1066dd3bb5c49b155eaaa867cdee229e2 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Fri, 15 Jan 2016 12:35:39 -0700 Subject: LOADER/INSTALLER: Add support for 32-bit install in Win64 installer Added ability to install 32-bit and 64-bit Loader into the Win64 installer. --- .../ConfigLayersAndVulkanDLL.ps1 | 89 +++++++++++++--------- windowsRuntimeInstaller/InstallerRT.nsi | 14 +++- 2 files changed, 62 insertions(+), 41 deletions(-) (limited to 'windowsRuntimeInstaller') diff --git a/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 b/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 index e8185f77..ce3ab233 100644 --- a/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 +++ b/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 @@ -66,9 +66,16 @@ $vulkandll = "vulkan-"+$majorabi+".dll" # from the file name. They are used later to find the path to the SDK # install directory for the given filename. -$VulkanDllList=@() -cd c:\WINDOWS\SYSTEM32 -dir -name vulkan-$majorabi-*.dll | +function UpdateVulkanSysFolder($dir) +{ + # Push the current path on the stack and go to $dir + Push-Location -Path $dir + + # Create a list for all the DLLs in the folder + $VulkanDllList=@() + + # Find all DLL objects in this directory + dir -name vulkan-$majorabi-*.dll | ForEach-Object { $major=$_.Split('-')[2] $majorOrig=$major @@ -124,44 +131,50 @@ dir -name vulkan-$majorabi-*.dll | $VulkanDllList+="$major=$minor=$patch=$buildno=$prerelease=$prebuildno= $_ @$majorOrig@$minorOrig@$patchOrig@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@" } - -# If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file. -# Copy the most recent vulkan*.dll (named in the last element of $VulkanDllList) to vulkan-$majorabi.dll. -# Also copy the corresponding vulkaninfo-*.exe to vulkaninfo.exe. - -if ($VulkanDllList.Length -gt 0) { - - # Sort the list. The most recent vulkan-*.dll will be in the last element of the list. - [array]::sort($VulkanDllList) - - # Put the name of the most recent vulkan-*.dll in $mrVulkanDLL. - # The most recent vulkanDLL is the second word in the last element of the - # sorted $VulkanDllList. Copy it to $vulkandll. - $mrVulkanDll=$VulkanDLLList[-1].Split(' ')[1] - copy $mrVulkanDll $vulkandll - - # Copy the most recent version of vulkaninfo--*.exe to vulkaninfo.exe. - # We create the source file name for the copy from $mrVulkanDll. - $mrVulkaninfo=$mrVulkanDll -replace ".dll",".exe" - $mrVulkaninfo=$mrVulkaninfo -replace "vulkan","vulkaninfo" - copy $mrVulkaninfo vulkaninfo.exe - - # Create the name used in the registry for the SDK associated with $mrVulkanDll. - $major=$VulkanDLLList[-1].Split('@')[1] - $minor=$VulkanDLLList[-1].Split('@')[2] - $patch=$VulkanDLLList[-1].Split('@')[3] - $buildno=$VulkanDLLList[-1].Split('@')[4] - $prerelease=$VulkanDLLList[-1].Split('@')[5] - $prebuildno=$VulkanDLLList[-1].Split('@')[6] - $sdkname="VulkanSDK"+$major + "." + $minor + "." + $patch + "." + $buildno - if ($prerelease -ne "") { - $sdkname=$sdkname + "." + $prerelease - } - if ($prebuildno -ne "") { - $sdkname=$sdkname + "." + $prebuildno + # If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file. + # Copy the most recent vulkan*.dll (named in the last element of $VulkanDllList) to vulkan-$majorabi.dll. + # TODO: In the future, also copy the corresponding vulkaninfo-*.exe to vulkaninfo.exe. + + if ($VulkanDllList.Length -gt 0) { + + # Sort the list. The most recent vulkan-*.dll will be in the last element of the list. + [array]::sort($VulkanDllList) + + # Put the name of the most recent vulkan-*.dll in $mrVulkanDLL. + # The most recent vulkanDLL is the second word in the last element of the + # sorted $VulkanDllList. Copy it to $vulkandll. + $mrVulkanDll=$VulkanDllList[-1].Split(' ')[1] + copy $mrVulkanDll $vulkandll + + # Copy the most recent version of vulkaninfo--*.exe to vulkaninfo.exe. + # We create the source file name for the copy from $mrVulkanDll. + $mrVulkaninfo=$mrVulkanDll -replace ".dll",".exe" + $mrVulkaninfo=$mrVulkaninfo -replace "vulkan","vulkaninfo" + copy $mrVulkaninfo vulkaninfo.exe + + # Create the name used in the registry for the SDK associated with $mrVulkanDll. + $major=$VulkanDLLList[-1].Split('@')[1] + $minor=$VulkanDLLList[-1].Split('@')[2] + $patch=$VulkanDLLList[-1].Split('@')[3] + $buildno=$VulkanDLLList[-1].Split('@')[4] + $prerelease=$VulkanDLLList[-1].Split('@')[5] + $prebuildno=$VulkanDLLList[-1].Split('@')[6] + $sdkname="VulkanSDK"+$major + "." + $minor + "." + $patch + "." + $buildno + if ($prerelease -ne "") { + $sdkname=$sdkname + "." + $prerelease + } + if ($prebuildno -ne "") { + $sdkname=$sdkname + "." + $prebuildno + } } + + # Return to our previous folder + Pop-Location } +# Update the SYSWOW64 and SYSTEM32 Vulkan items +UpdateVulkanSysFolder c:\WINDOWS\SYSWOW64 +UpdateVulkanSysFolder c:\WINDOWS\SYSTEM32 # Create an array of vulkan sdk install dirs diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi index 27dab406..8473042c 100644 --- a/windowsRuntimeInstaller/InstallerRT.nsi +++ b/windowsRuntimeInstaller/InstallerRT.nsi @@ -34,7 +34,7 @@ !define VERSION_API_MAJOR "1" !define VERSION_MINOR "0" !define VERSION_PATCH "1" -!define VERSION_BUILDNO "0.pre.1" +!define VERSION_BUILDNO "0.pre.2" #!define VERSION_BUILDNO "0" !define PRODUCTVERSION "${VERSION_API_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILDNO}" @@ -200,12 +200,18 @@ Section ${StrRep} $0 ${VERSION_BUILDNO} "." "-" StrCpy $FileVersion ${VERSION_ABI_MAJOR}-${VERSION_API_MAJOR}-${VERSION_MINOR}-${VERSION_PATCH}-$0 - # Libraries + # 32-bit DLLs/EXEs destined for SysWOW64 + ########################################## + 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 + + # 64-bit DLLs/EXEs + ########################################## SetOutPath $WINDIR\System32 File /oname=vulkan-$FileVersion.dll ..\build\loader\Release\vulkan-${VERSION_ABI_MAJOR}.dll # vulkaninfo.exe - SetOutPath $WINDIR\System32 File /oname=vulkaninfo-$FileVersion.exe ..\build\demos\Release\vulkaninfo.exe SetOutPath "$INSTDIR" File ..\build\demos\Release\vulkaninfo.exe @@ -289,6 +295,8 @@ Section "uninstall" Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe" # Delete vullkan dll files: vulkan-.dll and vulkan-----.dll + Delete /REBOOTOK $WINDIR\SysWow64\vulkan-${VERSION_ABI_MAJOR}.dll + Delete /REBOOTOK $WINDIR\SysWow64\vulkan-$FileVersion.dll Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll -- cgit v1.2.3