2 if not exist Nmakefile goto wrong_dir
\r
4 if /i %PROCESSOR_ARCHITECTURE%==AMD64 (
\r
6 set _bootimage="boot.winnt-x86.64.image"
\r
9 set _bootimage="boot.winnt-x86.32.image"
\r
12 if "%1"=="/?" goto usage
\r
15 set _bootimage_version="latest"
\r
16 set _git_branch=master
\r
19 set _bootimage_version="latest"
\r
20 set _git_branch=master
\r
23 set _bootimage_version="clean"
\r
24 set _git_branch=clean-winnt-%_target%
\r
27 if not defined _bootimage_version goto usage
\r
29 echo Updating working copy...
\r
30 cmd /c "git pull http://factorcode.org/git/factor.git %_git_branch%"
\r
31 if not errorlevel 0 goto fail
\r
34 nmake /nologo /f Nmakefile clean
\r
35 if not errorlevel 0 goto fail
\r
36 nmake /nologo /f Nmakefile %_target%
\r
37 if not errorlevel 0 goto fail
\r
39 echo Fetching %_bootimage_version% boot image...
\r
40 cscript /nologo build-support\http-get.vbs http://factorcode.org/images/%_bootimage_version%/%_bootimage% %_bootimage%
\r
41 if not errorlevel 0 goto fail
\r
43 echo Bootstrapping...
\r
44 .\factor.com -i=%_bootimage%
\r
45 if not errorlevel 0 goto fail
\r
47 echo Build complete.
\r
55 echo build-support\factor.cmd must be run from the root of the Factor source tree.
\r
59 echo Usage: build-support\factor.cmd [latest/clean]
\r
60 echo Updates the working copy, cleans and builds the vm using nmake,
\r
61 echo fetches a boot image, and bootstraps factor.
\r
62 echo If latest is specified, then the working copy is updated to the
\r
63 echo upstream "master" branch and the boot image corresponding to the
\r
64 echo most recent factor build is downloaded. This is the default.
\r
65 echo If clean is specified, then the working copy is updated to the
\r
66 echo upstream "clean-winnt-*" branch corresponding to the current
\r
67 echo platform and the corresponding boot image is downloaded.
\r
73 set _bootimage_version=
\r