Added new "GlobalRegistryDir" option.
This commit is contained in:
parent
3e2217ca9a
commit
bbc2b5b9cc
|
@ -256,6 +256,15 @@ ln -sf /usr/local/etc/wine.userreg wine.userreg
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>GlobalRegistryDir</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Optional. Sets the path to look for the Global
|
||||||
|
Registry.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>LoadGlobalRegistryFiles</term>
|
<term>LoadGlobalRegistryFiles</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -220,6 +220,8 @@ WINE REGISTRY Version 2
|
||||||
[registry]
|
[registry]
|
||||||
;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
|
;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
|
||||||
;Defaults are read all, write to Home
|
;Defaults are read all, write to Home
|
||||||
|
; Where to find the global registries
|
||||||
|
;"GlobalRegistryDir" = "/etc";
|
||||||
; Global registries (stored in /etc)
|
; Global registries (stored in /etc)
|
||||||
"LoadGlobalRegistryFiles" = "Y"
|
"LoadGlobalRegistryFiles" = "Y"
|
||||||
; Home registries (stored in ~user/.wine/)
|
; Home registries (stored in ~user/.wine/)
|
||||||
|
|
|
@ -64,9 +64,8 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(reg);
|
WINE_DEFAULT_DEBUG_CHANNEL(reg);
|
||||||
|
|
||||||
/* FIXME: following defines should be configured global */
|
#define SAVE_GLOBAL_REGBRANCH_USER_DEFAULT "/wine.userreg"
|
||||||
#define SAVE_GLOBAL_REGBRANCH_USER_DEFAULT ETCDIR"/wine.userreg"
|
#define SAVE_GLOBAL_REGBRANCH_LOCAL_MACHINE "/wine.systemreg"
|
||||||
#define SAVE_GLOBAL_REGBRANCH_LOCAL_MACHINE ETCDIR"/wine.systemreg"
|
|
||||||
|
|
||||||
/* relative in ~user/.wine/ : */
|
/* relative in ~user/.wine/ : */
|
||||||
#define SAVE_LOCAL_REGBRANCH_CURRENT_USER "user.reg"
|
#define SAVE_LOCAL_REGBRANCH_CURRENT_USER "user.reg"
|
||||||
|
@ -1651,13 +1650,32 @@ static void _load_windows_registry( HKEY hkey_local_machine, HKEY hkey_current_u
|
||||||
/* load global registry files (stored in /etc/wine) [Internal] */
|
/* load global registry files (stored in /etc/wine) [Internal] */
|
||||||
static void _load_global_registry( HKEY hkey_local_machine, HKEY hkey_users )
|
static void _load_global_registry( HKEY hkey_local_machine, HKEY hkey_users )
|
||||||
{
|
{
|
||||||
|
WCHAR Wglobalregistrydir[MAX_PATHNAME_LEN];
|
||||||
|
char globalregistrydir[MAX_PATHNAME_LEN];
|
||||||
|
char configfile[MAX_PATHNAME_LEN];
|
||||||
|
static const WCHAR registryW[] = {'r','e','g','i','s','t','r','y',0};
|
||||||
|
static const WCHAR GlobalRegistryDirW[] = {'G','l','o','b','a','l','R','e','g','i','s','t','r','y','D','i','r',0};
|
||||||
|
static const WCHAR empty_strW[] = { 0 };
|
||||||
|
|
||||||
TRACE("(void)\n");
|
TRACE("(void)\n");
|
||||||
|
|
||||||
|
/* Override ETCDIR? */
|
||||||
|
PROFILE_GetWineIniString( registryW, GlobalRegistryDirW, empty_strW , Wglobalregistrydir, MAX_PATHNAME_LEN);
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, Wglobalregistrydir, -1, globalregistrydir, MAX_PATHNAME_LEN, NULL, NULL);
|
||||||
|
|
||||||
|
if (globalregistrydir[0] != '/') strcpy(globalregistrydir, ETCDIR);
|
||||||
|
|
||||||
|
TRACE("GlobalRegistryDir is '%s'.\n", globalregistrydir);
|
||||||
|
|
||||||
/* Load the global HKU hive directly from sysconfdir */
|
/* Load the global HKU hive directly from sysconfdir */
|
||||||
load_wine_registry( hkey_users, SAVE_GLOBAL_REGBRANCH_USER_DEFAULT );
|
strcpy(configfile, globalregistrydir);
|
||||||
|
strcat(configfile, SAVE_GLOBAL_REGBRANCH_USER_DEFAULT);
|
||||||
|
load_wine_registry( hkey_users, configfile );
|
||||||
|
|
||||||
/* Load the global machine defaults directly from sysconfdir */
|
/* Load the global machine defaults directly from sysconfdir */
|
||||||
load_wine_registry( hkey_local_machine, SAVE_GLOBAL_REGBRANCH_LOCAL_MACHINE );
|
strcpy(configfile, globalregistrydir);
|
||||||
|
strcat(configfile, SAVE_GLOBAL_REGBRANCH_LOCAL_MACHINE);
|
||||||
|
load_wine_registry( hkey_local_machine, configfile );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load home registry files (stored in ~/.wine) [Internal] */
|
/* load home registry files (stored in ~/.wine) [Internal] */
|
||||||
|
|
Loading…
Reference in New Issue