Removed support for 'rsrc' spec file statement.
This commit is contained in:
parent
4162abbaf4
commit
a9135e8333
|
@ -84,7 +84,7 @@ EXTRASUBDIRS = \
|
|||
# Special rules for 16-bit resource and spec files
|
||||
|
||||
gdi.exe.spec.c: gdi.exe.spec version16.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) -spec $(SRCDIR)/gdi.exe.spec
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) -r version16.res --spec $(SRCDIR)/gdi.exe.spec
|
||||
|
||||
version16.res: version16.rc
|
||||
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/version16.rc
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc version16.res
|
||||
|
||||
1 pascal SetBkColor(word long) SetBkColor16
|
||||
2 pascal16 SetBkMode(word word) SetBkMode16
|
||||
3 pascal16 SetMapMode(word word) SetMapMode16
|
||||
|
|
|
@ -52,8 +52,8 @@ kernel.res: $(MC_SRCS:.mc=.mc.rc)
|
|||
|
||||
# Special rules for 16-bit resource and spec files
|
||||
|
||||
krnl386.exe.spec.c: krnl386.exe.spec version16.res $(WINEBUILD)
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -N kernel -o $@ -M $(MODULE) --spec $(SRCDIR)/krnl386.exe.spec
|
||||
krnl386.exe.spec.c: krnl386.exe.spec version16.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -N kernel -o $@ -M $(MODULE) -r version16.res --spec $(SRCDIR)/krnl386.exe.spec
|
||||
|
||||
version16.res: version16.rc
|
||||
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/version16.rc
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc version16.res
|
||||
|
||||
# 1-207 are the basic functions, those are (with minor variations)
|
||||
# present in win31, win95 and nt351
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ uninstall::
|
|||
version16.res: version16.rc
|
||||
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/version16.rc
|
||||
|
||||
shell.spec.c: version16.res
|
||||
shell.spec.c: shell.spec version16.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) -r version16.res --spec $(SRCDIR)/shell.spec
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc version16.res
|
||||
|
||||
1 pascal RegOpenKey(long str ptr) RegOpenKey16
|
||||
2 pascal RegCreateKey(long str ptr) RegCreateKey16
|
||||
3 pascal RegCloseKey(long) RegCloseKey16
|
||||
|
|
|
@ -105,7 +105,13 @@ EXTRASUBDIRS = \
|
|||
# Special rules for 16-bit resource and spec files
|
||||
|
||||
user.exe.spec.c: user.exe.spec resources/version16.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) --spec $(SRCDIR)/user.exe.spec
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) -r resources/version16.res --spec $(SRCDIR)/user.exe.spec
|
||||
|
||||
display.spec.c: display.spec resources/display.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) -r resources/display.res --spec $(SRCDIR)/display.spec
|
||||
|
||||
mouse.spec.c: mouse.spec resources/mouse.res
|
||||
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) -r resources/mouse.res --spec $(SRCDIR)/mouse.spec
|
||||
|
||||
resources/display.res: resources/display.rc
|
||||
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/resources/display.rc
|
||||
|
@ -116,8 +122,4 @@ resources/mouse.res: resources/mouse.rc
|
|||
resources/version16.res: resources/version16.rc
|
||||
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/resources/version16.rc
|
||||
|
||||
display.spec.c: resources/display.res
|
||||
|
||||
mouse.spec.c: resources/mouse.res
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc resources/display.res
|
||||
|
||||
1 stub BitBlt
|
||||
2 stub ColorInfo
|
||||
3 stub Control
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc resources/mouse.res
|
||||
|
||||
1 pascal16 Inquire(ptr) MOUSE_Inquire
|
||||
2 pascal16 Enable(segptr) MOUSE_Enable
|
||||
3 pascal16 Disable() MOUSE_Disable
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
rsrc resources/version16.res
|
||||
|
||||
1 pascal16 MessageBox(word str str word) MessageBox16
|
||||
2 stub OldExitWindows
|
||||
3 stub EnableOEMLayer
|
||||
|
|
|
@ -166,7 +166,7 @@ extern void BuildSpec16File( FILE *outfile );
|
|||
extern void BuildSpec32File( FILE *outfile );
|
||||
extern void BuildDef32File( FILE *outfile );
|
||||
extern void BuildDebugFile( FILE *outfile, const char *srcdir, char **argv );
|
||||
extern SPEC_TYPE ParseTopLevel( FILE *file, int def_only );
|
||||
extern void ParseTopLevel( FILE *file );
|
||||
|
||||
/* global variables */
|
||||
|
||||
|
@ -196,5 +196,6 @@ extern ORDDEF *EntryPoints[MAX_ORDINALS];
|
|||
extern ORDDEF *Ordinals[MAX_ORDINALS];
|
||||
extern ORDDEF *Names[MAX_ORDINALS];
|
||||
extern SPEC_MODE SpecMode;
|
||||
extern SPEC_TYPE SpecType;
|
||||
|
||||
#endif /* __WINE_BUILD_H */
|
||||
|
|
|
@ -38,6 +38,8 @@ ORDDEF *Ordinals[MAX_ORDINALS];
|
|||
ORDDEF *Names[MAX_ORDINALS];
|
||||
|
||||
SPEC_MODE SpecMode = SPEC_MODE_DLL;
|
||||
SPEC_TYPE SpecType = SPEC_WIN32;
|
||||
|
||||
int Base = MAX_ORDINALS;
|
||||
int Limit = 0;
|
||||
int DLLHeapSize = 0;
|
||||
|
@ -69,6 +71,8 @@ const char *output_file_name = NULL;
|
|||
static FILE *input_file;
|
||||
static FILE *output_file;
|
||||
static const char *current_src_dir;
|
||||
static int nb_res_files;
|
||||
static char **res_files;
|
||||
|
||||
/* execution mode */
|
||||
static enum
|
||||
|
@ -285,6 +289,7 @@ static void do_exe_mode( const char *arg )
|
|||
static void do_module( const char *arg )
|
||||
{
|
||||
strcpy( owner_name, arg );
|
||||
SpecType = SPEC_WIN16;
|
||||
}
|
||||
|
||||
static void do_glue(void)
|
||||
|
@ -334,7 +339,8 @@ static void do_dimport( const char *arg )
|
|||
|
||||
static void do_rsrc( const char *arg )
|
||||
{
|
||||
load_res32_file( arg );
|
||||
res_files = xrealloc( res_files, (nb_res_files+1) * sizeof(*res_files) );
|
||||
res_files[nb_res_files++] = xstrdup( arg );
|
||||
}
|
||||
|
||||
/* parse options from the argv array and remove all the recognized ones */
|
||||
|
@ -387,6 +393,22 @@ static void parse_options( char *argv[] )
|
|||
}
|
||||
|
||||
|
||||
/* load all specified resource files */
|
||||
static void load_resources(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (SpecType)
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
for (i = 0; i < nb_res_files; i++) load_res16_file( res_files[i] );
|
||||
break;
|
||||
case SPEC_WIN32:
|
||||
for (i = 0; i < nb_res_files; i++) load_res32_file( res_files[i] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* main
|
||||
*/
|
||||
|
@ -398,7 +420,9 @@ int main(int argc, char **argv)
|
|||
switch(exec_mode)
|
||||
{
|
||||
case MODE_SPEC:
|
||||
switch (ParseTopLevel( input_file, 0 ))
|
||||
load_resources();
|
||||
ParseTopLevel( input_file );
|
||||
switch (SpecType)
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
if (argv[1])
|
||||
|
@ -413,21 +437,17 @@ int main(int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
case MODE_EXE:
|
||||
if (SpecType == SPEC_WIN16) fatal_error( "Cannot build 16-bit exe files\n" );
|
||||
load_resources();
|
||||
read_undef_symbols( argv + 1 );
|
||||
BuildSpec32File( output_file );
|
||||
break;
|
||||
case MODE_DEF:
|
||||
if (argv[1]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[1] );
|
||||
switch (ParseTopLevel( input_file, 1 ))
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
fatal_error( "Cannot yet build .def file for 16-bit dlls\n" );
|
||||
break;
|
||||
case SPEC_WIN32:
|
||||
BuildDef32File( output_file );
|
||||
break;
|
||||
default: assert(0);
|
||||
}
|
||||
if (SpecType == SPEC_WIN16) fatal_error( "Cannot yet build .def file for 16-bit dlls\n" );
|
||||
load_resources();
|
||||
ParseTopLevel( input_file );
|
||||
BuildDef32File( output_file );
|
||||
break;
|
||||
case MODE_DEBUG:
|
||||
BuildDebugFile( output_file, current_src_dir, argv + 1 );
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
|
||||
int current_line = 0;
|
||||
|
||||
static SPEC_TYPE SpecType = SPEC_WIN32;
|
||||
|
||||
static char ParseBuffer[512];
|
||||
static char TokenBuffer[512];
|
||||
static char *ParseNext = ParseBuffer;
|
||||
|
@ -494,26 +492,16 @@ static void sort_names(void)
|
|||
*
|
||||
* Parse a spec file.
|
||||
*/
|
||||
SPEC_TYPE ParseTopLevel( FILE *file, int def_only )
|
||||
void ParseTopLevel( FILE *file )
|
||||
{
|
||||
const char *token;
|
||||
|
||||
input_file = file;
|
||||
current_line = 0;
|
||||
if (owner_name[0]) SpecType = SPEC_WIN16;
|
||||
|
||||
while ((token = GetToken(1)) != NULL)
|
||||
{
|
||||
if (strcmp(token, "rsrc") == 0)
|
||||
{
|
||||
if (!def_only)
|
||||
{
|
||||
if (SpecType != SPEC_WIN16) load_res32_file( GetToken(0) );
|
||||
else load_res16_file( GetToken(0) );
|
||||
}
|
||||
else GetToken(0); /* skip it */
|
||||
}
|
||||
else if (strcmp(token, "ignore") == 0)
|
||||
if (strcmp(token, "ignore") == 0)
|
||||
{
|
||||
if (SpecType != SPEC_WIN32)
|
||||
fatal_error( "'ignore' only supported for Win32 spec files\n" );
|
||||
|
@ -533,12 +521,8 @@ SPEC_TYPE ParseTopLevel( FILE *file, int def_only )
|
|||
fatal_error( "Expected ordinal declaration\n" );
|
||||
}
|
||||
|
||||
if (SpecType == SPEC_WIN16 && !owner_name[0])
|
||||
fatal_error( "'owner' not specified for Win16 dll\n" );
|
||||
|
||||
current_line = 0; /* no longer parsing the input file */
|
||||
sort_names();
|
||||
return SpecType;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -167,8 +167,6 @@ Turn on warnings.
|
|||
A spec file should contain a number of optional directives, and then a
|
||||
list of ordinal declarations. The general syntax is the following:
|
||||
.PP
|
||||
.RB [ rsrc\ \fIresfile\fR]
|
||||
.br
|
||||
.RB [ ignore\ (\ [ \fIsymbols...\fR ]\ )\ ]
|
||||
.br
|
||||
.BI #\ comments
|
||||
|
@ -191,9 +189,6 @@ list of ordinal declarations. The general syntax is the following:
|
|||
.IB ordinal\ forward
|
||||
.RI [ flags ]\ exportname\ forwardname
|
||||
.SS "Optional directives"
|
||||
.B rsrc
|
||||
specifies the path of the compiled resource file.
|
||||
.PP
|
||||
.B ignore
|
||||
specifies a list of symbols that should be ignored when
|
||||
resolving undefined symbols against the imported libraries.
|
||||
|
|
Loading…
Reference in New Issue