mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak (WINEBUILD): Define. * tools/winebuild/Makefile: New file. * tools/winebuild/import.c (ldcombine_files): Replace mkstemps with Win32 APIs. * tools/winebuild/main.c (main): Win16 specs and relays are not supported. * tools/winebuild/spec32.c (EXCEPTION_WINE_STUB, EH_NONCONTINUABLE): Define. (BuildDef32File): Don't emit PRIVATE. svn path=/trunk/; revision=6932
This commit is contained in:
parent
6bb605e497
commit
23cb2784b6
6 changed files with 93 additions and 4 deletions
|
@ -1,3 +1,14 @@
|
|||
2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* rules.mak (WINEBUILD): Define.
|
||||
* tools/winebuild/Makefile: New file.
|
||||
* tools/winebuild/import.c (ldcombine_files): Replace mkstemps with Win32
|
||||
APIs.
|
||||
* tools/winebuild/main.c (main): Win16 specs and relays are not supported.
|
||||
* tools/winebuild/spec32.c (EXCEPTION_WINE_STUB, EH_NONCONTINUABLE):
|
||||
Define.
|
||||
(BuildDef32File): Don't emit PRIVATE.
|
||||
|
||||
2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/winebuild: Import winebuild from Wine (D20031208).
|
||||
|
|
|
@ -100,6 +100,7 @@ RTOUCH = $(TOOLS_PATH)/rtouch
|
|||
REGTESTS = $(TOOLS_PATH)/regtests
|
||||
MC = $(TOOLS_PATH)/wmc/wmc
|
||||
CABMAN = $(TOOLS_PATH)/cabman/cabman
|
||||
WINEBUILD = $(TOOLS_PATH)/winebuild/winebuild
|
||||
XSLTPROC = xsltproc
|
||||
|
||||
|
||||
|
|
41
reactos/tools/winebuild/Makefile
Normal file
41
reactos/tools/winebuild/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# winebuild
|
||||
#
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
TARGET = winebuild$(EXE_POSTFIX)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
# relay.o spec16.o
|
||||
OBJECTS = \
|
||||
import.o \
|
||||
main.o \
|
||||
parser.o \
|
||||
res16.o \
|
||||
res32.o \
|
||||
spec32.o \
|
||||
utils.o
|
||||
|
||||
CLEAN_FILES = *.o $(TARGET)
|
||||
|
||||
HOST_CFLAGS = -D__USE_W32API -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine
|
||||
|
||||
%.o: %.c
|
||||
$(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(HOST_CC) $(OBJECTS) -o $(TARGET)
|
||||
|
||||
ifeq ($(HOST),mingw32-linux)
|
||||
clean:
|
||||
rm -f $(CLEAN_FILES)
|
||||
endif
|
||||
ifneq ($(HOST),mingw32-linux)
|
||||
clean:
|
||||
del $(CLEAN_FILES)
|
||||
endif
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
|
@ -30,6 +30,10 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "build.h"
|
||||
|
||||
struct func
|
||||
|
@ -634,16 +638,27 @@ static const char *ldcombine_files( char **argv )
|
|||
int i, len = 0;
|
||||
char *cmd;
|
||||
int fd, err;
|
||||
#if defined(WIN32)
|
||||
char tmppath[MAX_PATH];
|
||||
char tmpfile[MAX_PATH];
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
if (GetTempPathA(MAX_PATH, tmppath) == 0) return NULL;
|
||||
if (GetTempFileNameA(tmppath, "WNB", 0, tmpfile) == 0) fatal_error( "could not generate a temp file\n" );
|
||||
ld_tmp_file = xstrdup( tmpfile );
|
||||
if ((fd = open( ld_tmp_file, O_RDONLY )) == -1)
|
||||
#else
|
||||
if (output_file_name && output_file_name[0])
|
||||
{
|
||||
ld_tmp_file = xmalloc( strlen(output_file_name) + 10 );
|
||||
ld_tmp_file = xmalloc( MAX_PATH);
|
||||
strcpy( ld_tmp_file, output_file_name );
|
||||
strcat( ld_tmp_file, ".XXXXXX.o" );
|
||||
}
|
||||
else ld_tmp_file = xstrdup( "/tmp/winebuild.tmp.XXXXXX.o" );
|
||||
|
||||
if ((fd = mkstemps( ld_tmp_file, 2 ) == -1)) fatal_error( "could not generate a temp file\n" );
|
||||
#endif
|
||||
|
||||
close( fd );
|
||||
atexit( remove_ld_tmp_file );
|
||||
|
||||
|
|
|
@ -388,9 +388,13 @@ int main(int argc, char **argv)
|
|||
switch (SpecType)
|
||||
{
|
||||
case SPEC_WIN16:
|
||||
#if defined(WIN32)
|
||||
fatal_error( "Win16 specs are not supported in ReactOS version of winebuild\n" );
|
||||
#else
|
||||
if (argv[0])
|
||||
fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );
|
||||
BuildSpec16File( output_file );
|
||||
#endif
|
||||
break;
|
||||
case SPEC_WIN32:
|
||||
read_undef_symbols( argv );
|
||||
|
@ -415,12 +419,20 @@ int main(int argc, char **argv)
|
|||
BuildDebugFile( output_file, current_src_dir, argv );
|
||||
break;
|
||||
case MODE_RELAY16:
|
||||
#if defined(WIN32)
|
||||
fatal_error( "Win16 relays are not supported in ReactOS version of winebuild\n" );
|
||||
#else
|
||||
if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );
|
||||
BuildRelays16( output_file );
|
||||
#endif
|
||||
break;
|
||||
case MODE_RELAY32:
|
||||
#if defined(WIN32)
|
||||
fatal_error( "Win32 relays are not supported in ReactOS version of winebuild\n" );
|
||||
#else
|
||||
if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );
|
||||
BuildRelays32( output_file );
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
usage(1);
|
||||
|
|
|
@ -32,7 +32,13 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#if defined(WIN32)
|
||||
#define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#else
|
||||
#include "wine/exception.h"
|
||||
#endif
|
||||
|
||||
#include "build.h"
|
||||
|
||||
|
||||
|
@ -900,7 +906,10 @@ void BuildDef32File(FILE *outfile)
|
|||
fprintf( outfile, " @%d", odp->ordinal );
|
||||
if (!odp->name) fprintf( outfile, " NONAME" );
|
||||
if (is_data) fprintf( outfile, " DATA" );
|
||||
#if !defined(WIN32)
|
||||
/* MinGW binutils cannot handle this correctly */
|
||||
if (odp->flags & FLAG_PRIVATE) fprintf( outfile, " PRIVATE" );
|
||||
#endif
|
||||
fprintf( outfile, "\n" );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue