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
003e24ca
Commit
003e24ca
authored
Oct 23, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for loading Win32 .res files.
parent
2affae5a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
10 deletions
+39
-10
Makefile.in
tools/winebuild/Makefile.in
+7
-2
build.h
tools/winebuild/build.h
+3
-0
parser.c
tools/winebuild/parser.c
+4
-0
res32.c
tools/winebuild/res32.c
+0
-0
spec32.c
tools/winebuild/spec32.c
+8
-8
utils.c
tools/winebuild/utils.c
+17
-0
No files found.
tools/winebuild/Makefile.in
View file @
003e24ca
...
...
@@ -3,6 +3,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR
=
../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
LIBEXT
=
@LIBEXT@
PROGRAMS
=
winebuild
MODULE
=
none
...
...
@@ -12,6 +13,7 @@ C_SRCS = \
main.c
\
parser.c
\
relay.c
\
res32.c
\
spec16.c
\
spec32.c
\
utils.c
...
...
@@ -20,8 +22,11 @@ all: $(PROGRAMS)
@MAKE_RULES@
winebuild
:
$(OBJS)
$(CC)
$(CFLAGS)
-o
winebuild
$(OBJS)
winebuild
:
$(OBJS) $(TOPOBJDIR)/libwine_unicode.$(LIBEXT)
$(CC)
$(CFLAGS)
-o
winebuild
$(OBJS)
-L
$(TOPOBJDIR)
-lwine_unicode
$(TOPOBJDIR)/libwine_unicode.$(LIBEXT)
:
cd
$(TOPOBJDIR)
&&
$(MAKE)
libwine_unicode.
$(LIBEXT)
install
::
$(PROGRAMS)
[
-d
$(bindir)
]
||
$(MKDIR)
$(bindir)
...
...
tools/winebuild/build.h
View file @
003e24ca
...
...
@@ -137,11 +137,14 @@ extern void *xrealloc (void *ptr, size_t size);
extern
char
*
xstrdup
(
const
char
*
str
);
extern
char
*
strupper
(
char
*
s
);
extern
void
fatal_error
(
const
char
*
msg
,
...
);
extern
void
fatal_perror
(
const
char
*
msg
,
...
);
extern
void
warning
(
const
char
*
msg
,
...
);
extern
void
dump_bytes
(
FILE
*
outfile
,
const
unsigned
char
*
data
,
int
len
,
const
char
*
label
);
extern
void
add_import_dll
(
const
char
*
name
);
extern
void
resolve_imports
(
FILE
*
outfile
);
extern
int
output_imports
(
FILE
*
outfile
);
extern
void
load_res32_file
(
const
char
*
name
);
extern
int
output_resources
(
FILE
*
outfile
);
extern
void
BuildGlue
(
FILE
*
outfile
,
FILE
*
infile
);
extern
void
BuildRelays
(
FILE
*
outfile
);
...
...
tools/winebuild/parser.c
View file @
003e24ca
...
...
@@ -481,9 +481,13 @@ SPEC_TYPE ParseTopLevel( FILE *file )
}
else
if
(
strcmp
(
token
,
"rsrc"
)
==
0
)
{
if
(
SpecType
!=
SPEC_WIN16
)
load_res32_file
(
GetToken
()
);
else
{
strcpy
(
rsrc_name
,
GetToken
()
);
strcat
(
rsrc_name
,
"_ResourceDescriptor"
);
}
}
else
if
(
strcmp
(
token
,
"owner"
)
==
0
)
{
if
(
SpecType
!=
SPEC_WIN16
)
...
...
tools/winebuild/res32.c
0 → 100644
View file @
003e24ca
This diff is collapsed.
Click to expand it.
tools/winebuild/spec32.c
View file @
003e24ca
...
...
@@ -274,7 +274,7 @@ void BuildSpec32File( FILE *outfile )
{
ORDDEF
*
odp
;
int
i
,
fwd_size
=
0
,
have_regs
=
FALSE
;
int
nr_exports
,
nr_imports
;
int
nr_exports
,
nr_imports
,
nr_resources
;
int
characteristics
,
subsystem
;
const
char
*
init_func
;
DWORD
page_size
;
...
...
@@ -379,6 +379,10 @@ void BuildSpec32File( FILE *outfile )
nr_imports
=
output_imports
(
outfile
);
/* Output the resources */
nr_resources
=
output_resources
(
outfile
);
/* Output LibMain function */
init_func
=
DLLInitFunc
[
0
]
?
DLLInitFunc
:
NULL
;
...
...
@@ -445,10 +449,6 @@ void BuildSpec32File( FILE *outfile )
break
;
}
/* Output the DLL descriptor */
if
(
rsrc_name
[
0
])
fprintf
(
outfile
,
"extern char %s[];
\n\n
"
,
rsrc_name
);
/* Output the NT header */
/* this is the IMAGE_NT_HEADERS structure, but we cannot include winnt.h here */
...
...
@@ -493,7 +493,7 @@ void BuildSpec32File( FILE *outfile )
fprintf
(
outfile
,
" int SizeOfHeapCommit;
\n
"
);
fprintf
(
outfile
,
" int LoaderFlags;
\n
"
);
fprintf
(
outfile
,
" int NumberOfRvaAndSizes;
\n
"
);
fprintf
(
outfile
,
" struct { void *VirtualAddress; int Size; } DataDirectory[%d];
\n
"
,
fprintf
(
outfile
,
" struct {
const
void *VirtualAddress; int Size; } DataDirectory[%d];
\n
"
,
IMAGE_NUMBEROF_DIRECTORY_ENTRIES
);
fprintf
(
outfile
,
" } OptionalHeader;
\n
"
);
fprintf
(
outfile
,
"} nt_header = {
\n
"
);
...
...
@@ -527,8 +527,8 @@ void BuildSpec32File( FILE *outfile )
nr_exports
?
"&exports"
:
"0"
,
nr_exports
?
"sizeof(exports.exp)"
:
"0"
);
fprintf
(
outfile
,
" { %s, %s },
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_IMPORT */
nr_imports
?
"&imports"
:
"0"
,
nr_imports
?
"sizeof(imports)"
:
"0"
);
fprintf
(
outfile
,
" { %s,
0
},
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_RESOURCE */
rsrc_name
[
0
]
?
rsrc_name
:
"0"
);
fprintf
(
outfile
,
" { %s,
%s
},
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_RESOURCE */
nr_resources
?
"&resources"
:
"0"
,
nr_resources
?
"sizeof(resources)"
:
"0"
);
fprintf
(
outfile
,
" }
\n
}
\n
};
\n\n
"
);
/* Output the DLL constructor */
...
...
tools/winebuild/utils.c
View file @
003e24ca
...
...
@@ -67,6 +67,23 @@ void fatal_error( const char *msg, ... )
exit
(
1
);
}
void
fatal_perror
(
const
char
*
msg
,
...
)
{
va_list
valist
;
va_start
(
valist
,
msg
);
if
(
input_file_name
)
{
fprintf
(
stderr
,
"%s:"
,
input_file_name
);
if
(
current_line
)
fprintf
(
stderr
,
"%d:"
,
current_line
);
fputc
(
' '
,
stderr
);
}
vfprintf
(
stderr
,
msg
,
valist
);
perror
(
" "
);
va_end
(
valist
);
exit
(
1
);
}
void
warning
(
const
char
*
msg
,
...
)
{
va_list
valist
;
...
...
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