REM Don't copy this script to a different directory, it must be in REM cipres\cipres-build-scripts\build-for-windows. It expects to REM find buildConfig.bat above the cipres directory. REM @echo off call %~dp0\..\..\..\buildConfig.bat setlocal set X_ORIG_DIR=%CD% set SCRIPT_DIR=%~dp0 set X_DISABLE_CXX=0 set X_DISABLE_JAVA=0 set X_DISABLE_PYTHON=0 set X_DISABLE_TOOLS=0 set X_DISABLE_HELP=0 set X_ENABLE_TEST=0 set X_ONLY_TEST=0 :ProcessArguments IF "%1" == "" goto Continue if "%1" == "--disable-cxx-lib" set X_DISABLE_CXX=1 if "%1" == "--disable-java-lib" set X_DISABLE_JAVA=1 if "%1" == "--disable-python-lib" set X_DISABLE_PYTHON=1 if "%1" == "--disable-tools-lib" set X_DISABLE_TOOLS=1 if "%1" == "--disable-help" set X_DISABLE_HELP=1 if "%1" == "--enable-test" set X_ENABLE_TEST=1 if "%1" == "--only-test" set X_ONLY_TEST=1 shift goto ProcessArguments :Continue REM xcopy args: /Y=overwrite silently, /I=silently assume dest is dir if src is a dir or multiple files, REM /S=copy whole subtree REM xcopy creates directories along dest path as needed. REM if "%X_ONLY_TEST%" == "1" set X_ENABLE_TEST=1 if "%X_ONLY_TEST%" == "1" goto Test if "%X_DISABLE_TOOLS%" == "1" goto Install_package_data :Install_omniORB_Runtime xcopy /I /Y "%OMNIORB_TOP%\bin\x86_win32\*.dll" "%CIPRES_INSTALL%\bin" :Install_omniORBpy_Runtime xcopy /I /Y /S "%OMNIORB_PY_TOP%\lib\python\*" "%CIPRES_INSTALL%\lib\python\site-packages" xcopy /I /Y /S "%OMNIORB_PY_TOP%\lib\x86_win32\*" "%CIPRES_INSTALL%\lib\python\site-packages" :Install_msvc_Runtime xcopy /I /Y "%MSVCP_DLL%" "%CIPRES_INSTALL%\bin" xcopy /I /Y "%MSVCR_DLL%" "%CIPRES_INSTALL%\bin" :Install_package_data REM copy the whole help directory tree if "%X_DISABLE_HELP%" == "1" goto Install_rest_of_package_data xcopy /I /Y /S "%CIPRES_TOP%\package_data\help\*" "%CIPRES_INSTALL%\share\cipres\help" :Install_rest_of_package_data REM copy the xml directory tree xcopy /I /Y /S "%CIPRES_TOP%\package_data\xml\*" "%CIPRES_INSTALL%\share\cipres\xml" REM copy the whole resources directory tree xcopy /I /Y /S "%CIPRES_TOP%\package_data\resources\*" "%CIPRES_INSTALL%\share\cipres\resources" REM now make some changes in the resources tree: REM Everywhere we find a registry_win.xml file, copy it to registry.xml in the same directory. REM for /R "%CIPRES_INSTALL%\share\cipres\resources" %%i in (registry_win.xml) do call :replaceReg "%%i" registry_win.xml registry.xml REM Remove @variable@ references from *.properties.in to create .properties files. REM On autoconf builds the @variables@ would be replaced by configure but on windows we just want to replace REM them with "" so that the properties on the lhs will be unset. python "%SCRIPT_DIR%\..\removeQuoted.py" "%CIPRES_TOP%\package_data\resources\install.properties.in" "%CIPRES_INSTALL%\share\cipres\resources\install.properties" -DPACKAGE_VERSION=%PACKAGE_VERSION% python "%SCRIPT_DIR%\..\removeQuoted.py" "%CIPRES_TOP%\package_data\resources\system.properties.in" "%CIPRES_INSTALL%\share\cipres\resources\system.properties" :Install_Cxx if "%X_DISABLE_CXX%" == "1" goto Install_Java SET X_DIR=%CIPRES_TOP%\framework\C++\build\VC7 REM - copy release and debug libcipres libraries xcopy /I /Y "%X_DIR%\cipres*.lib" "%CIPRES_INSTALL%\lib\cipres" REM - copy libcipres "public" header files xcopy /I /Y /S "%CIPRES_TOP%\framework\C++\CipresIDL\*.h*" "%CIPRES_INSTALL%\include\cipres\CipresIDL" xcopy /I /Y /S "%CIPRES_TOP%\framework\C++\CipresIDL\*.h*" "%CIPRES_INSTALL%\include\cipres\CipresIDL" xcopy /I /Y /S "%CIPRES_TOP%\framework\C++\CipresCommlib\*.h*" "%CIPRES_INSTALL%\include\cipres\CipresCommlib" copy /Y "%X_DIR%\config.h" "%CIPRES_INSTALL%\include\cipres" copy /Y "%CIPRES_TOP%\config\cipres_config.h" "%CIPRES_INSTALL%\include\cipres" REM - copy phycas and ncl library libraries. I think this one lib is equivalent to the REM - two libs we build on *.nix platforms: ciphycas = libncl and libphycas. set X_DIR=%CIPRES_TOP%\phyloservices\phycas\cipres_services\VC7 copy /Y "%X_DIR%\ciphycas.lib" "%CIPRES_INSTALL%\lib\cipres" copy /Y "%X_DIR%\ciphycasd.lib" "%CIPRES_INSTALL%\lib\cipres" REM - copy phycas and ncl library header files xcopy /I /Y /S "%CIPRES_TOP%\phyloservices\phycas\phycas\*.h*" "%CIPRES_INSTALL%\include\phycas" xcopy /I /Y /S "%CIPRES_TOP%\phyloservices\phycas\ncl\*.h*" "%CIPRES_INSTALL%\include\ncl" REM - copy binaries (todo: change the .vcproj files so they put binaries in the src tree). xcopy /I /Y "%CIPRES_TOP%\cipres_dist\bin\*.exe" "%CIPRES_INSTALL%\bin" :Install_Java if "%X_DISABLE_JAVA%" == "1" goto Install_Python call "%ANT%" install -buildfile "%CIPRES_TOP%\framework\java\cipres-idl-jar\build.xml" call "%ANT%" install -buildfile "%CIPRES_TOP%\framework\java\cipres-library-jar\build.xml" call "%ANT%" install -buildfile "%CIPRES_TOP%\cipres-examples\cipresapp\build.xml" xcopy /I /Y "%CIPRES_TOP%\framework\etc\*.bat" "%CIPRES_INSTALL%\bin" xcopy /I /Y "%CIPRES_TOP%\cipres-examples\cipresapp\etc\*.bat" "%CIPRES_INSTALL%\bin" :Install_Python if "%X_DISABLE_PYTHON%" == "1" goto Exit set PYTHONPATH=%ORB_PYTHONPATH% set PATH=%OMNIORB_PY_TOP%\bin\x86_win32;%OMNIORB_TOP%\bin\x86_win32;%PATH% set PIPRES_DIR=%CIPRES_TOP%\framework\python cd "%PIPRES_DIR%" python setup.py install --prefix="%CIPRES_INSTALL%" --install-purelib="%CIPRES_INSTALL%\lib\python\site-packages" ^ --install-platlib="%CIPRES_INSTALL%\lib\python\site-packages" cd "%X_ORIG_DIR%" :Test if "%X_ENABLE_TEST%" == "0" goto Exit call "%ANT%" install-check -buildfile "%CIPRES_TOP%\cipres-examples\cipresapp\build.xml" if errorlevel 1 goto Error goto Exit :Error echo InstallCipres had an error. exit /B 1 :Exit cd "%X_ORIG_DIR%" exit /B 0 :replaceReg set dir=%~dp1 set src=%dir%\%2 if not exist "%src%" goto :eof set dest=%dir%\%3 copy /Y %src% %dest% goto :eof