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
a583b257
Commit
a583b257
authored
Jun 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate the resource data directly inside the resource directory.
parent
143db5ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
res32.c
tools/winebuild/res32.c
+23
-19
spec32.c
tools/winebuild/spec32.c
+2
-2
No files found.
tools/winebuild/res32.c
View file @
a583b257
...
...
@@ -331,22 +331,6 @@ void output_resources( FILE *outfile, DLLSPEC *spec )
tree
=
build_resource_tree
(
spec
);
/* resource data */
for
(
i
=
0
,
res
=
spec
->
resources
;
i
<
spec
->
nb_resources
;
i
++
,
res
++
)
{
const
unsigned
int
*
p
=
res
->
data
;
int
size
=
res
->
data_size
/
4
;
/* dump data as ints to ensure correct alignment */
fprintf
(
outfile
,
"static const unsigned int res_%d[%d] = {
\n
"
,
i
,
size
);
for
(
j
=
0
;
j
<
size
-
1
;
j
++
,
p
++
)
{
fprintf
(
outfile
,
"0x%08x,"
,
*
p
);
if
((
j
%
8
)
==
7
)
fprintf
(
outfile
,
"
\n
"
);
}
fprintf
(
outfile
,
"0x%08x
\n
};
\n\n
"
,
*
p
);
}
/* directory structures */
fprintf
(
outfile
,
"struct res_dir {
\n
"
);
...
...
@@ -414,10 +398,12 @@ void output_resources( FILE *outfile, DLLSPEC *spec )
else
name
->
name_offset
=
name
->
name
->
id
;
}
}
for
(
i
=
0
,
res
=
spec
->
resources
;
i
<
spec
->
nb_resources
;
i
++
,
res
++
)
fprintf
(
outfile
,
" unsigned int res_%d[%d];
\n
"
,
i
,
res
->
data_size
/
4
);
/* resource directory contents */
fprintf
(
outfile
,
"} resources = {
\n
"
);
fprintf
(
outfile
,
"}
__wine_spec_
resources = {
\n
"
);
fprintf
(
outfile
,
" { 0, 0, 0, 0, %d, %d },
\n
"
,
tree
->
nb_types
-
nb_id_types
,
nb_id_types
);
/* dump the type directory */
...
...
@@ -465,7 +451,7 @@ void output_resources( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
" {
\n
"
);
for
(
i
=
0
,
res
=
spec
->
resources
;
i
<
spec
->
nb_resources
;
i
++
,
res
++
)
{
fprintf
(
outfile
,
" {
res_%d, sizeof(
res_%d), 0, 0 }, /* %08x */
\n
"
,
i
,
i
,
fprintf
(
outfile
,
" {
__wine_spec_resources.res_%d, sizeof(__wine_spec_resources.
res_%d), 0, 0 }, /* %08x */
\n
"
,
i
,
i
,
data_offset
+
i
*
4
*
sizeof
(
int
)
);
}
...
...
@@ -486,6 +472,24 @@ void output_resources( FILE *outfile, DLLSPEC *spec )
}
}
}
fprintf
(
outfile
,
" }
\n
};
\n\n
"
);
fprintf
(
outfile
,
" },
\n
"
);
/* resource data */
for
(
i
=
0
,
res
=
spec
->
resources
;
i
<
spec
->
nb_resources
;
i
++
,
res
++
)
{
const
unsigned
int
*
p
=
res
->
data
;
int
size
=
res
->
data_size
/
4
;
/* dump data as ints to ensure correct alignment */
fprintf
(
outfile
,
" { /* res_%d */
\n
"
,
i
);
for
(
j
=
0
;
j
<
size
-
1
;
j
++
,
p
++
)
{
fprintf
(
outfile
,
"0x%08x,"
,
*
p
);
if
((
j
%
8
)
==
7
)
fprintf
(
outfile
,
"
\n
"
);
}
fprintf
(
outfile
,
"0x%08x
\n
},
\n
"
,
*
p
);
}
fprintf
(
outfile
,
"};
\n\n
"
);
free_resource_tree
(
tree
);
}
tools/winebuild/spec32.c
View file @
a583b257
...
...
@@ -778,8 +778,8 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
" { %s, %s },
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_IMPORT */
nr_imports
?
"&imports"
:
"0"
,
nr_imports
?
"sizeof(imports)"
:
"0"
);
fprintf
(
outfile
,
" { %s, %s },
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_RESOURCE */
spec
->
nb_resources
?
"&resources"
:
"0"
,
spec
->
nb_resources
?
"sizeof(resources)"
:
"0"
);
spec
->
nb_resources
?
"&
__wine_spec_
resources"
:
"0"
,
spec
->
nb_resources
?
"sizeof(
__wine_spec_
resources)"
:
"0"
);
fprintf
(
outfile
,
" }
\n
}
\n
};
\n\n
"
);
/* Output the DLL constructor */
...
...
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