Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bd3771c2
Commit
bd3771c2
authored
Mar 14, 1999
by
Nathan Zorich
Committed by
Alexandre Julliard
Mar 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow the file names and paths for the registry files (user.reg and
system.reg) to be specified in a [Registry] section of wine.ini or other config file.
parent
1dc7cbd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
registry.c
misc/registry.c
+47
-0
wine.ini
wine.ini
+7
-0
No files found.
misc/registry.c
View file @
bd3771c2
...
...
@@ -679,6 +679,8 @@ void SHELL_SaveRegistry( void )
char
buf
[
4
];
HKEY
hkey
;
int
all
;
int
usedCfgUser
=
0
;
int
usedCfgLM
=
0
;
TRACE
(
reg
,
"(void)
\n
"
);
...
...
@@ -703,11 +705,31 @@ void SHELL_SaveRegistry( void )
}
if
(
lstrcmpiA
(
buf
,
"yes"
))
all
=
1
;
/* Try saving a config file specified User.reg save/load name */
fn
=
xmalloc
(
MAX_PATHNAME_LEN
);
if
(
PROFILE_GetWineIniString
(
"Registry"
,
"UserFileName"
,
""
,
fn
,
MAX_PATHNAME_LEN
-
1
))
{
_savereg
(
lookup_hkey
(
HKEY_CURRENT_USER
),
fn
,
all
);
usedCfgUser
=
1
;
}
free
(
fn
);
/* Try saving a config file specified System.reg save/load name*/
fn
=
xmalloc
(
MAX_PATHNAME_LEN
);
if
(
PROFILE_GetWineIniString
(
"Registry"
,
"LocalMachineFileName"
,
""
,
fn
,
MAX_PATHNAME_LEN
-
1
)){
_savereg
(
lookup_hkey
(
HKEY_LOCAL_MACHINE
),
fn
,
all
);
usedCfgLM
=
1
;
}
free
(
fn
);
pwd
=
getpwuid
(
getuid
());
if
(
pwd
!=
NULL
&&
pwd
->
pw_dir
!=
NULL
)
{
char
*
tmp
;
/* Hack to disable double save */
if
(
usedCfgUser
==
0
){
fn
=
(
char
*
)
xmalloc
(
strlen
(
pwd
->
pw_dir
)
+
strlen
(
WINE_PREFIX
)
+
strlen
(
SAVE_CURRENT_USER
)
+
2
);
strcpy
(
fn
,
pwd
->
pw_dir
);
...
...
@@ -725,6 +747,12 @@ void SHELL_SaveRegistry( void )
}
free
(
tmp
);
free
(
fn
);
}
/* Hack to disable double save */
if
(
usedCfgLM
==
0
){
fn
=
(
char
*
)
xmalloc
(
strlen
(
pwd
->
pw_dir
)
+
strlen
(
WINE_PREFIX
)
+
strlen
(
SAVE_LOCAL_MACHINE
)
+
2
);
strcpy
(
fn
,
pwd
->
pw_dir
);
strcat
(
fn
,
WINE_PREFIX
"/"
SAVE_LOCAL_MACHINE
);
...
...
@@ -738,6 +766,8 @@ void SHELL_SaveRegistry( void )
}
free
(
tmp
);
free
(
fn
);
}
}
else
WARN
(
reg
,
"Failed to get homedirectory of UID %d.
\n
"
,
getuid
());
}
...
...
@@ -1743,7 +1773,24 @@ void SHELL_LoadRegistry( void )
/* load the user saved registries */
/* Try to load config file specified files */
fn
=
xmalloc
(
MAX_PATHNAME_LEN
);
if
(
PROFILE_GetWineIniString
(
"Registry"
,
"UserFileName"
,
""
,
fn
,
MAX_PATHNAME_LEN
-
1
))
{
_wine_loadreg
(
lookup_hkey
(
HKEY_CURRENT_USER
),
fn
,
0
);
}
free
(
fn
);
fn
=
xmalloc
(
MAX_PATHNAME_LEN
);
if
(
PROFILE_GetWineIniString
(
"Registry"
,
"LocalMachineFileName"
,
""
,
fn
,
MAX_PATHNAME_LEN
-
1
)){
_savereg
(
lookup_hkey
(
HKEY_LOCAL_MACHINE
),
fn
,
0
);
}
free
(
fn
);
/* FIXME: use getenv("HOME") or getpwuid(getuid())->pw_dir ?? */
/* FIXME: user's home/.wine/user.reg and system.reg files are not
blocked from loading not sure if we want to or not.*/
pwd
=
getpwuid
(
getuid
());
if
(
pwd
!=
NULL
&&
pwd
->
pw_dir
!=
NULL
)
{
...
...
wine.ini
View file @
bd3771c2
...
...
@@ -83,6 +83,13 @@ LPT3:=/dev/lp3
[spy]
Exclude
=
WM_SIZE;WM_TIMER;
[Registry]
; Paths must be given in /dir/dir/file.reg format.
; Wine will not understand dos file names here...
;UserFileName=xxx ; alternate registry file name (user.reg)
;LocalMachineFileName=xxx ; (system.reg)
[Tweak.Layout]
;; WineLook=xxx (supported styles are 'Win31'(default), 'Win95', 'Win98')
;WineLook=Win95
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment