Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
11f361a2
Commit
11f361a2
authored
Nov 23, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed no longer needed PROFILE_LoadWineIni().
parent
ab163db7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
59 deletions
+36
-59
profile.c
files/profile.c
+36
-55
file.h
include/file.h
+0
-1
main.c
loader/main.c
+0
-3
No files found.
files/profile.c
View file @
11f361a2
...
...
@@ -83,14 +83,8 @@ static PROFILE *MRUProfile[N_CACHED_PROFILES]={NULL};
#define CurProfile (MRUProfile[0])
/* wine.ini config file registry root */
static
HKEY
wine_profile_key
;
#define PROFILE_MAX_LINE_LEN 1024
/* Wine profile: the profile file being used */
static
char
PROFILE_WineIniUsed
[
MAX_PATHNAME_LEN
]
=
""
;
/* Check for comments in profile */
#define IS_ENTRY_COMMENT(str) ((str)[0] == ';')
...
...
@@ -897,6 +891,41 @@ static BOOL PROFILE_SetString( LPCWSTR section_name, LPCWSTR key_name,
/***********************************************************************
* get_profile_key
*/
static
HKEY
get_profile_key
(
void
)
{
static
HKEY
profile_key
;
if
(
!
profile_key
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
HKEY
hkey
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
!
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Machine
\\
Software
\\
Wine
\\
Wine
\\
Config"
)
||
NtCreateKey
(
&
hkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
NULL
))
{
ERR
(
"Cannot create config registry key
\n
"
);
ExitProcess
(
1
);
}
RtlFreeUnicodeString
(
&
nameW
);
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
profile_key
,
hkey
,
0
))
NtClose
(
hkey
);
/* somebody beat us to it */
}
return
profile_key
;
}
/***********************************************************************
* PROFILE_GetWineIniString
*
* Get a config string from the wine.ini file.
...
...
@@ -910,7 +939,7 @@ int PROFILE_GetWineIniString( LPCWSTR section, LPCWSTR key_name,
UNICODE_STRING
nameW
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
wine_profile_key
;
attr
.
RootDirectory
=
get_profile_key
()
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
...
...
@@ -989,54 +1018,6 @@ int PROFILE_GetWineIniBool( LPCWSTR section, LPCWSTR key_name, int def )
/***********************************************************************
* PROFILE_LoadWineIni
*
* Load the old .winerc file.
*/
int
PROFILE_LoadWineIni
(
void
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
char
buffer
[
MAX_PATHNAME_LEN
];
const
char
*
p
;
FILE
*
f
;
HKEY
hKeySW
;
DWORD
disp
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
/* make sure HKLM\\Software\\Wine\\Wine exists as non-volatile key */
if
(
!
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Machine
\\
Software
\\
Wine
\\
Wine"
)
||
NtCreateKey
(
&
hKeySW
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
&
disp
))
{
ERR
(
"Cannot create config registry key
\n
"
);
ExitProcess
(
1
);
}
RtlFreeUnicodeString
(
&
nameW
);
NtClose
(
hKeySW
);
if
(
!
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Machine
\\
Software
\\
Wine
\\
Wine
\\
Config"
)
||
NtCreateKey
(
&
wine_profile_key
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
&
disp
))
{
ERR
(
"Cannot create config registry key
\n
"
);
ExitProcess
(
1
);
}
RtlFreeUnicodeString
(
&
nameW
);
if
(
disp
==
REG_OPENED_EXISTING_KEY
)
return
1
;
/* loaded by the server */
MESSAGE
(
"Can't open configuration file %s/config
\n
"
,
wine_get_config_dir
()
);
return
0
;
}
/***********************************************************************
* PROFILE_UsageWineIni
*
* Explain the wine.ini file to those who don't read documentation.
...
...
include/file.h
View file @
11f361a2
...
...
@@ -109,7 +109,6 @@ extern int DOSFS_FindNext( const char *path, const char *short_mask,
int
skip
,
WIN32_FIND_DATAA
*
entry
);
/* profile.c */
extern
int
PROFILE_LoadWineIni
(
void
);
extern
void
PROFILE_UsageWineIni
(
void
);
extern
int
PROFILE_GetWineIniString
(
LPCWSTR
section
,
LPCWSTR
key_name
,
LPCWSTR
def
,
LPWSTR
buffer
,
int
len
);
...
...
loader/main.c
View file @
11f361a2
...
...
@@ -67,9 +67,6 @@ BOOL MAIN_MainInit(void)
setbuf
(
stderr
,
NULL
);
setlocale
(
LC_CTYPE
,
""
);
/* Load the configuration file */
if
(
!
PROFILE_LoadWineIni
())
return
FALSE
;
/* Initialise DOS drives */
if
(
!
DRIVE_Init
())
return
FALSE
;
...
...
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