diff --git a/racket/src/cs/c/grmain.c b/racket/src/cs/c/grmain.c index 57835b14d5..4edd8d172a 100644 --- a/racket/src/cs/c/grmain.c +++ b/racket/src/cs/c/grmain.c @@ -4,6 +4,13 @@ static void pre_filter_cmdline_arguments(int *argc, char ***argv); #define INITIAL_BIN_TYPE "ri" #define RACKET_IS_GUI 1 +#if WIN32 +# define DLL_RELATIVE_PATH L"." +# ifndef INITIAL_COLLECTS_DIRECTORY +# define INITIAL_COLLECTS_DIRECTORY "../collects" +# endif +#endif + #include "main.c" #ifdef OS_X diff --git a/racket/src/cs/c/main.c b/racket/src/cs/c/main.c index 274a23d52c..db449202a1 100644 --- a/racket/src/cs/c/main.c +++ b/racket/src/cs/c/main.c @@ -1,10 +1,10 @@ -#ifndef _MSC_VER +#ifndef WIN32 # include #endif #include #include #include -#ifdef _MSC_VER +#ifdef WIN32 # include # define DOS_FILE_SYSTEM static int scheme_utf8_encode(unsigned int *path, int zero_offset, int len, diff --git a/racket/src/worksp/cs/Makefile b/racket/src/worksp/cs/Makefile index e516efa487..eb7c895a7d 100644 --- a/racket/src/worksp/cs/Makefile +++ b/racket/src/worksp/cs/Makefile @@ -10,16 +10,26 @@ LIBS = $(RKTIO_LIB) \ $(WIN32_LIBS) DEST = ..\..\build\raw_racketcs.exe +GDEST = ..\..\build\raw_gracketcs.exe CSDIR = ..\..\cs\c +FLAGS = /DWIN32 COMP_SUBDIR = /DCS_COMPILED_SUBDIR=1 -$(DEST): $(CSDIR).\main.c $(CSDIR)\boot.c racket.res $(RKTIO_LIB) - cl /Fe$(DEST) /Ox /MT $(COMP_SUBDIR) $(INCS) $(CSDIR)\main.c $(CSDIR)\boot.c racket.res $(LIBS) +all: $(DEST) $(GDEST) + +$(DEST): $(CSDIR)\main.c $(CSDIR)\boot.c racket.res $(RKTIO_LIB) + cl /Fe$(DEST) /Ox /MT $(COMP_SUBDIR) $(FLAGS) $(INCS) $(CSDIR)\main.c $(CSDIR)\boot.c racket.res $(LIBS) racket.res: ../racket/racket.rc ../racket/racket.ico rc /l 0x409 /foracket.res ../racket/racket.rc +$(GDEST): $(CSDIR)\grmain.c $(CSDIR)\boot.c gracket.res $(RKTIO_LIB) + cl /Fe$(GDEST) /Ox /MT $(COMP_SUBDIR) $(INCS) $(FLAGS) $(CSDIR)\grmain.c $(CSDIR)\boot.c gracket.res $(LIBS) /subsystem:windows + +gracket.res: ../gracket/gracket.rc ../gracket/gracket.ico + rc /l 0x409 /fogracket.res ../gracket/gracket.rc + # Useful for debugging: RKTIO_DLL = ..\..\lib\librktio.dll diff --git a/racket/src/worksp/csbuild.rkt b/racket/src/worksp/csbuild.rkt index 078581014e..48f7141496 100644 --- a/racket/src/worksp/csbuild.rkt +++ b/racket/src/worksp/csbuild.rkt @@ -176,7 +176,7 @@ (parameterize ([current-directory "cs"]) (system*! "nmake" - "..\\..\\build\\raw_racketcs.exe" + "all" (format "SCHEME_DIR=~a" rel2-scheme-dir) (format "MACHINE=~a" machine) (format "SCHEME_LIB=~a" scheme-lib) @@ -193,15 +193,22 @@ "../build/racket.so" "../build/racket.boot") -(system*! (find-exe) - "-O" "info@compiler/cm" - "-l-" "setup" boot-mode "../setup-go.rkt" "..//build/compiled" - "ignored" "../build/ignored.d" - "../cs/c/embed-boot.rkt" - "../build/raw_racketcs.exe" - (format "../../Racket~a.exe" cs-suffix) - (build-path scheme-dir machine "boot" machine) - "../build/racket.boot") +(define (embed-boot src dest) + (system*! (find-exe) + "-O" "info@compiler/cm" + "-l-" "setup" boot-mode "../setup-go.rkt" "..//build/compiled" + "ignored" "../build/ignored.d" + "../cs/c/embed-boot.rkt" + src + dest + (build-path scheme-dir machine "boot" machine) + "../build/racket.boot")) + +(embed-boot "../build/raw_racketcs.exe" + (format "../../Racket~a.exe" cs-suffix)) + +(embed-boot "../build/raw_gracketcs.exe" + (format "../../lib/GRacket~a.exe" cs-suffix)) ;; ---------------------------------------- ;; Finish installation with "mzstart", "mrstart", and other