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
996baf63
Commit
996baf63
authored
Oct 09, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transmit the Windows PATH to child processes using the WINEPATH
variable.
parent
6ac4da7e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
directory.c
files/directory.c
+12
-8
environ.c
memory/environ.c
+9
-2
process.c
scheduler/process.c
+10
-3
No files found.
files/directory.c
View file @
996baf63
...
...
@@ -160,17 +160,21 @@ int DIR_Init(void)
DRIVE_Chdir
(
drive
,
DIR_Windows
.
short_name
+
2
);
}
PROFILE_GetWineIniString
(
wineW
,
pathW
,
path_dirW
,
longpath
,
MAX_PATHNAME_LEN
);
if
(
strchrW
(
longpath
,
'/'
))
/* Set the environment variables */
/* set PATH only if not set already */
if
(
!
GetEnvironmentVariableW
(
path_capsW
,
longpath
,
MAX_PATHNAME_LEN
))
{
MESSAGE
(
"Fix your wine config to use DOS drive syntax in [wine] 'Path=' statement! (no '/' allowed)
\n
"
);
PROFILE_UsageWineIni
();
ExitProcess
(
1
);
PROFILE_GetWineIniString
(
wineW
,
pathW
,
path_dirW
,
longpath
,
MAX_PATHNAME_LEN
);
if
(
strchrW
(
longpath
,
'/'
))
{
MESSAGE
(
"Fix your wine config to use DOS drive syntax in [wine] 'Path=' statement! (no '/' allowed)
\n
"
);
PROFILE_UsageWineIni
();
ExitProcess
(
1
);
}
SetEnvironmentVariableW
(
path_capsW
,
longpath
);
}
/* Set the environment variables */
SetEnvironmentVariableW
(
path_capsW
,
longpath
);
SetEnvironmentVariableW
(
temp_capsW
,
tmp_dir
.
short_name
);
SetEnvironmentVariableW
(
tmp_capsW
,
tmp_dir
.
short_name
);
SetEnvironmentVariableW
(
windirW
,
DIR_Windows
.
short_name
);
...
...
memory/environ.c
View file @
996baf63
...
...
@@ -152,7 +152,11 @@ static BOOL build_environment(void)
/* Compute the total size of the Unix environment */
size
=
sizeof
(
BYTE
)
+
sizeof
(
WORD
)
+
sizeof
(
ENV_program_name
);
for
(
e
=
environ
;
*
e
;
e
++
)
size
+=
strlen
(
*
e
)
+
1
;
for
(
e
=
environ
;
*
e
;
e
++
)
{
if
(
!
memcmp
(
*
e
,
"PATH="
,
5
))
continue
;
size
+=
strlen
(
*
e
)
+
1
;
}
/* Now allocate the environment */
...
...
@@ -164,7 +168,10 @@ static BOOL build_environment(void)
for
(
e
=
environ
;
*
e
;
e
++
)
{
strcpy
(
p
,
*
e
);
/* skip Unix PATH and store WINEPATH as PATH */
if
(
!
memcmp
(
*
e
,
"PATH="
,
5
))
continue
;
if
(
!
memcmp
(
*
e
,
"WINEPATH="
,
9
))
strcpy
(
p
,
*
e
+
4
);
else
strcpy
(
p
,
*
e
);
p
+=
strlen
(
p
)
+
1
;
}
...
...
scheduler/process.c
View file @
996baf63
...
...
@@ -820,9 +820,16 @@ static char **build_envp( const char *env, const char *extra_env )
/* now put the Windows environment strings */
for
(
p
=
env
;
*
p
;
p
+=
strlen
(
p
)
+
1
)
{
if
(
memcmp
(
p
,
"PATH="
,
5
)
&&
memcmp
(
p
,
"HOME="
,
5
)
&&
memcmp
(
p
,
"WINEPREFIX="
,
11
))
*
envptr
++
=
(
char
*
)
p
;
if
(
!
memcmp
(
p
,
"PATH="
,
5
))
/* store PATH as WINEPATH */
{
char
*
winepath
=
malloc
(
strlen
(
p
)
+
5
);
strcpy
(
winepath
,
"WINE"
);
strcpy
(
winepath
+
4
,
p
);
*
envptr
++
=
winepath
;
}
else
if
(
memcmp
(
p
,
"HOME="
,
5
)
&&
memcmp
(
p
,
"WINEPATH="
,
9
)
&&
memcmp
(
p
,
"WINEPREFIX="
,
11
))
*
envptr
++
=
(
char
*
)
p
;
}
*
envptr
=
0
;
}
...
...
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