Accommodate Windows x64 builds and installers.

This commit is contained in:
Eli Barzilay 2010-12-09 11:53:26 -05:00
parent 8f17b95d82
commit a90338eddd
3 changed files with 36 additions and 29 deletions

View File

@ -211,6 +211,7 @@ name_of_platform() {
( "ppc-darwin" ) echo "Mac X11 on Darwin (PPC)" ;; ( "ppc-darwin" ) echo "Mac X11 on Darwin (PPC)" ;;
( "i386-darwin" ) echo "Mac X11 on Darwin (Intel)" ;; ( "i386-darwin" ) echo "Mac X11 on Darwin (Intel)" ;;
( "i386-win32" ) echo "Windows" ;; ( "i386-win32" ) echo "Windows" ;;
( "x86_64-win32" ) echo "Windows x64" ;;
# These are source distribution platforms # These are source distribution platforms
( "unix" ) echo "Unix" ;; ( "unix" ) echo "Unix" ;;
( "mac" ) echo "Macintosh" ;; ( "mac" ) echo "Macintosh" ;;
@ -258,6 +259,7 @@ name_of_dist_type() {
platforms_of_dist_type() { platforms_of_dist_type() {
case "$1" in case "$1" in
( "bin" ) echo "i386-win32" \ ( "bin" ) echo "i386-win32" \
"x86_64-win32" \
"i386-osx-mac" \ "i386-osx-mac" \
"ppc-osx-mac" \ "ppc-osx-mac" \
"ppc-darwin" \ "ppc-darwin" \
@ -448,7 +450,7 @@ show() {
if [[ "$verbose" = "yes" ]]; then if [[ "$verbose" = "yes" ]]; then
echo "" echo ""
case "$platform" in case "$platform" in
( *"-linux"* | "sparc-solaris" | "i386-win32" ) ( *"-linux"* | "sparc-solaris" | *"-win32" )
echo ">>>" "$@" | fmt -t -w 79 echo ">>>" "$@" | fmt -t -w 79
;; ;;
( *"-freebsd" | *"-osx-mac" | *"-darwin" ) ( *"-freebsd" | *"-osx-mac" | *"-darwin" )
@ -1146,9 +1148,9 @@ DO_BUILD() { # inputs -- releasing
fi fi
## -------------------------------------------------------------------------- ## --------------------------------------------------------------------------
if [[ "$platform" = "i386-win32" ]]; then if [[ "$platform" = *"-win32" ]]; then
export PLTPLANETDIR="$(cygpath -w "$PLTPLANETDIR")" export PLTPLANETDIR="$(cygpath -w "$PLTPLANETDIR")"
DO_WIN32_BUILD DO_WINDOWS_BUILD
else else
_mcd "$PLTHOME/src/build" _mcd "$PLTHOME/src/build"
machineget LDFLAGS; export LDFLAGS machineget LDFLAGS; export LDFLAGS
@ -1207,7 +1209,7 @@ DO_BUILD() { # inputs -- releasing
for _exe in $(choose_for_testing $test_mode 3m cgc); do for _exe in $(choose_for_testing $test_mode 3m cgc); do
for _jit in $(choose_for_testing $test_mode yes no); do for _jit in $(choose_for_testing $test_mode yes no); do
if [[ "${_exe}" = "cgc" ]]; then exe="cgc"; else exe=""; fi if [[ "${_exe}" = "cgc" ]]; then exe="cgc"; else exe=""; fi
if [[ "$platform" = "i386-win32" ]]; then if [[ "$platform" = *"-win32" ]]; then
exe="$PLTHOME/Racket$exe.exe" exe="$PLTHOME/Racket$exe.exe"
else else
exe="$PLTHOME/bin/racket$exe" exe="$PLTHOME/bin/racket$exe"
@ -1280,13 +1282,15 @@ winpath2unix() { # input: windows path
echo "$*" | sed 's_^\([a-zA-Z]\):[/\\]_/\1/_; s_\\_/_g' echo "$*" | sed 's_^\([a-zA-Z]\):[/\\]_/\1/_; s_\\_/_g'
} }
build_w32step() { # inputs: type, name, [args...] win_build_step() { # inputs: type, name, [args...]
separator "Building: $2 [${machine}(${platform})] ($1)" separator "Building: $2 [${machine}(${platform})] ($1)"
local btype="$1" bname="$2"; shift 2 local btype="$1" bname="$2"; shift 2
local arch="Win32"
if [[ "$platform" = "x86_64-"* ]]; then arch="x64"; fi
start_timer start_timer
case "$btype" in case "$btype" in
( "VSNET" ) _cd "$PLTHOME/src/worksp/$bname" ( "VSNET" ) _cd "$PLTHOME/src/worksp/$bname"
_run "$VSNET" "$bname.sln" /build "Release|Win32" _run "$VSNET" "$bname.sln" /build "Release|$arch"
;; ;;
( "NMAKE" ) _run "$NMAKE" "$@" ( "NMAKE" ) _run "$NMAKE" "$@"
;; ;;
@ -1302,16 +1306,16 @@ build_w32step() { # inputs: type, name, [args...]
fi fi
;; ;;
( "VSNET3M" ) _cd "$PLTHOME/src/worksp/$bname" ( "VSNET3M" ) _cd "$PLTHOME/src/worksp/$bname"
_run "$VSNET" "$bname.sln" /build "Release|Win32" _run "$VSNET" "$bname.sln" /build "Release|$arch"
_run "$PLTHOME/Racket.exe" "xform.rkt" "$@" _run "$PLTHOME/Racket.exe" "xform.rkt" "$@"
_run "$VSNET" "$bname.sln" /build "3m|Win32" _run "$VSNET" "$bname.sln" /build "3m|$arch"
;; ;;
( * ) exit_error "Unknown type for build_w32step: \"$btype\"" ;; ( * ) exit_error "Unknown type for win_build_step: \"$btype\"" ;;
esac esac
show_time "--==> $bname on ${machine}(${platform}) done," show_time "--==> $bname on ${machine}(${platform}) done,"
} }
DO_WIN32_BUILD() { DO_WINDOWS_BUILD() {
## -------------------------------------------------------------------------- ## --------------------------------------------------------------------------
/usr/bin/mount -c / /usr/bin/mount -c /
@ -1337,7 +1341,7 @@ DO_WIN32_BUILD() {
LIB=".;$VC\\lib;$VC\\atlmfc\\lib;$VC\\PlatformSDK\\lib" LIB=".;$VC\\lib;$VC\\atlmfc\\lib;$VC\\PlatformSDK\\lib"
export VSNET NMAKE PATH INCLUDE LIB export VSNET NMAKE PATH INCLUDE LIB
# separator "win32: Convert .sln files" # separator "Windows: Convert .sln files"
# local SAVED_IFS="$IFS"; IFS=$'\n' # local SAVED_IFS="$IFS"; IFS=$'\n'
# local sln # local sln
# for sln in $(find "$PLTHOME/src/worksp" -type f -name "*.sln"); do # for sln in $(find "$PLTHOME/src/worksp" -type f -name "*.sln"); do
@ -1346,7 +1350,7 @@ DO_WIN32_BUILD() {
# done # done
# IFS="$SAVED_IFS" # IFS="$SAVED_IFS"
separator "win63: Use new .sln files" separator "Windows: Use new .sln files"
local SAVED_IFS="$IFS"; IFS=$'\n' local SAVED_IFS="$IFS"; IFS=$'\n'
local file local file
for file in $(find "$PLTHOME/src/worksp10") -type f; do for file in $(find "$PLTHOME/src/worksp10") -type f; do
@ -1354,31 +1358,31 @@ DO_WIN32_BUILD() {
done done
IFS="$SAVED_IFS" IFS="$SAVED_IFS"
separator "win32: Full build" separator "Windows: Full build"
build_w32step VSNET "racket" win_build_step VSNET "racket"
build_w32step VSNET "gracket" win_build_step VSNET "gracket"
_cd "$PLTHOME/src/worksp/gc2"; build_w32step RKT "3M" make.rkt _cd "$PLTHOME/src/worksp/gc2"; win_build_step RKT "3M" make.rkt
_cd "$PLTHOME" _cd "$PLTHOME"
build_w32step VSNET "mzstart" win_build_step VSNET "mzstart"
build_w32step VSNET "mrstart" win_build_step VSNET "mrstart"
_cd "$PLTHOME/lib" _cd "$PLTHOME/lib"
build_w32step RKT "get-libs (gui)" ../src/get-libs.rkt core win_build_step RKT "get-libs (gui)" ../src/get-libs.rkt core
build_w32step RKT "get-libs (gui)" ../src/get-libs.rkt gui win_build_step RKT "get-libs (gui)" ../src/get-libs.rkt gui
separator "win32: Building libraries" separator "Windows: Building libraries"
_cd "$PLTHOME" _cd "$PLTHOME"
build_w32step RKT "compiler" -N raco -l- raco setup -Dl compiler win_build_step RKT "compiler" -N raco -l- raco setup -Dl compiler
build_w32step VSNET3M "mzcom" win_build_step VSNET3M "mzcom"
build_w32step VSNET3M "libmysterx" win_build_step VSNET3M "libmysterx"
# _cd "$PLTHOME/src/srpersist" # _cd "$PLTHOME/src/srpersist"
# build_w32step NMAKE "srpersist" /f srpersist.mak "install" # win_build_step NMAKE "srpersist" /f srpersist.mak "install"
_cd "$PLTHOME"; build_w32step RKT "raco setup" $SETUP_ARGS _cd "$PLTHOME"; win_build_step RKT "raco setup" $SETUP_ARGS
separator "win32: Building Cygwin libreries" separator "Windows: Building Cygwin libreries"
_mcd "$PLTHOME/src/build" _mcd "$PLTHOME/src/build"
_run ../configure --disable-gracket _run ../configure --disable-gracket
_cd "racket/dynsrc" _cd "racket/dynsrc"
@ -1387,7 +1391,7 @@ DO_WIN32_BUILD() {
|| exit_error "Errors when running \"make\" for Cygwin" || exit_error "Errors when running \"make\" for Cygwin"
# Borland is no longer supported: # Borland is no longer supported:
# separator "win32: Building Borland libreries" # separator "Windows: Building Borland libreries"
# _cd "$PLTHOME/src/racket/dynsrc" # _cd "$PLTHOME/src/racket/dynsrc"
# _run bcc32 -I"../include" -I"g:/borland/bcc55/include" \ # _run bcc32 -I"../include" -I"g:/borland/bcc55/include" \
# -o"mzdynb.obj" -c "mzdyn.c" # -o"mzdynb.obj" -c "mzdyn.c"
@ -1395,7 +1399,7 @@ DO_WIN32_BUILD() {
# _cp "mzdynb.obj" "mzdynb.def" "$PLTHOME/lib/bcc" # _cp "mzdynb.obj" "mzdynb.def" "$PLTHOME/lib/bcc"
_cd "$PLTHOME" _cd "$PLTHOME"
build_w32step RKT "winvers" -l setup/winvers; sleep 240 win_build_step RKT "winvers" -l setup/winvers; sleep 240
} }

View File

@ -104,6 +104,7 @@ i386-linux-ubuntu-intrepid :=tag unix
i386-linux-ubuntu-jaunty :=tag unix i386-linux-ubuntu-jaunty :=tag unix
i386-freebsd :=tag unix i386-freebsd :=tag unix
i386-win32 :=tag win i386-win32 :=tag win
x86_64-win32 :=tag win
ppc-darwin :=tag unix ppc-darwin :=tag unix
i386-darwin :=tag unix i386-darwin :=tag unix
ppc-osx-mac :=tag mac ppc-osx-mac :=tag mac
@ -720,6 +721,7 @@ platform
ppc-darwin => "Mac OS X using X11 (PPC)" ppc-darwin => "Mac OS X using X11 (PPC)"
i386-darwin => "Mac OS X using X11 (Intel)" i386-darwin => "Mac OS X using X11 (Intel)"
i386-win32 => "Windows" i386-win32 => "Windows"
x86_64-win32 => "Windows x64"
;; generic platforms for source distributions ;; generic platforms for source distributions
unix => "Unix" unix => "Unix"
mac => "Macintosh" mac => "Macintosh"

View File

@ -51,6 +51,7 @@
["unix" "Unix"] ["unix" "Unix"]
;; binary platforms ;; binary platforms
["i386-win32" "Windows x86"] ["i386-win32" "Windows x86"]
["x86_64-win32" "Windows x64"]
["(ppc|i386)-osx-mac" ["(ppc|i386)-osx-mac"
,(lambda (_ cpu) ,(lambda (_ cpu)
(format "Macintosh OS X (~a)" (if (equal? cpu "ppc") "PPC" "Intel")))] (format "Macintosh OS X (~a)" (if (equal? cpu "ppc") "PPC" "Intel")))]