aboutsummaryrefslogtreecommitdiff
path: root/windowsRuntimeInstaller
diff options
context:
space:
mode:
authorLenny Komow <lenny@lunarg.com>2016-08-17 14:50:13 -0600
committerLenny Komow <lenny@lunarg.com>2016-08-17 14:52:34 -0600
commit5cf2d27bca81fb746697493a8e78bb9e582c2865 (patch)
treed34c725abed903231827bc459fc9c223c360392f /windowsRuntimeInstaller
parent0b515828658cea543302730eb9c4569af15684ad (diff)
downloadusermoji-5cf2d27bca81fb746697493a8e78bb9e582c2865.tar.xz
winsdk: Create layer registry if it doesn't exist
Diffstat (limited to 'windowsRuntimeInstaller')
-rw-r--r--windowsRuntimeInstaller/configure_runtime.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/windowsRuntimeInstaller/configure_runtime.c b/windowsRuntimeInstaller/configure_runtime.c
index 10cf5719..bc5a6b04 100644
--- a/windowsRuntimeInstaller/configure_runtime.c
+++ b/windowsRuntimeInstaller/configure_runtime.c
@@ -160,11 +160,11 @@ int update_registry_layers(FILE* log, enum Platform platform, const struct SDKVe
// extension (input) - The file extensions of the file to be updated
// path (input) - The directory of the file (usually System32 or SysWOW64)
// abi_major (input) - The ABI major version to be updated
-// leave_abi_major (input) - Whether or not the ABI number be left on the output filename
+// append_abi_major (input) - Whether or not the ABI number should be appended to the filename
// latest_version (output) - The version of the runtime which the file was updated to
// Returns: Zero on success, an error code on failure
int update_system_file(FILE* log, const char* name, const char* extension, const char* path,
- long abi_major, bool leave_abi_major, struct SDKVersion* latest_version);
+ long abi_major, bool append_abi_major, struct SDKVersion* latest_version);
// Update vulkan.dll and vulkaninfo.exe in all of the windows directories (System32 and SysWOW64)
//
@@ -225,8 +225,10 @@ int add_explicit_layers(FILE* log, const char* install_path, enum Platform platf
if(platform == PLATFORM_X64) {
flags |= KEY_WOW64_64KEY;
}
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",
- 0, flags, &hKey) != ERROR_SUCCESS) {
+
+ // Create (if needed) and open the explicit layer key
+ if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",
+ 0, NULL, REG_OPTION_NON_VOLATILE, flags, NULL, &hKey, NULL) != ERROR_SUCCESS) {
return 20;
}
@@ -476,8 +478,10 @@ int remove_explicit_layers(FILE* log, const char** install_paths, size_t count,
if(platform == PLATFORM_X64) {
flags |= KEY_WOW64_64KEY;
}
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",
- 0, flags, &hKey) != ERROR_SUCCESS) {
+
+ // Create (if needed) and open the explicit layer key
+ if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",
+ 0, NULL, REG_OPTION_NON_VOLATILE, flags, NULL, &hKey, NULL) != ERROR_SUCCESS) {
return 160;
}
@@ -553,6 +557,8 @@ int update_registry_layers(FILE* log, enum Platform platform, const struct SDKVe
return 0;
}
+//int update_system_file(FILE* log, const char* name, const char* extension, const char* path,
+// long abi_major, bool append_abi_major, struct SDKVersion* latest_version)
int update_system_file(FILE* log, const char* name, const char* extension, const char* path,
long abi_major, bool leave_abi_major, struct SDKVersion* latest_version)
{