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" ..
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
+```
+
# from the file name. They are used later to find the path to the SDK\r
# install directory for the given filename.\r
\r
-$VulkanDllList=@()\r
-cd c:\WINDOWS\SYSTEM32\r
-dir -name vulkan-$majorabi-*.dll |\r
+function UpdateVulkanSysFolder($dir)\r
+{\r
+ # Push the current path on the stack and go to $dir\r
+ Push-Location -Path $dir\r
+ \r
+ # Create a list for all the DLLs in the folder\r
+ $VulkanDllList=@()\r
+ \r
+ # Find all DLL objects in this directory\r
+ dir -name vulkan-$majorabi-*.dll |\r
ForEach-Object {\r
$major=$_.Split('-')[2]\r
$majorOrig=$major\r
$VulkanDllList+="$major=$minor=$patch=$buildno=$prerelease=$prebuildno= $_ @$majorOrig@$minorOrig@$patchOrig@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@"\r
}\r
\r
-\r
-# If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file.\r
-# Copy the most recent vulkan*.dll (named in the last element of $VulkanDllList) to vulkan-$majorabi.dll.\r
-# Also copy the corresponding vulkaninfo-*.exe to vulkaninfo.exe.\r
-\r
-if ($VulkanDllList.Length -gt 0) {\r
-\r
- # Sort the list. The most recent vulkan-*.dll will be in the last element of the list.\r
- [array]::sort($VulkanDllList)\r
-\r
- # Put the name of the most recent vulkan-*.dll in $mrVulkanDLL.\r
- # The most recent vulkanDLL is the second word in the last element of the\r
- # sorted $VulkanDllList. Copy it to $vulkandll.\r
- $mrVulkanDll=$VulkanDLLList[-1].Split(' ')[1]\r
- copy $mrVulkanDll $vulkandll\r
-\r
- # Copy the most recent version of vulkaninfo-<abimajor>-*.exe to vulkaninfo.exe.\r
- # We create the source file name for the copy from $mrVulkanDll.\r
- $mrVulkaninfo=$mrVulkanDll -replace ".dll",".exe"\r
- $mrVulkaninfo=$mrVulkaninfo -replace "vulkan","vulkaninfo"\r
- copy $mrVulkaninfo vulkaninfo.exe\r
-\r
- # Create the name used in the registry for the SDK associated with $mrVulkanDll.\r
- $major=$VulkanDLLList[-1].Split('@')[1]\r
- $minor=$VulkanDLLList[-1].Split('@')[2]\r
- $patch=$VulkanDLLList[-1].Split('@')[3]\r
- $buildno=$VulkanDLLList[-1].Split('@')[4]\r
- $prerelease=$VulkanDLLList[-1].Split('@')[5]\r
- $prebuildno=$VulkanDLLList[-1].Split('@')[6]\r
- $sdkname="VulkanSDK"+$major + "." + $minor + "." + $patch + "." + $buildno\r
- if ($prerelease -ne "") {\r
- $sdkname=$sdkname + "." + $prerelease\r
- }\r
- if ($prebuildno -ne "") {\r
- $sdkname=$sdkname + "." + $prebuildno\r
+ # If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file.\r
+ # Copy the most recent vulkan*.dll (named in the last element of $VulkanDllList) to vulkan-$majorabi.dll.\r
+ # TODO: In the future, also copy the corresponding vulkaninfo-*.exe to vulkaninfo.exe.\r
+\r
+ if ($VulkanDllList.Length -gt 0) {\r
+\r
+ # Sort the list. The most recent vulkan-*.dll will be in the last element of the list.\r
+ [array]::sort($VulkanDllList)\r
+\r
+ # Put the name of the most recent vulkan-*.dll in $mrVulkanDLL.\r
+ # The most recent vulkanDLL is the second word in the last element of the\r
+ # sorted $VulkanDllList. Copy it to $vulkandll.\r
+ $mrVulkanDll=$VulkanDllList[-1].Split(' ')[1]\r
+ copy $mrVulkanDll $vulkandll\r
+\r
+ # Copy the most recent version of vulkaninfo-<abimajor>-*.exe to vulkaninfo.exe.\r
+ # We create the source file name for the copy from $mrVulkanDll.\r
+ $mrVulkaninfo=$mrVulkanDll -replace ".dll",".exe"\r
+ $mrVulkaninfo=$mrVulkaninfo -replace "vulkan","vulkaninfo"\r
+ copy $mrVulkaninfo vulkaninfo.exe\r
+ \r
+ # Create the name used in the registry for the SDK associated with $mrVulkanDll.\r
+ $major=$VulkanDLLList[-1].Split('@')[1]\r
+ $minor=$VulkanDLLList[-1].Split('@')[2]\r
+ $patch=$VulkanDLLList[-1].Split('@')[3]\r
+ $buildno=$VulkanDLLList[-1].Split('@')[4]\r
+ $prerelease=$VulkanDLLList[-1].Split('@')[5]\r
+ $prebuildno=$VulkanDLLList[-1].Split('@')[6]\r
+ $sdkname="VulkanSDK"+$major + "." + $minor + "." + $patch + "." + $buildno\r
+ if ($prerelease -ne "") {\r
+ $sdkname=$sdkname + "." + $prerelease\r
+ }\r
+ if ($prebuildno -ne "") {\r
+ $sdkname=$sdkname + "." + $prebuildno\r
+ }\r
}\r
+ \r
+ # Return to our previous folder\r
+ Pop-Location\r
}\r
\r
+# Update the SYSWOW64 and SYSTEM32 Vulkan items\r
+UpdateVulkanSysFolder c:\WINDOWS\SYSWOW64\r
+UpdateVulkanSysFolder c:\WINDOWS\SYSTEM32\r
\r
# Create an array of vulkan sdk install dirs\r
\r
!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}"
${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
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