echo off REM makeCIPRES.bat REM This is used by developer's who've downloaded winCIPRES.zip to REM check out the latest code, build and configure it. It's also used REM in our nightly build process to create binary distributions. It REM should be run from winCIPRES, the directory that contains CIPRES-1.0.1 REM subdirectory. By default it: REM - updates cipres from svn REM - runs python build_cipres.py REM - runs ant configure REM It accepts these arguments: REM -n tells build_cipres.py not to prompt for username REM -nc don't update cipres from svn REM -nb don't do build and configure steps REM REM Prerequisites REM - python2.4, ant 1.6.5, java 1.4 installed and in path REM - svn and cvs installed and in path REM REM To run unattended (eg. as a nightly build job) : REM - set up passwordless ssh auth to myfiles.sdsc.edu. REM - make sure svn to http://nladr-cvs.sdsc.edu/svn/CIPRES doesn't prompt for password REM - invoke makeCIPRES.bat as "makeCIPRES.bat -n -p". REM "-n" is passed on to build_cipres.py to skip prompting for username in cvs dirs. REM REM REM CIPRES_VER needs to match the CIPRES-ver directory REM names in the build tree and the version numbers in orig_cipres_in.xml which is created from REM win_orig_cipres_in.xml (see below). REM REM Arguments: REM echo on set CIPRES_VER=1.0.1 set NO_PROMPTING= set CIPRES_UPDATE=1 set DO_BUILD=1 set XX_ORIG_DIR=%CD% :ProcessArguments IF "%1"=="" goto Continue if "%1" == "-n" set NO_PROMPTING=-n if "%1" == "-nc" set CIPRES_UPDATE=0 if "%1" == "-nb" set DO_BUILD=0 shift goto ProcessArguments :Continue echo NO_PROMPTING="%NO_PROMPTING%" CIPRES_UPDATE="%CIPRES_UPDATE%" DO_BUILD="%DO_BUILD%" if "%CIPRES_UPDATE%"=="0" goto Build chdir CIPRES-%CIPRES_VER%\cipres if errorlevel 1 goto error svn update if errorlevel 1 goto error chdir ..\.. copy /Y CIPRES-%CIPRES_VER%\cipres\cipres_dist\build.xml CIPRES-%CIPRES_VER%\cipres\build.xml copy /Y CIPRES-%CIPRES_VER%\cipres\cipres_dist\build-scripts.xml CIPRES-%CIPRES_VER%\cipres\build-scripts.xml copy /Y CIPRES-%CIPRES_VER%\cipres\cipres_dist\build-macros.xml CIPRES-%CIPRES_VER%\cipres\build-macros.xml copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\_util.py _util.py copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\build_cipres.py build_cipres.py copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\build_cipres_logging.conf build_cipres_logging.conf copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\normal_build_cipres_logging.conf normal_build_cipres_logging.conf copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\win_orig_cipres_in.xml win_orig_cipres_in.xml copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\product.py product.py copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\target_base.py target_base.py copy /Y CIPRES-%CIPRES_VER%\cipres\framework\etc\target_logic.py target_logic.py :Build if "%DO_BUILD%" == "0" goto ok python build_cipres.py %NO_PROMPTING% build cipres if errorlevel 1 goto error :Configure chdir CIPRES-%CIPRES_VER%\cipres call ant configure if errorlevel 1 goto error echo on chdir ..\.. goto ok :error @echo "An error occurred!" cd %XX_ORIG_DIR% exit /B 1 :ok @echo "makeCIPRES.bat had no errors." cd %XX_ORIG_DIR%