aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-01-15 12:35:39 -0700
committerMark Young <marky@lunarg.com>2016-01-25 16:04:01 -0700
commit0c8dcac1066dd3bb5c49b155eaaa867cdee229e2 (patch)
tree626230d4c20394e2f113f102624833562016ffd4
parente3625745c4ecc9923ee3c9b2eabea852143ff3aa (diff)
downloadusermoji-0c8dcac1066dd3bb5c49b155eaaa867cdee229e2.tar.xz
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.
-rw-r--r--BUILD.md24
-rwxr-xr-xupdate_external_sources.bat2
-rw-r--r--windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps189
-rw-r--r--windowsRuntimeInstaller/InstallerRT.nsi14
4 files changed, 84 insertions, 45 deletions
diff --git a/BUILD.md b/BUILD.md
index 47e914c2..7b71e1f2 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -351,10 +351,10 @@ Optional software packages:
Cygwin is used in order to obtain a local copy of the Git repository, and to run the CMake command that creates Visual Studio files. Visual Studio is used to build the software, and will re-run CMake as appropriate.
-Example debug build (e.g. in a "Developer Command Prompt for VS2013" window):
+Example debug x64 build (e.g. in a "Developer Command Prompt for VS2013" window):
```
cd LoaderAndTools # cd to the root of the Vulkan git repository
-update_external_sources.bat --build-glslang
+update_external_sources.bat --all
mkdir build
cd build
cmake -G "Visual Studio 12 Win64" ..
@@ -370,4 +370,22 @@ repository. See the file:
https://gitlab.khronos.org/vulkan/vulkan/blob/master/ecosystem/WindowsICDs.txt
This specification describes both how ICDs and layers should be properly
-packaged, and how developers can point to ICDs and layers within their builds. \ No newline at end of file
+packaged, and how developers can point to ICDs and layers within their builds.
+
+### Windows 64-bit Installation Notes
+If you plan on creating a Windows Install file (done in the windowsRuntimeInstaller sub-directory) you will need to build for both 32-bit and 64-bit Windows since both versions of EXEs and DLLs exist simultaneously on Windows 64.
+
+To do this, simply create and build the release versions of each target:
+```
+cd LoaderAndTools # cd to the root of the Vulkan git repository
+update_external_sources.bat --all
+mkdir build
+cd build
+cmake -G "Visual Studio 12 Win64" ..
+msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release
+mkdir build32
+cd build32
+cmake -G "Visual Studio 12" ..
+msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release
+```
+
diff --git a/update_external_sources.bat b/update_external_sources.bat
index c7be2407..029ae9b5 100755
--- a/update_external_sources.bat
+++ b/update_external_sources.bat
@@ -653,7 +653,7 @@ goto:eof
REM Cleanup any old directories lying around.
rmdir /s /q build32
rmdir /s /q build
-
+
echo Making 32-bit spirv-tools
echo *************************
mkdir build32
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-<abimajor>-*.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-<abimajor>-*.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-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.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