# We first create an array, with one array element for each vulkan-*dll in\r
# C:\Windows\System32 (and C:\Windows\SysWOW64 on 64-bit systems), with each element\r
# containing:\r
-# <major>=<minor>=<patch>=<buildno>=<prerelease>=<prebuildno>=\r
+# <major>=<minor>=<patch>=<buildno>=<prebuildno>=<prerelease>=\r
# filename\r
# @<major>@<minor>@<patch>@<buildno>@<prerelease>@<prebuildno>@\r
# [Note that the above three lines are one element in the array.]\r
# The build identifiers separated by "=" are suitable for sorting, i.e.\r
# expanded to 10 digits with leading 0s. If <prerelease> or <prebuildno> are\r
# not specified, "zzzzzzzzzz" is substituted for them, so that they sort\r
-# to a position after those that do specify them.\r
+# to a position after those that do specify them. Note that <prerelease>\r
+# is "less significant" in the sort than <prebuildno>, and that <prerelease> is\r
+# always treated as an alpha string, even though it may contain numeric characters.\r
# The build identifiers separated by "@" are the original values extracted\r
# from the file name. They are used later to find the path to the SDK\r
# install directory for the given filename.\r
$minor = $minor.padleft(10,'0')\r
$patch = $patch.padleft(10,'0')\r
$buildno = $buildno.padleft(10,'0')\r
- $prerelease = $prerelease.padleft(10,'0')\r
+ $prerelease = $prerelease.padright(10,'z')\r
$prebuildno = $prebuildno.padleft(10,'0')\r
\r
# Add a new element to the $VulkanDllList array\r
echo "Adding $_ to Vulkan dll list " >>$log\r
- $script:VulkanDllList+="$major=$minor=$patch=$buildno=$prerelease=$prebuildno= $_ @$majorOrig@$minorOrig@$patchOrig@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@"\r
+ $script:VulkanDllList+="$major=$minor=$patch=$buildno=$prebuildno=$prerelease= $_ @$majorOrig@$minorOrig@$patchOrig@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@"\r
}\r
\r
# If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file.\r