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
d1e0782c
Commit
d1e0782c
authored
Mar 24, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the Unicode exe modes, and instead detect automatically which
mode to use based on the existence of main or wmain.
parent
9e4ed646
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
47 deletions
+23
-47
build.h
tools/winebuild/build.h
+1
-3
import.c
tools/winebuild/import.c
+0
-8
main.c
tools/winebuild/main.c
+0
-2
spec32.c
tools/winebuild/spec32.c
+16
-22
winebuild.man.in
tools/winebuild/winebuild.man.in
+6
-12
No files found.
tools/winebuild/build.h
View file @
d1e0782c
...
@@ -55,9 +55,7 @@ typedef enum
...
@@ -55,9 +55,7 @@ typedef enum
SPEC_MODE_DLL
,
SPEC_MODE_DLL
,
SPEC_MODE_NATIVE
,
SPEC_MODE_NATIVE
,
SPEC_MODE_GUIEXE
,
SPEC_MODE_GUIEXE
,
SPEC_MODE_CUIEXE
,
SPEC_MODE_CUIEXE
SPEC_MODE_GUIEXE_UNICODE
,
SPEC_MODE_CUIEXE_UNICODE
}
SPEC_MODE
;
}
SPEC_MODE
;
typedef
struct
typedef
struct
...
...
tools/winebuild/import.c
View file @
d1e0782c
...
@@ -456,14 +456,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
...
@@ -456,14 +456,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
case
SPEC_MODE_CUIEXE
:
case
SPEC_MODE_CUIEXE
:
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"ExitProcess"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"ExitProcess"
,
spec
);
break
;
break
;
case
SPEC_MODE_GUIEXE_UNICODE
:
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"GetCommandLineA"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"GetStartupInfoA"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"GetModuleHandleA"
,
spec
);
/* fall through */
case
SPEC_MODE_CUIEXE_UNICODE
:
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"ExitProcess"
,
spec
);
break
;
}
}
if
(
nb_delayed
)
if
(
nb_delayed
)
{
{
...
...
tools/winebuild/main.c
View file @
d1e0782c
...
@@ -271,8 +271,6 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
...
@@ -271,8 +271,6 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
case
'm'
:
case
'm'
:
if
(
!
strcmp
(
optarg
,
"gui"
))
spec
->
mode
=
SPEC_MODE_GUIEXE
;
if
(
!
strcmp
(
optarg
,
"gui"
))
spec
->
mode
=
SPEC_MODE_GUIEXE
;
else
if
(
!
strcmp
(
optarg
,
"cui"
))
spec
->
mode
=
SPEC_MODE_CUIEXE
;
else
if
(
!
strcmp
(
optarg
,
"cui"
))
spec
->
mode
=
SPEC_MODE_CUIEXE
;
else
if
(
!
strcmp
(
optarg
,
"guiw"
))
spec
->
mode
=
SPEC_MODE_GUIEXE_UNICODE
;
else
if
(
!
strcmp
(
optarg
,
"cuiw"
))
spec
->
mode
=
SPEC_MODE_CUIEXE_UNICODE
;
else
if
(
!
strcmp
(
optarg
,
"native"
))
spec
->
mode
=
SPEC_MODE_NATIVE
;
else
if
(
!
strcmp
(
optarg
,
"native"
))
spec
->
mode
=
SPEC_MODE_NATIVE
;
else
usage
(
1
);
else
usage
(
1
);
break
;
break
;
...
...
tools/winebuild/spec32.c
View file @
d1e0782c
...
@@ -643,7 +643,6 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
...
@@ -643,7 +643,6 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
subsystem
=
IMAGE_SUBSYSTEM_NATIVE
;
subsystem
=
IMAGE_SUBSYSTEM_NATIVE
;
break
;
break
;
case
SPEC_MODE_GUIEXE
:
case
SPEC_MODE_GUIEXE
:
case
SPEC_MODE_GUIEXE_UNICODE
:
if
(
!
init_func
)
init_func
=
"WinMain"
;
if
(
!
init_func
)
init_func
=
"WinMain"
;
fprintf
(
outfile
,
fprintf
(
outfile
,
"
\n
typedef struct {
\n
"
"
\n
typedef struct {
\n
"
...
@@ -688,36 +687,31 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
...
@@ -688,36 +687,31 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_GUI
;
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_GUI
;
break
;
break
;
case
SPEC_MODE_CUIEXE
:
case
SPEC_MODE_CUIEXE
:
if
(
!
init_func
)
init_func
=
"main"
;
if
(
init_func
)
fprintf
(
outfile
,
"extern int %s( int argc, char *argv[] );
\n
"
,
init_func
);
else
{
declare_weak_function
(
outfile
,
"main"
,
"int main( int argc, char *argv[] )"
);
declare_weak_function
(
outfile
,
"wmain"
,
"int wmain( int argc, unsigned short *argv[] )"
);
}
fprintf
(
outfile
,
fprintf
(
outfile
,
"
\n
extern void __stdcall ExitProcess(int);
\n
"
"
\n
extern void __stdcall ExitProcess(int);
\n
"
"static void __wine_exe_main(void)
\n
"
"static void __wine_exe_main(void)
\n
"
"{
\n
"
"{
\n
"
" int ret;
\n
"
" int ret;
\n
"
" extern int %s( int argc, char *argv[] );
\n
"
" if (__wine_spec_init_state == 1)
\n
"
" if (__wine_spec_init_state == 1)
\n
"
" _init( __wine_main_argc, __wine_main_argv, __wine_main_environ );
\n
"
" _init( __wine_main_argc, __wine_main_argv, __wine_main_environ );
\n
"
);
" ret = %s( __wine_main_argc, __wine_main_argv );
\n
"
if
(
init_func
)
" if (__wine_spec_init_state == 1) _fini();
\n
"
fprintf
(
outfile
,
" ExitProcess( ret );
\n
"
" ret = %s( __wine_main_argc, __wine_main_argv );
\n
"
,
init_func
);
"}
\n\n
"
,
init_func
,
init_func
);
else
init_func
=
"__wine_exe_main"
;
fprintf
(
outfile
,
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_CUI
;
" if (wmain) ret = wmain( __wine_main_argc, __wine_main_wargv );
\n
"
break
;
" else ret = main( __wine_main_argc, __wine_main_argv );
\n
"
);
case
SPEC_MODE_CUIEXE_UNICODE
:
if
(
!
init_func
)
init_func
=
"wmain"
;
fprintf
(
outfile
,
fprintf
(
outfile
,
"
\n
extern void __stdcall ExitProcess(int);
\n
"
"static void __wine_exe_main(void)
\n
"
"{
\n
"
" int ret;
\n
"
" extern int %s( int argc, unsigned short *argv[] );
\n
"
" if (__wine_spec_init_state == 1)
\n
"
" _init( __wine_main_argc, __wine_main_argv, __wine_main_environ );
\n
"
" ret = %s( __wine_main_argc, __wine_main_wargv );
\n
"
" if (__wine_spec_init_state == 1) _fini();
\n
"
" if (__wine_spec_init_state == 1) _fini();
\n
"
" ExitProcess( ret );
\n
"
" ExitProcess( ret );
\n
"
"}
\n\n
"
,
init_func
,
init_func
);
"}
\n\n
"
);
init_func
=
"__wine_exe_main"
;
init_func
=
"__wine_exe_main"
;
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_CUI
;
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_CUI
;
break
;
break
;
...
...
tools/winebuild/winebuild.man.in
View file @
d1e0782c
...
@@ -137,24 +137,18 @@ meaningful in \fB--dll\fR mode.
...
@@ -137,24 +137,18 @@ meaningful in \fB--dll\fR mode.
Set the executable or dll mode, which can be one of the following:
Set the executable or dll mode, which can be one of the following:
.br
.br
.B cui
.B cui
for a command line
ASCII
executable,
for a command line executable,
.br
.br
.B gui
.B gui
for a graphical ASCII executable,
for a graphical executable,
.br
.B cuiw
for a command line Unicode executable,
.br
.B guiw
for a graphical Unicode executable,
.br
.br
.B native
.B native
for a native-mode dll.
for a native-mode dll.
.br
.br
A command line executable entry point
is a normal C \fBmain\fR
The entry point of a command line executable
is a normal C \fBmain\fR
function. A
graphical executable has a \fBWinMain\fR entry point
function. A
\fBwmain\fR function can be used instead if you need the
instead. The ASCII/Unicode distinction applies to the strings that are
argument array to use Unicode strings. A graphical executable has a
passed to the
entry point.
\fBWinMain\fR
entry point.
.TP
.TP
.BI \-N,\ --dll-name= dllname
.BI \-N,\ --dll-name= dllname
Set the internal name of the module. It is only used in Win16
Set the internal name of the module. It is only used in Win16
...
...
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