Make the GlobalRegistryDir setting a compile time option

Dimitrie O. Paun dimi at intelliware.ca
Fri Sep 19 16:03:17 CDT 2003


There is no point in having the GlobalRegistryDir be stored
in the registry. We have to start from somewhere, and right
now we start from the config file, but that is going away.

Besides, it shouldn't be too easy to change this value, it
will cause only confusion.

ChangeLog
    Dimitrie O. Paun <dpaun at rogers.com>
    Make the location of the registry file a compile time setting.

Index: misc/registry.c
===================================================================
RCS file: /var/cvs/wine/misc/registry.c,v
retrieving revision 1.132
diff -u -r1.132 registry.c
--- misc/registry.c	18 Sep 2003 23:27:20 -0000	1.132
+++ misc/registry.c	19 Sep 2003 20:58:50 -0000
@@ -1674,7 +1674,6 @@
     static const WCHAR SaveOnlyUpdatedKeysW[] = {'S','a','v','e','O','n','l','y','U','p','d','a','t','e','d','K','e','y','s',0};
     static const WCHAR PeriodicSaveW[] = {'P','e','r','i','o','d','i','c','S','a','v','e',0};
     static const WCHAR WritetoHomeRegistryFilesW[] = {'W','r','i','t','e','t','o','H','o','m','e','R','e','g','i','s','t','r','y','F','i','l','e','s',0};
-    static const WCHAR GlobalRegistryDirW[] = {'G','l','o','b','a','l','R','e','g','i','s','t','r','y','D','i','r',0};
 
     TRACE("(void)\n");
 
@@ -1737,29 +1736,10 @@
     if (res)
     {
         /* load global registry files (stored in /etc/wine) */
-        char *p, configfile[MAX_PATHNAME_LEN];
-
-        /* Override ETCDIR? */
-        configfile[0] = 0;
-        RtlInitUnicodeString( &nameW, GlobalRegistryDirW );
-        if (!NtQueryValueKey( hkey_config, &nameW, KeyValuePartialInformation, tmp, sizeof(tmp), &count ))
-        {
-            WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)tmp)->Data;
-            RtlUnicodeToMultiByteN( configfile, sizeof(configfile), NULL, 
-                                    str, (strlenW(str) + 1) * sizeof(WCHAR));
-        }
-        if (configfile[0] != '/') strcpy(configfile, ETCDIR);
-
-        TRACE("GlobalRegistryDir is '%s'.\n", configfile);
-
-        /* Load the global HKU hive directly from sysconfdir */
-        p = configfile + strlen(configfile);
-        strcpy(p, SAVE_GLOBAL_REGBRANCH_USER_DEFAULT);
-        load_wine_registry( hkey_users, configfile );
+        load_wine_registry( hkey_users, ETCDIR SAVE_GLOBAL_REGBRANCH_USER_DEFAULT );
 
         /* Load the global machine defaults directly from sysconfdir */
-        strcpy(p, SAVE_GLOBAL_REGBRANCH_LOCAL_MACHINE);
-        load_wine_registry( hkey_local_machine, configfile );
+        load_wine_registry( hkey_local_machine, ETCDIR SAVE_GLOBAL_REGBRANCH_USER_DEFAULT );
     }
 
     _set_registry_levels(1,0,0);
-- 
Dimi.




More information about the wine-patches mailing list