Files
es_build_deliv/windows_deliv/make_delivery.btm

388 lines
12 KiB
Plaintext

@echo off
setlocal
REM Save previous environment
REM FIXME: is it still needed with use of setlocal?
set OLD_PATH=%PATH
set OLD_EIFFEL_SRC=%EIFFEL_SRC
set OLD_ISE_LIBRARY=%ISE_LIBRARY
set OLD_ISE_SRC=%ISE_SRC
set TMP_ISE_EIFFEL=%ISE_EIFFEL
call %~dp0init.btm
remtrace Set up the environment
on break goto broken
TIMER ON /1 >> NUL
TIMER ON /2 >> NUL
iff %@INDEX[%@LOWER[%$],h] ge 0 then
echo Installation for ISE Eiffel .
echo Parameters are
echo - no_compile: to discard any compilation
echo - no_new_ec: to avoid compiling a new version of EiffelStudio
echo - enterprise: to build only the enterprise version of EiffelStudio
echo - gpl: to build only the GPL version of EiffelStudio
echo - no_wizards: to discard wizards building
echo - no_install: to generare only the delivery (but not the installation executable)
echo (or nothing to fully regenerate the installation).
CANCEL
endiff
iff %@INDEX[%@LOWER[%$],no_compil] ge 0 then
set NO_COMPILE="True"
else
unset /Q NO_COMPILE
endiff
iff %@INDEX[%@LOWER[%$],no_install] ge 0 then
set NO_INSTALL="True"
else
unset /Q NO_INSTALL
endiff
iff %@INDEX[%@LOWER[%$],no_new_ec] ge 0 then
set NO_NEW_EC="True"
else
unset /Q NO_NEW_EC
endiff
iff %@INDEX[%@LOWER[%$],enterprise] ge 0 then
set NO_GPL_BUILD="True"
endiff
iff %@INDEX[%@LOWER[%$],gpl] ge 0 then
set NO_ENTERPRISE_BUILD="True"
unset /Q BUILD_ENTERPRISE
set BUILD_GPL="True"
endiff
iff %@INDEX[%@LOWER[%$],no_wizard] ge 0 then
set NO_WIZARDS="True"
else
unset /Q NO_WIZARDS
endiff
cdd %INIT_DIR
call check_environment.btm
call inc\display_environment.btm
call inc\get_environment_confirmation.btm
if %ERRORLEVEL% == 0 CANCEL
REM This is not a comment, it should create a 0-sized log file.
REM > %INSTALL_LOG%
REM > %ERROR_LOG%
remtrace Approximative starting time:
remtrace %_TIME
remtrace --------------------------------
remtrace Installation parameters are:
remtrace - ISE_EIFFEL=%ISE_EIFFEL%
remtrace - ISE_PLATFORM=%ISE_PLATFORM%
remtrace - ISE_C_COMPILER=%ISE_C_COMPILER%
remtrace - ISE_C_COMPILER_VER=%ISE_C_COMPILER_VER%
remtrace - INSTALL_DIR=%INSTALL_DIR%
remtrace - STUDIO_DIR=%STUDIO_DIR%
remtrace --------------------------------
cdd %INIT_DIR
give_time_to warm up
remtrace Retrieve and organize the delivery
remtrace Remove %INSTALL_DIR
if isdir %INSTALL_DIR nolog_fullrd %INSTALL_DIR >>& %INSTALL_LOG
if exist %INSTALL_DIR nolog_fullrf %INSTALL_DIR >>& %INSTALL_LOG
iff exist %INSTALL_DIR then
echo Cannot delete %INSTALL_DIR!
CANCEL
endiff
md %INSTALL_DIR
md %STUDIO_DIR
cdd %STUDIO_DIR
remtrace studio
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/studio studio
fullrd studio\help\defaults\unix
fullrd studio\spec\unix
cdd %STUDIO_DIR\studio\spec
move windows\compile_library.bat %ISE_PLATFORM\bin\
move windows\mkdir.bat %ISE_PLATFORM\bin\
iff "windows"=="%ISE_PLATFORM" then
fullrd win64
else
fullrd windows
endiff
cdd %STUDIO_DIR\studio\config
if not "windows"=="%ISE_PLATFORM" ren windows %ISE_PLATFORM
cdd %STUDIO_DIR\studio\config\%ISE_PLATFORM%\
xcopy msc msc_vc140 /E /I
safe_md %STUDIO_DIR\tools
cdd %STUDIO_DIR\tools
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/tools/iron/delivery/iron iron
cdd %STUDIO_DIR\tools\iron\spec
if not "windows"=="%ISE_PLATFORM" ren windows %ISE_PLATFORM
fullrd unix
cdd %STUDIO_DIR\studio\lang
fullrd po_files
fullrd script
cdd %STUDIO_DIR
remtrace esbuilder
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/esbuilder esbuilder
remtrace vision2 tour
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/vision2_demo vision2_demo
remtrace examples
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/examples examples
cd examples
fullrd obsolete
fullrd eiffeltest
fullrd iphone
fullrd libevent
fullrd math
fullrd matisse
fullrd store\matisse
fullrd old_com
fullrd old_matisse
fullrd vision
fullrd build
cd dotnet
fullrd envision
fullrd winforms\data\simple_binding
cd ..
cd vision2
fullrd Boxes
fullrd drawing_area
fullrd ev_list
fullrd fake_event
fullrd figure
fullrd hello_world
fullrd menu
fullrd multicolumn_list
fullrd pixmap
fullrd split_area
fullrd test_all_widgets
fullrd test_events
fullrd tests
fullrd tutorial
fullrd widget_test
cd ..
cd ..
remtrace precomp
safe_md %STUDIO_DIR\experimental
safe_md %STUDIO_DIR\experimental\precomp
safe_md %STUDIO_DIR\experimental\precomp\spec
cd %STUDIO_DIR\experimental\precomp\spec
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/precomp/spec/platform %ISE_PLATFORM
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/precomp/spec/dotnet %ISE_PLATFORM-dotnet
cdd %ISE_PLATFORM
fullrf *-safe.ecf
cdd ..\%ISE_PLATFORM-dotnet
fullrf *-safe.ecf
safe_md %STUDIO_DIR\precomp
safe_md %STUDIO_DIR\precomp\spec
cd %STUDIO_DIR\precomp\spec
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/precomp/spec/platform %ISE_PLATFORM
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/precomp/spec/dotnet %ISE_PLATFORM-dotnet
cdd %STUDIO_DIR
remtrace wizards
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/wizards wizards
fullrf %STUDIO_DIR\studio\wizards\new_projects\wizard.dsc
fullrd %STUDIO_DIR\studio\wizards\new_projects\wizard
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/help/wizards/ewf/rootdir %STUDIO_DIR\studio\wizards\new_projects\ewf
move %STUDIO_DIR\studio\wizards\new_projects\ewf\ewf.dsc %STUDIO_DIR\studio\wizards\new_projects\ewf.dsc
remtrace C_library
safe_md %STUDIO_DIR\C_library
cdd %STUDIO_DIR\C_library
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/C_library/libpng libpng
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/C_library/zlib zlib
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/C_library/curl curl
safe_md openssl
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/C_library/openssl/clibs_openssl.ecf openssl
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/C_library/openssl/include openssl/include
cdd %STUDIO_DIR
remtrace root
exprt -N -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery Delivery
move Delivery\*.* . >>& %INSTALL_LOG
fullrd Delivery >>& %INSTALL_LOG
fullrf INSTALL README make_install compile_libraries
remtrace eweasel (just the necessary)
exprt -N -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/eweasel eweasel
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/eweasel/bin eweasel/bin
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/eweasel/control eweasel/control
fullrf %STUDIO_DIR\eweasel\INSTALL
remtrace MinGW files
cdd %STUDIO_DIR
safe_md gcc
cd gcc
exprt -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/free_add_ons/gcc/%ISE_PLATFORM% %ISE_PLATFORM%
remtrace Create directories
cdd %STUDIO_DIR
safe_md %STUDIO_DIR\studio\spec
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM
safe_md %STUDIO_DIR\esbuilder\spec
safe_md %STUDIO_DIR\esbuilder\spec\%ISE_PLATFORM
safe_md %STUDIO_DIR\esbuilder\spec\%ISE_PLATFORM\bin
safe_md %STUDIO_DIR\vision2_demo\spec
safe_md %STUDIO_DIR\vision2_demo\spec\%ISE_PLATFORM
safe_md %STUDIO_DIR\vision2_demo\spec\%ISE_PLATFORM\bin
safe_md %STUDIO_DIR\wizards
safe_md %STUDIO_DIR\wizards\com
safe_md %STUDIO_DIR\wizards\com\config
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM\include
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM\lib
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM\lib\msc
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM\lib\msc_vc140
safe_md %STUDIO_DIR\studio\spec\%ISE_PLATFORM\lib\mingw
safe_md %STUDIO_DIR\rb
give_time_to organize the delivery and to start filling it
remtrace Checkout all the libraries
cdd %INIT_DIR
call make_libraries.btm %STUDIO_DIR library
cdd %INIT_DIR
call make_libraries.btm %STUDIO_DIR\experimental experimental/library
cdd %INIT_DIR
call make_other_libraries.btm %STUDIO_DIR
:clibs
remtrace Compile C code of Eiffel Software C libraries
call %INIT_DIR\inc\set_has_c_compiler HAS_VC140 VC140
remtrace HAS_VC140=%HAS_VC140%
iff defined ISE_C_COMPILER_VER .and. "%ISE_C_COMPILER_VER%" != "VC140" then
call %INIT_DIR\inc\set_has_c_compiler HAS_C_COMP_VER %ISE_C_COMPILER_VER%
else
set "HAS_C_COMP_VER=False"
endiff
remtrace HAS_C_COMP_VER=%HAS_C_COMP_VER%
iff "%HAS_VC140%" == "True" then
cdd %INIT_DIR
remtrace Build the C libraries of non-Eiffel Software C libraries for msc_vc140
call espawn -u:VC140 "%COMSPEC% /c compile_c_libraries.btm %STUDIO_DIR msc_vc140"
endiff
iff "%HAS_C_COMP_VER%" == "True" then
remtrace Build the C libraries of non-Eiffel Software C libraries for %ISE_C_COMPILER_VER%
cdd %INIT_DIR
call espawn -u:%ISE_C_COMPILER_VER% "%COMSPEC% /c compile_c_libraries.btm %STUDIO_DIR msc"
endiff
cdd %INIT_DIR
remtrace Build the C libraries of non-Eiffel Software C libraries for mingw
call compile_c_libraries.btm %STUDIO_DIR mingw
iff "%HAS_VC140%" == "True" then
cdd %INIT_DIR
remtrace Build the Experimental C libraries of non-Eiffel Software C libraries for msc_vc140
call espawn -u:VC140 "%COMSPEC% /c compile_c_libraries.btm %STUDIO_DIR\experimental msc_vc140"
endiff
iff "%HAS_C_COMP_VER%" == "True" then
remtrace Build the Experimental C libraries of non-Eiffel Software C libraries for %ISE_C_COMPILER_VER%
cdd %INIT_DIR
espawn -u:%ISE_C_COMPILER_VER% "%COMSPEC% /c compile_c_libraries.btm %STUDIO_DIR\experimental msc"
endiff
cdd %INIT_DIR
remtrace Build the Experimental C libraries of non-Eiffel Software C libraries for mingw
call compile_c_libraries.btm %STUDIO_DIR\experimental mingw
iff "%HAS_VC140%" == "True" then
remtrace Build the other C libraries of non-Eiffel Software C libraries for msc_vc140
cdd %INIT_DIR
espawn -u:VC140 "%COMSPEC% /c compile_other_c_libraries.btm %STUDIO_DIR msc_vc140"
endiff
iff "%HAS_C_COMP_VER%" == "True" then
remtrace Build the other C libraries of non-Eiffel Software C libraries for %ISE_C_COMPILER_VER%
cdd %INIT_DIR
espawn -u:%ISE_C_COMPILER_VER% "%COMSPEC% /c compile_other_c_libraries.btm %STUDIO_DIR msc"
endiff
remtrace Build the other C libraries of non-Eiffel Software C libraries for mingw
cdd %INIT_DIR
call compile_other_c_libraries.btm %STUDIO_DIR mingw
cdd %INIT_DIR
REM Fill directories
iff not defined NO_COMPILE then
remtrace Update all libraries
iff isdir %EIFFEL_SRC then
remtrace Delete %EIFFEL_SRC
fullrd %EIFFEL_SRC
endiff
safe_md %EIFFEL_SRC
REM Clean up the files
remtrace Update all source files.
cdd %EIFFEL_SRC\..
co -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src %EIFFEL_SRC
iff not defined NO_ENTERPRISE_BUILD then
remtrace ISE specific files
cdd %EIFFEL_SRC
co %DEFAULT_ISE_SVN%/Src/library/keygen library/keygen
cd tools
co %DEFAULT_ISE_SVN%/Src/tools/activation activation
co %DEFAULT_ISE_SVN%/Src/tools/estudio_enterprise estudio_enterprise
endiff
remtrace Build the normal libraries
cdd %INIT_DIR
call update_libraries.btm %EIFFEL_SRC
remtrace Build the experimental libraries
cdd %INIT_DIR
call update_libraries.btm %EIFFEL_SRC\experimental
cdd %INIT_DIR
give_time_to update libraries
remtrace Generate needed executables of the bin directory
call make_exes.btm
cdd %INIT_DIR
give_time_to compile exes
iff not defined NO_WIZARDS then
remtrace Generate the precompilation and the "new project" wizards
call make_wizards.btm
cdd %INIT_DIR
give_time_to compile basic wizards
remtrace Generate the COM wizard
call make_com_wizard.btm
cdd %INIT_DIR
give_time_to compile the COM wizard
else
quick_move /s studio\wizards
quick_move /s wizards
endiff
cdd %INIT_DIR
remtrace Generate Resource Bench
call make_rb.btm
cdd %INIT_DIR
give_time_to compile Resource Bench
else
remtrace Copy executable files from the old delivery
quick_move /s studio\spec
quick_move /s studio\wizards
quick_move /s rb
quick_move /s wizards
cdd %STUDIO_DIR
give_time_to copy executables from the old delivery
endiff
call %INIT_DIR%\call_make_installations.btm
cdd %INIT_DIR%
REM Finish
remtrace final time:
remtrace %_TIME
remtrace total used time:
remtrace %@TIMER[2]
REM Error handling and normal ending
:broken
CANCEL