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
a82ce660
Commit
a82ce660
authored
Mar 04, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Support the --main-module option for stand-alone 16-bit modules.
parent
fda642d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
+27
-11
build.h
tools/winebuild/build.h
+1
-0
main.c
tools/winebuild/main.c
+10
-11
parser.c
tools/winebuild/parser.c
+10
-0
spec16.c
tools/winebuild/spec16.c
+6
-0
No files found.
tools/winebuild/build.h
View file @
a82ce660
...
...
@@ -89,6 +89,7 @@ typedef struct
char
*
file_name
;
/* file name of the dll */
char
*
dll_name
;
/* internal name of the dll */
char
*
init_func
;
/* initialization routine */
char
*
main_module
;
/* main Win32 module for Win16 specs */
SPEC_TYPE
type
;
/* type of dll (Win16/Win32) */
int
base
;
/* ordinal base */
int
limit
;
/* ordinal limit */
...
...
tools/winebuild/main.c
View file @
a82ce660
...
...
@@ -82,7 +82,6 @@ char *spec_file_name = NULL;
FILE
*
output_file
=
NULL
;
const
char
*
output_file_name
=
NULL
;
static
const
char
*
output_file_source_name
;
static
char
*
main_module
;
/* FIXME: to be removed */
char
*
as_command
=
NULL
;
char
*
ld_command
=
NULL
;
...
...
@@ -360,8 +359,7 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
else
force_pointer_size
=
8
;
break
;
case
'M'
:
spec
->
type
=
SPEC_WIN16
;
main_module
=
xstrdup
(
optarg
);
spec
->
main_module
=
xstrdup
(
optarg
);
break
;
case
'N'
:
spec
->
dll_name
=
xstrdup
(
optarg
);
...
...
@@ -586,24 +584,25 @@ int main(int argc, char **argv)
if
(
spec
->
subsystem
!=
IMAGE_SUBSYSTEM_NATIVE
)
spec
->
characteristics
|=
IMAGE_FILE_DLL
;
if
(
!
spec_file_name
)
fatal_error
(
"missing .spec file
\n
"
);
if
(
spec
->
type
==
SPEC_WIN32
&&
spec
->
main_module
)
/* embedded 16-bit module */
{
spec
->
type
=
SPEC_WIN16
;
load_resources
(
argv
,
spec
);
if
(
parse_input_file
(
spec
))
BuildSpec16File
(
spec
);
break
;
}
/* fall through */
case
MODE_EXE
:
load_resources
(
argv
,
spec
);
load_import_libs
(
argv
);
if
(
spec_file_name
&&
!
parse_input_file
(
spec
))
break
;
read_undef_symbols
(
spec
,
argv
);
switch
(
spec
->
type
)
{
case
SPEC_WIN16
:
if
(
!
main_module
)
{
read_undef_symbols
(
spec
,
argv
);
output_spec16_file
(
spec
);
}
else
BuildSpec16File
(
spec
);
output_spec16_file
(
spec
);
break
;
case
SPEC_WIN32
:
read_undef_symbols
(
spec
,
argv
);
BuildSpec32File
(
spec
);
break
;
default:
assert
(
0
);
...
...
tools/winebuild/parser.c
View file @
a82ce660
...
...
@@ -743,6 +743,16 @@ void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 )
odp
->
ordinal
=
1
;
odp
->
link_name
=
xstrdup
(
".L__wine_spec_dos_header"
);
if
(
spec16
->
main_module
)
{
odp
=
add_entry_point
(
spec32
);
odp
->
type
=
TYPE_EXTERN
;
odp
->
name
=
xstrdup
(
"__wine_spec_main_module"
);
odp
->
lineno
=
0
;
odp
->
ordinal
=
2
;
odp
->
link_name
=
xstrdup
(
".L__wine_spec_main_module"
);
}
assign_names
(
spec32
);
assign_ordinals
(
spec32
);
}
...
...
tools/winebuild/spec16.c
View file @
a82ce660
...
...
@@ -875,6 +875,12 @@ void output_spec16_file( DLLSPEC *spec16 )
output_exports
(
spec32
);
output_imports
(
spec16
);
output_resources
(
spec16
);
if
(
spec16
->
main_module
)
{
output
(
"
\n\t
%s
\n
"
,
get_asm_string_section
()
);
output
(
".L__wine_spec_main_module:
\n
"
);
output
(
"
\t
%s
\"
%s
\"\n
"
,
get_asm_string_keyword
(),
spec16
->
main_module
);
}
output_gnu_stack_note
();
free_dll_spec
(
spec32
);
}
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