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
6cf96bf9
Commit
6cf96bf9
authored
Jun 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add possibility to generate a global resource file without running it through windres.
parent
43f6c4cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
main.c
tools/winebuild/main.c
+1
-1
res32.c
tools/winebuild/res32.c
+23
-12
No files found.
tools/winebuild/main.c
View file @
6cf96bf9
...
...
@@ -244,7 +244,7 @@ static const char usage_str[] =
" --def Build a .def file from a .spec file
\n
"
" --exe Build a .c file for an executable
\n
"
" --relay16 Build the 16-bit relay assembly routines
\n
"
" --relay32 Build the 32-bit relay assembly routines
\n
\n
"
" --relay32 Build the 32-bit relay assembly routines
\n
"
" --resources Build a .o file for the resource files
\n\n
"
"The mode options are mutually exclusive; you must specify one and only one.
\n\n
"
;
...
...
tools/winebuild/res32.c
View file @
6cf96bf9
...
...
@@ -541,8 +541,7 @@ void output_res_o_file( DLLSPEC *spec )
{
unsigned
int
i
,
total_size
;
unsigned
char
*
data
;
char
*
res_file
,
*
cmd
;
const
char
*
prog
;
char
*
res_file
=
NULL
;
int
fd
,
err
;
if
(
!
spec
->
nb_resources
)
fatal_error
(
"--resources mode needs at least one resource file as input
\n
"
);
...
...
@@ -593,20 +592,32 @@ void output_res_o_file( DLLSPEC *spec )
}
assert
(
file_out_pos
==
file_out_end
);
res_file
=
get_temp_file_name
(
output_file_name
,
".res"
);
if
((
fd
=
open
(
res_file
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
0600
))
==
-
1
)
fatal_error
(
"Cannot create %s
\n
"
,
res_file
);
/* if the output file name is a .res too, don't run the results through windres */
if
(
strendswith
(
output_file_name
,
".res"
))
{
if
((
fd
=
open
(
output_file_name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
0666
))
==
-
1
)
fatal_error
(
"Cannot create %s
\n
"
,
output_file_name
);
}
else
{
res_file
=
get_temp_file_name
(
output_file_name
,
".res"
);
if
((
fd
=
open
(
res_file
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
0600
))
==
-
1
)
fatal_error
(
"Cannot create %s
\n
"
,
res_file
);
}
if
(
write
(
fd
,
data
,
total_size
)
!=
total_size
)
fatal_error
(
"Error writing to %s
\n
"
,
res_file
);
close
(
fd
);
free
(
data
);
prog
=
get_windres_command
();
cmd
=
xmalloc
(
strlen
(
prog
)
+
strlen
(
res_file
)
+
strlen
(
output_file_name
)
+
9
);
sprintf
(
cmd
,
"%s -i %s -o %s"
,
prog
,
res_file
,
output_file_name
);
if
(
verbose
)
fprintf
(
stderr
,
"%s
\n
"
,
cmd
);
err
=
system
(
cmd
);
if
(
err
)
fatal_error
(
"%s failed with status %d
\n
"
,
prog
,
err
);
free
(
cmd
);
if
(
res_file
)
{
const
char
*
prog
=
get_windres_command
();
char
*
cmd
=
xmalloc
(
strlen
(
prog
)
+
strlen
(
res_file
)
+
strlen
(
output_file_name
)
+
9
);
sprintf
(
cmd
,
"%s -i %s -o %s"
,
prog
,
res_file
,
output_file_name
);
if
(
verbose
)
fprintf
(
stderr
,
"%s
\n
"
,
cmd
);
err
=
system
(
cmd
);
if
(
err
)
fatal_error
(
"%s failed with status %d
\n
"
,
prog
,
err
);
free
(
cmd
);
}
output_file_name
=
NULL
;
/* so we don't try to assemble it */
}
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