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
eafa3910
Commit
eafa3910
authored
Jan 25, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use argv[0] to locate the server executable.
parent
079fd72c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
23 deletions
+28
-23
dbgmain.c
debugger/dbgmain.c
+1
-2
stabs.c
debugger/stabs.c
+4
-7
crtdll_main.c
dlls/crtdll/crtdll_main.c
+1
-1
options.h
include/options.h
+1
-1
module.c
loader/dos/module.c
+1
-1
main.c
loader/main.c
+3
-0
main.c
misc/main.c
+3
-3
main.c
miscemu/main.c
+0
-7
client.c
scheduler/client.c
+13
-0
monitor.c
windows/x11drv/monitor.c
+1
-1
No files found.
debugger/dbgmain.c
View file @
eafa3910
...
...
@@ -199,7 +199,6 @@ test_pdbstuff()
int
main
(
int
argc
,
char
*
argv
[])
{
extern
char
*
DEBUG_argv0
;
SIGCONTEXT
reg
;
strcpy
(
vdv
,
"This is a test"
);
...
...
@@ -207,7 +206,7 @@ main(int argc, char * argv[])
vvv
.
whatsup
=
0
;
vvv
.
flag3
=
0
;
vvv
.
remain
=
0x401
;
DEBUG_
argv0
=
argv
[
0
];
argv0
=
argv
[
0
];
xxx
=
(
unsigned
int
*
)
&
vvv
;
yyy
=
xxx
+
5
;
xxx3
[
5
]
=
7
;
...
...
debugger/stabs.c
View file @
eafa3910
...
...
@@ -24,6 +24,7 @@
#define PATH_MAX _MAX_PATH
#endif
#include "options.h"
#include "debugger.h"
#if defined(__svr4__) || defined(__sun)
...
...
@@ -70,10 +71,6 @@
#define N_EXCL 0xc2
#define N_RBRAC 0xe0
/*
* Set so that we know the main executable name and path.
*/
char
*
DEBUG_argv0
;
struct
stab_nlist
{
union
{
...
...
@@ -1317,7 +1314,7 @@ int
DEBUG_ReadExecutableDbgInfo
(
void
)
{
Elf32_Ehdr
*
ehdr
;
c
har
*
exe_name
;
c
onst
char
*
exe_name
;
Elf32_Dyn
*
dynpnt
;
struct
r_debug
*
dbg_hdr
;
struct
link_map
*
lpnt
=
NULL
;
...
...
@@ -1329,7 +1326,7 @@ DEBUG_ReadExecutableDbgInfo(void)
int
rtn
=
FALSE
;
int
rowcount
;
exe_name
=
DEBUG_
argv0
;
exe_name
=
argv0
;
/*
* Make sure we can stat and open this file.
...
...
@@ -1426,7 +1423,7 @@ DEBUG_ReadExecutableDbgInfo(void)
int
status
;
unsigned
int
stroff
;
exe_name
=
DEBUG_
argv0
;
exe_name
=
argv0
;
/*
* Make sure we can stat and open this file.
...
...
dlls/crtdll/crtdll_main.c
View file @
eafa3910
...
...
@@ -971,7 +971,7 @@ INT __cdecl CRTDLL_system(LPSTR x)
unsigned
char
*
bp
;
int
i
;
sprintf
(
buffer
,
"%s
\"
"
,
Options
.
argv0
);
sprintf
(
buffer
,
"%s
\"
"
,
argv0
);
bp
=
buffer
+
strlen
(
buffer
);
i
=
strlen
(
buffer
)
+
strlen
(
x
)
+
2
;
...
...
include/options.h
View file @
eafa3910
...
...
@@ -58,7 +58,6 @@ struct options
char
**
argv
;
char
*
desktopGeometry
;
/* NULL when no desktop */
char
*
programName
;
/* To use when loading resources */
char
*
argv0
;
/* argv[0] of Wine process */
char
*
dllFlags
;
/* -dll flags (hack for Winelib support) */
int
usePrivateMap
;
int
useFixedMap
;
...
...
@@ -81,6 +80,7 @@ struct options
};
extern
struct
options
Options
;
extern
const
char
*
argv0
;
/* Profile functions */
...
...
loader/dos/module.c
View file @
eafa3910
...
...
@@ -432,7 +432,7 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask )
/* now load dosmod */
/* check argv[0]-derived paths first, since the newest dosmod is most likely there
* (at least it was once for Andreas Mohr, so I decided to make it easier for him) */
fpath
=
strrchr
(
strcpy
(
path
,
Options
.
argv0
),
'/'
);
fpath
=
strrchr
(
strcpy
(
path
,
argv0
),
'/'
);
if
(
fpath
)
{
strcpy
(
fpath
,
"/dosmod"
);
execl
(
path
,
fname
,
farg
,
NULL
);
...
...
loader/main.c
View file @
eafa3910
...
...
@@ -58,6 +58,9 @@ DEFAULT_DEBUG_CHANNEL(server)
*/
BOOL
MAIN_MainInit
(
int
*
argc
,
char
*
argv
[]
)
{
/* store the program name */
argv0
=
argv
[
0
];
/* Create the initial process */
if
(
!
PROCESS_Init
())
return
0
;
...
...
misc/main.c
View file @
eafa3910
...
...
@@ -84,7 +84,6 @@ struct options Options =
NULL
,
/* argv */
NULL
,
/* desktopGeometry */
NULL
,
/* programName */
NULL
,
/* argv0 */
NULL
,
/* dllFlags */
FALSE
,
/* usePrivateMap */
FALSE
,
/* useFixedMap */
...
...
@@ -107,7 +106,9 @@ struct options Options =
0
/* screenDepth */
};
static
char
szUsage
[]
=
const
char
*
argv0
;
static
const
char
szUsage
[]
=
"%s
\n
"
"Usage: %s [options]
\"
program_name [arguments]
\"\n
"
"
\n
"
...
...
@@ -737,7 +738,6 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
Options
.
argc
=
argc
;
Options
.
argv
=
argv
;
Options
.
programName
=
MAIN_GetProgramName
(
*
argc
,
argv
);
Options
.
argv0
=
argv
[
0
];
/* initialise Options.language to 0 to tell "no language choosen yet" */
Options
.
language
=
0
;
...
...
miscemu/main.c
View file @
eafa3910
...
...
@@ -107,13 +107,6 @@ void MAIN_EmulatorRun( void )
int
main
(
int
argc
,
char
*
argv
[]
)
{
NE_MODULE
*
pModule
;
extern
char
*
DEBUG_argv0
;
/*
* Save this so that the internal debugger can get a hold of it if
* it needs to.
*/
DEBUG_argv0
=
argv
[
0
];
/* Set up debugger hook */
EXC_SetDebugEventHook
(
wine_debugger
);
...
...
scheduler/client.c
View file @
eafa3910
...
...
@@ -307,9 +307,22 @@ static void start_server( const char *oldcwd )
if
(
pid
==
-
1
)
fatal_perror
(
"fork"
);
if
(
!
pid
)
{
char
*
path
,
*
p
;
/* first try the installation dir */
execl
(
BINDIR
"/wineserver"
,
"wineserver"
,
NULL
);
if
(
oldcwd
)
chdir
(
oldcwd
);
/* now try the dir we were launched from */
path
=
xmalloc
(
strlen
(
argv0
)
+
20
);
if
((
p
=
strrchr
(
strcpy
(
path
,
argv0
),
'/'
)))
{
strcpy
(
p
,
"/wineserver"
);
execl
(
path
,
"wineserver"
,
NULL
);
strcpy
(
p
,
"/server/wineserver"
);
execl
(
path
,
"wineserver"
,
NULL
);
}
/* now try the path */
execlp
(
"wineserver"
,
"wineserver"
,
NULL
);
/* and finally the current dir */
execl
(
"./server/wineserver"
,
"wineserver"
,
NULL
);
fatal_error
(
"could not exec wineserver
\n
"
);
}
...
...
windows/x11drv/monitor.c
View file @
eafa3910
...
...
@@ -114,7 +114,7 @@ static void X11DRV_MONITOR_CreateDesktop(MONITOR *pMonitor)
wm_hints
->
flags
=
InputHint
|
StateHint
;
wm_hints
->
input
=
True
;
wm_hints
->
initial_state
=
NormalState
;
class_hints
->
res_name
=
Options
.
argv
[
0
];
/* FIXME: Options.argv0 insteed? */
class_hints
->
res_name
=
argv0
;
class_hints
->
res_class
=
"Wine"
;
TSXStringListToTextProperty
(
&
name
,
1
,
&
window_name
);
...
...
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