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
1662af11
Commit
1662af11
authored
Feb 16, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add support for winebuild --data-only option.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39f6ab55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
winegcc.c
tools/winegcc/winegcc.c
+29
-0
No files found.
tools/winegcc/winegcc.c
View file @
1662af11
...
...
@@ -171,6 +171,7 @@ struct options
int
nostartfiles
;
int
nodefaultlibs
;
int
noshortwchar
;
int
data_only
;
int
unix_lib
;
int
gui_app
;
int
unicode_app
;
...
...
@@ -1091,6 +1092,28 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
return
spec_o_name
;
}
/* run winebuild to generate a data-only library */
static
void
build_data_lib
(
struct
options
*
opts
,
const
char
*
spec_file
,
const
char
*
output_file
,
struct
strarray
files
)
{
unsigned
int
i
;
struct
strarray
spec_args
=
get_winebuild_args
(
opts
);
strarray_add
(
&
spec_args
,
opts
->
shared
?
"--dll"
:
"--exe"
);
strarray_add
(
&
spec_args
,
"-o"
);
strarray_add
(
&
spec_args
,
output_file
);
if
(
spec_file
)
{
strarray_add
(
&
spec_args
,
"-E"
);
strarray_add
(
&
spec_args
,
spec_file
);
}
/* add resource files */
for
(
i
=
0
;
i
<
files
.
count
;
i
++
)
if
(
files
.
str
[
i
][
1
]
==
'r'
)
strarray_add
(
&
spec_args
,
files
.
str
[
i
]);
spawn
(
opts
->
prefix
,
spec_args
,
0
);
}
static
void
build
(
struct
options
*
opts
)
{
struct
strarray
lib_dirs
=
empty_strarray
;
...
...
@@ -1246,6 +1269,11 @@ static void build(struct options* opts)
else
entry_point
=
opts
->
entry_point
;
/* run winebuild to generate the .spec.o file */
if
(
opts
->
data_only
)
{
build_data_lib
(
opts
,
spec_file
,
output_file
,
files
);
return
;
}
if
(
spec_file
||
!
opts
->
unix_lib
)
spec_o_name
=
build_spec_obj
(
opts
,
spec_file
,
output_file
,
files
,
lib_dirs
,
entry_point
);
...
...
@@ -1891,6 +1919,7 @@ int main(int argc, char **argv)
struct
strarray
Wb
=
strarray_fromstring
(
opts
.
args
.
str
[
i
]
+
4
,
","
);
for
(
j
=
0
;
j
<
Wb
.
count
;
j
++
)
{
if
(
!
strcmp
(
Wb
.
str
[
j
],
"--data-only"
))
opts
.
data_only
=
1
;
if
(
!
strcmp
(
Wb
.
str
[
j
],
"--fake-module"
))
opts
.
fake_module
=
1
;
else
strarray_add
(
&
opts
.
winebuild_args
,
Wb
.
str
[
j
]
);
}
...
...
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