diff options
Diffstat (limited to 'windowsRuntimeInstaller')
| -rw-r--r-- | windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 | 72 | ||||
| -rw-r--r-- | windowsRuntimeInstaller/InstallerRT.nsi | 31 | ||||
| -rw-r--r-- | windowsRuntimeInstaller/README.txt | 1 |
3 files changed, 55 insertions, 49 deletions
diff --git a/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 b/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 index e5060474..5dbcbec8 100644 --- a/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 +++ b/windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1 @@ -39,27 +39,28 @@ $vulkandll = "vulkan-"+$majorabi+".dll" # The name of the versioned vulkan dll file is one of the following:
#
-# vulkan-<majorabi>-<major>-<minor>-<patch>-<prerelease>-<buildno>.dll
-# vulkan-<majorabi>-<major>-<minor>-<patch>-<prerelease>.dll
+# vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prerelease>-<prebuildno>
+# vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prerelease>
+# vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prebuildno>
# vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
-# vulkan-<majorabi>-<major>-<minor>-<patch>.dll
#
-# <majorabi>, <major>, <minor>, <patch>, and <buildno> are 1 to 10 digits.
-# <prerelease> is [A-Za-z0-9]*
-# If <buildno> is present, it identifies a prerelease, and will be
-# considered less recent than one with the same <major>, <minor>, and
-# <patch> numbers without the <buildno>.
+# <major>, <minor>, <patch>, <buildno> and <prebuildno> are 1 to 10 numeric digits.
+# <prerelease> is any combination of alpha and numeric characters.
+# If <prerelease> and/or <prebuildno> are present, this identifies a prerelease,
+# and the vulkan dll file will be considered less recent than one with the same
+# <major>, <minor>, <patch>, <buildno> numbers without the <prerelease> and/or
+# <prebuildno>.
# We first create an array, with one array element for each vulkan-*dll in
# C:\Windows\System32, with each element containing:
-# <major>=<minor>=<patch>=<prerelease>=<buildno>=
+# <major>=<minor>=<patch>=<buildno>=<prerelease>=<prebuildno>=
# filename
-# @<major>@<minor>@<patch>@<prerelease>@<buildno>@
+# @<major>@<minor>@<patch>@<buildno>@<prerelease>@<prebuildno>@
# [Note that the above three lines are one element in the array.]
# The build identifiers separated by "=" are suitable for sorting, i.e.
-# expanded to 10 digits with leading 0s. If <prerelease> or <buildno> are
-# not specified, 10 z characters are substituted for them, so that they sort
+# expanded to 10 digits with leading 0s. If <prerelease> or <prebuildno> are
+# not specified, "zzzzzzzzzz" is substituted for them, so that they sort
# to a position after those that do specify them.
# The build identifiers separated by "@" are the original values extracted
# from the file name. They are used later to find the path to the SDK
@@ -74,50 +75,52 @@ dir -name vulkan-$majorabi-*.dll | $minor=$_.Split('-')[3]
$minorOrig=$minor
$patch=$_.Split('-')[4]
+ $patchOrig=$patch
+ $buildno=$_.Split('-')[5]
- if ($patch -match ".dll") {
- # <prerelease> and <buildno> are not in the name
- $patch=$patch -replace ".dll",""
- $patchOrig=$patch
+ if ($buildno -match ".dll") {
+ # <prerelease> and <prebuildno> are not in the name
+ $buildno=$buildno -replace ".dll",""
+ $buildnoOrig=$buildno
$prerelease="z"*10
$prereleaseOrig=""
- $buildno="z"*10
- $buildnoOrig=""
+ $prebuildno="z"*10
+ $prebuildnoOrig=""
} else {
# We assume we don't have more than 5 dashes
$f=$_ -replace ".dll",""
- $patch=$f.Split('-')[4]
- $prerelease=$f.Split('-')[5]
- $buildno=$f.Split('-')[6]
- if ($buildno.Length -eq 0) {
+ $buildno=$f.Split('-')[5]
+ $prerelease=$f.Split('-')[6]
+ $prebuildno=$f.Split('-')[7]
+ if ($prebuildno.Length -eq 0) {
if ($prerelease -match "^[0-9]") {
- # prerelease starts with a digit, it must be the buildno
- $buildno=$prerelease
+ # prerelease starts with a digit, it must be the prebuildno
+ $prebuildno=$prerelease
$prerelease=""
}
}
- $patchOrig=$patch
$prereleaseOrig=$prerelease
- $buildnoOrig=$buildno
+ $prebuildnoOrig=$prebuildno
if ($prerelease.Length -eq 0) {
$prerelease="z"*10
}
- if ($buildno.Length -eq 0) {
- $buildno="z"*10
+ if ($prebuildno.Length -eq 0) {
+ $prebuildno="z"*10
}
}
$major = $major.padleft(10,'0')
$minor = $minor.padleft(10,'0')
$patch = $patch.padleft(10,'0')
- $prerelease = $prerelease.padleft(10,'0')
$buildno = $buildno.padleft(10,'0')
+ $prerelease = $prerelease.padleft(10,'0')
+ $prebuildno = $prebuildno.padleft(10,'0')
# Add a new element to the $VulkanDllList array
- $VulkanDllList+="$major=$minor=$patch=$prerelease=$buildno= $_ @$majorOrig@$minorOrig@$patchOrig@$prereleaseOrig@$buildnoOrig@"
+ $VulkanDllList+="$major=$minor=$patch=$buildno=$prerelease=$prebuildno= $_ @$majorOrig@$minorOrig@$patch@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@"
}
@@ -146,14 +149,15 @@ if ($VulkanDllList.Length -gt 0) { $major=$VulkanDLLList[-1].Split('@')[1]
$minor=$VulkanDLLList[-1].Split('@')[2]
$patch=$VulkanDLLList[-1].Split('@')[3]
- $prerelease=$VulkanDLLList[-1].Split('@')[4]
- $buildno=$VulkanDLLList[-1].Split('@')[5]
+ $buildno=$VulkanDLLList[-1].Split('@')[4]
+ $prerelease=$VulkanDLLList[-1].Split('@')[5]
+ $prebuildno=$VulkanDLLList[-1].Split('@')[6]
$sdkname="VulkanSDK"+$major + "." + $minor + "." + $patch
if ($prerelease -ne "") {
$sdkname=$sdkname + "." + $prerelease
}
- if ($buildno -ne "") {
- $sdkname=$sdkname + "." + $buildno
+ if ($prebuildno -ne "") {
+ $sdkname=$sdkname + "." + $prebuildno
}
}
diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi index 553959b8..27dab406 100644 --- a/windowsRuntimeInstaller/InstallerRT.nsi +++ b/windowsRuntimeInstaller/InstallerRT.nsi @@ -25,16 +25,18 @@ # Version information -# Set VERSION_PATCH to: -# x.pre.y for prereleases -# a single number for releases +# Set VERSION_BUILDNO to: +# x.pre.z for prereleases +# x for releases +# !define PRODUCTNAME "VulkanRT" !define VERSION_ABI_MAJOR "1" -!define VERSION_API_MAJOR "0" -!define VERSION_MINOR "10" -!define VERSION_PATCH "3.pre.1" -#!define VERSION_PATCH "1" -!define PRODUCTVERSION "${VERSION_API_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" +!define VERSION_API_MAJOR "1" +!define VERSION_MINOR "0" +!define VERSION_PATCH "1" +!define VERSION_BUILDNO "0.pre.1" +#!define VERSION_BUILDNO "0" +!define PRODUCTVERSION "${VERSION_API_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILDNO}" # Includes !include LogicLib.nsh @@ -195,8 +197,8 @@ Section SetRegView 64 # Set up version number for file names - ${StrRep} $0 ${VERSION_PATCH} "." "-" - StrCpy $FileVersion ${VERSION_ABI_MAJOR}-${VERSION_API_MAJOR}-${VERSION_MINOR}-$0 + ${StrRep} $0 ${VERSION_BUILDNO} "." "-" + StrCpy $FileVersion ${VERSION_ABI_MAJOR}-${VERSION_API_MAJOR}-${VERSION_MINOR}-${VERSION_PATCH}-$0 # Libraries SetOutPath $WINDIR\System32 @@ -243,7 +245,7 @@ Section WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "VersionABIMajor" ${VERSION_ABI_MAJOR} WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "VersionAPIMajor" ${VERSION_API_MAJOR} WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "VersionMinor" ${VERSION_MINOR} - WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "VersionMinor" ${VERSION_PATCH} + WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "VersionMinor" ${VERSION_PATCH}.${VERSION_BUILDNO} WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "EstimatedSize" ${ESTIMATEDSIZE} WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "DisplayIcon" "$\"$INSTDIR\${ICOFILE}$\"" @@ -267,8 +269,8 @@ Section "uninstall" SetOutPath "$INSTDIR" # Set up version number for file names - ${StrRep} $0 ${VERSION_PATCH} "." "-" - StrCpy $FileVersion ${VERSION_ABI_MAJOR}-${VERSION_API_MAJOR}-${VERSION_MINOR}-$0 + ${StrRep} $0 ${VERSION_BUILDNO} "." "-" + StrCpy $FileVersion ${VERSION_ABI_MAJOR}-${VERSION_API_MAJOR}-${VERSION_MINOR}-${VERSION_PATCH}-$0 # Decrement the number of times we have been installed. ReadRegDword $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "IC" @@ -286,9 +288,8 @@ Section "uninstall" Delete /REBOOTOK $WINDIR\System32\vulkaninfo.exe Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe" - # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>.dll + # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll - ${StrRep} $0 ${VERSION_PATCH} "." "-" Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll # Run the ConfigLayersAndVulkanDLL.ps1 script to: diff --git a/windowsRuntimeInstaller/README.txt b/windowsRuntimeInstaller/README.txt index e1ec989c..b8cf2d37 100644 --- a/windowsRuntimeInstaller/README.txt +++ b/windowsRuntimeInstaller/README.txt @@ -14,6 +14,7 @@ To build the Installer: !define VERSION_API_MAJOR
!define VERSION_MINOR
!define VERSION_PATCH
+ !define VERSION_BUILDNO
4. Right click on the InstallerRT.nsi file and select "Compile NSIS Script".
The Windows Vulkan Runtime Installer package file will be created in this
|
