Issue #2179: Get rid of the win32_use_hkcu flag.

Simply always check HKCU first. If that lookup did not yield any result,
fall back to HKLM.
This commit is contained in:
Simon Mueller 2018-09-10 23:56:01 +02:00 committed by Jehan
parent f7ac033777
commit 6a5023a38a
4 changed files with 5 additions and 12 deletions

View file

@ -98,7 +98,6 @@ init (void)
"DARKTABLE_EXECUTABLE",
"org.darktable",
REGISTRY_KEY_BASE,
FALSE,
&search_path);
gchar *argv[] = { exec_path, "--version", NULL };
gchar *darktable_stdout = NULL;
@ -380,7 +379,6 @@ load_image (const gchar *filename,
"DARKTABLE_EXECUTABLE",
"org.darktable",
REGISTRY_KEY_BASE,
FALSE,
&search_path);
gchar *argv[] =
{
@ -474,7 +472,6 @@ load_thumbnail_image (const gchar *filename,
"DARKTABLE_EXECUTABLE",
"org.darktable",
REGISTRY_KEY_BASE,
FALSE,
&search_path);
gchar *argv[] =
{

View file

@ -41,7 +41,6 @@ file_raw_get_executable_path (const gchar *main_executable,
const gchar *env_variable,
const gchar *mac_bundle_id,
const gchar *win32_registry_key_base,
gboolean win32_use_hkcu,
gboolean *search_path)
{
/*
@ -129,10 +128,11 @@ file_raw_get_executable_path (const gchar *main_executable,
else
registry_key = g_strconcat (win32_registry_key_base, ".exe", NULL);
if (win32_use_hkcu)
status = RegGetValue (HKEY_CURRENT_USER, registry_key, "", RRF_RT_ANY,
NULL, (PVOID)&path, &buffer_size);
else
/* Check HKCU first in case there is a user specific installation. */
status = RegGetValue (HKEY_CURRENT_USER, registry_key, "", RRF_RT_ANY,
NULL, (PVOID)&path, &buffer_size);
if (status != ERROR_SUCCESS)
status = RegGetValue (HKEY_LOCAL_MACHINE, registry_key, "", RRF_RT_ANY,
NULL, (PVOID)&path, &buffer_size);

View file

@ -27,7 +27,6 @@ gchar * file_raw_get_executable_path (const gchar *main_executable,
const gchar *env_variable,
const gchar *mac_bundle_id,
const gchar *win32_registry_key_base,
gboolean win32_use_hkcu,
gboolean *search_path);

View file

@ -96,7 +96,6 @@ init (void)
"RAWTHERAPEE_EXECUTABLE",
"com.rawtherapee.rawtherapee",
REGISTRY_KEY_BASE,
TRUE,
&search_path);
gchar *argv[] = { exec_path, "-v", NULL };
gchar *rawtherapee_stdout = NULL;
@ -300,7 +299,6 @@ load_image (const gchar *filename,
"RAWTHERAPEE_EXECUTABLE",
"com.rawtherapee.rawtherapee",
REGISTRY_KEY_BASE,
TRUE,
&search_path);
/* linear sRGB for now as GIMP uses that internally in many places anyway */
@ -407,7 +405,6 @@ load_thumbnail_image (const gchar *filename,
"RAWTHERAPEE_EXECUTABLE",
"com.rawtherapee.rawtherapee",
REGISTRY_KEY_BASE,
TRUE,
&search_path);
gchar *argv[] =
{