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
9e96918c
Commit
9e96918c
authored
May 30, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Transparently compile resource files for the Windows build.
parent
e1122863
Hide 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 @
9e96918c
...
...
@@ -482,6 +482,21 @@ static strarray *get_winebuild_args(struct options *opts)
return
spec_args
;
}
static
const
char
*
compile_resources_to_object
(
struct
options
*
opts
,
const
strarray
*
resources
,
const
char
*
res_o_name
)
{
strarray
*
winebuild_args
=
get_winebuild_args
(
opts
);
strarray_add
(
winebuild_args
,
"--resources"
);
strarray_add
(
winebuild_args
,
"-o"
);
strarray_add
(
winebuild_args
,
res_o_name
);
strarray_addall
(
winebuild_args
,
resources
);
spawn
(
opts
->
prefix
,
winebuild_args
,
0
);
strarray_free
(
winebuild_args
);
return
res_o_name
;
}
/* check if there is a static lib associated to a given dll */
static
char
*
find_static_lib
(
const
char
*
dll
)
{
...
...
@@ -633,6 +648,9 @@ static void build(struct options* opts)
if
(
opts
->
target_platform
==
PLATFORM_WINDOWS
)
{
strarray
*
resources
=
strarray_alloc
();
char
*
res_o_name
=
NULL
;
if
(
opts
->
shared
)
{
/* run winebuild to generate the .def file */
...
...
@@ -717,10 +735,21 @@ static void build(struct options* opts)
}
strarray_add
(
link_args
,
name
);
break
;
case
'r'
:
if
(
!
res_o_name
)
{
res_o_name
=
get_temp_file
(
output_name
,
".res.o"
);
strarray_add
(
link_args
,
res_o_name
);
}
strarray_add
(
resources
,
name
);
break
;
}
}
if
(
res_o_name
)
compile_resources_to_object
(
opts
,
resources
,
res_o_name
);
spawn
(
opts
->
prefix
,
link_args
,
0
);
strarray_free
(
resources
);
strarray_free
(
link_args
);
return
;
}
...
...
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