winrtinstaller: sort in config script: <prerelease> is least significant
authorDavid Pinedo <david@lunarg.com>
Mon, 4 Apr 2016 17:43:50 +0000 (11:43 -0600)
committerDavid Pinedo <david@lunarg.com>
Tue, 5 Apr 2016 22:59:49 +0000 (16:59 -0600)
Also added execute permission to CreateInstallerRT.sh

windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1
windowsRuntimeInstaller/CreateInstallerRT.sh [changed mode: 0644->0755]

index 9df6a26..08768cc 100644 (file)
@@ -86,14 +86,16 @@ function notNumeric ($x) {
 # 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
@@ -206,12 +208,12 @@ function UpdateVulkanSysFolder([string]$dir, [int]$writeSdkName)
        $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
old mode 100644 (file)
new mode 100755 (executable)