From 12e9c09911bc92a05428206343fa07946708b551 Mon Sep 17 00:00:00 2001 From: Jocelyn FIAT Date: Fri, 7 Sep 2018 19:33:13 +0200 Subject: [PATCH] Added a solution to generate only GPL version. --- windows_deliv/etc/config.btm | 2 +- windows_deliv/etc/local-WINPC.btm | 2 +- windows_deliv/etc/machines/WINPC.btm | 4 +- windows_deliv/inc/display_environment.btm | 6 + .../install/includes/Preprocessors.wxi | 24 ++-- windows_deliv/make_delivery.btm | 11 +- windows_deliv/make_exes.btm | 116 +++++++++--------- windows_deliv/make_installations.btm | 65 ++++++---- windows_deliv/menu.bat | 17 ++- 9 files changed, 140 insertions(+), 107 deletions(-) diff --git a/windows_deliv/etc/config.btm b/windows_deliv/etc/config.btm index 5be7194..f58c71e 100644 --- a/windows_deliv/etc/config.btm +++ b/windows_deliv/etc/config.btm @@ -17,7 +17,7 @@ endiff REM General configuration iff not defined STUDIO_VERSION_MAJOR_MINOR then - set STUDIO_VERSION_MAJOR_MINOR=18.06 + set STUDIO_VERSION_MAJOR_MINOR=18.11 endiff iff not defined WORK_DIR then diff --git a/windows_deliv/etc/local-WINPC.btm b/windows_deliv/etc/local-WINPC.btm index c7141a0..c9b17fc 100644 --- a/windows_deliv/etc/local-WINPC.btm +++ b/windows_deliv/etc/local-WINPC.btm @@ -29,7 +29,7 @@ iff not defined WORK_DIR then endiff iff not defined DEFAULT_PUBLIC_SVN then set DEFAULT_PUBLIC_SVN=file:///C:/DEV/ise/repos/mirrors/svn/eiffelstudio/trunk - set DEFAULT_PUBLIC_SVN=svn://192.168.1.11:3699/trunk + rem set DEFAULT_PUBLIC_SVN=svn://192.168.1.11:3699/trunk endiff iff not defined DEFAULT_ISE_SVN then set DEFAULT_ISE_SVN=svn://jfiat@svn.ise:3691/ise_svn/trunk diff --git a/windows_deliv/etc/machines/WINPC.btm b/windows_deliv/etc/machines/WINPC.btm index c7141a0..7cd3d25 100644 --- a/windows_deliv/etc/machines/WINPC.btm +++ b/windows_deliv/etc/machines/WINPC.btm @@ -29,12 +29,12 @@ iff not defined WORK_DIR then endiff iff not defined DEFAULT_PUBLIC_SVN then set DEFAULT_PUBLIC_SVN=file:///C:/DEV/ise/repos/mirrors/svn/eiffelstudio/trunk - set DEFAULT_PUBLIC_SVN=svn://192.168.1.11:3699/trunk + rem set DEFAULT_PUBLIC_SVN=svn://192.168.1.11:3699/trunk endiff iff not defined DEFAULT_ISE_SVN then set DEFAULT_ISE_SVN=svn://jfiat@svn.ise:3691/ise_svn/trunk set DEFAULT_ISE_SVN=file:///C:/DEV/ise/repos/mirrors/svn/ise/trunk - set DEFAULT_ISE_SVN=svn://192.168.1.11:3698/trunk + rem set DEFAULT_ISE_SVN=svn://192.168.1.11:3698/trunk endiff rem set PATH=%PATH%;C:\cygwin64\bin diff --git a/windows_deliv/inc/display_environment.btm b/windows_deliv/inc/display_environment.btm index 4f3e187..1795a38 100644 --- a/windows_deliv/inc/display_environment.btm +++ b/windows_deliv/inc/display_environment.btm @@ -6,6 +6,12 @@ echo ISE_PLATFORM=%ISE_PLATFORM echo DELIV_DIR=%DELIV_DIR echo INSTALL_DIR=%INSTALL_DIR echo STUDIO_DIR=%STUDIO_DIR +iff defined NO_GPL_BUILD then + echo NO_GPL_BUILD=%NO_GPL_BUILD +endiff +iff defined NO_ENTERPRISE_BUILD then + echo NO_ENTERPRISE_BUILD=%NO_ENTERPRISE_BUILD +endiff echo Log file location: %INSTALL_LOG echo The private ISE svn repository: %DEFAULT_ISE_SVN echo The public svn repository: %DEFAULT_PUBLIC_SVN diff --git a/windows_deliv/install/includes/Preprocessors.wxi b/windows_deliv/install/includes/Preprocessors.wxi index 8bf0866..e481828 100644 --- a/windows_deliv/install/includes/Preprocessors.wxi +++ b/windows_deliv/install/includes/Preprocessors.wxi @@ -30,19 +30,19 @@ - - - + + + - - - + + + - + - - - + + + @@ -61,7 +61,7 @@ - + @@ -70,7 +70,7 @@ - + diff --git a/windows_deliv/make_delivery.btm b/windows_deliv/make_delivery.btm index b6a5104..202c088 100644 --- a/windows_deliv/make_delivery.btm +++ b/windows_deliv/make_delivery.btm @@ -21,6 +21,7 @@ iff %@INDEX[%@LOWER[%$],h] ge 0 then 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). @@ -42,9 +43,12 @@ else unset /Q NO_NEW_EC endiff iff %@INDEX[%@LOWER[%$],enterprise] ge 0 then - set BUILD_ENTERPRISE_ONLY="True" -else - unset /Q BUILD_ENTERPRISE_ONLY + 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" @@ -367,7 +371,6 @@ else endiff call %INIT_DIR%\call_make_installations.btm - cdd %INIT_DIR% REM Finish diff --git a/windows_deliv/make_exes.btm b/windows_deliv/make_exes.btm index af84e03..78720b9 100644 --- a/windows_deliv/make_exes.btm +++ b/windows_deliv/make_exes.btm @@ -85,8 +85,8 @@ cd %EIFFEL_SRC\framework\cli_debugger\Clib default_make REM Compiling EiffelStudio stuff -iff defined BUILD_ENTERPRISE_ONLY then - remtrace BUILD_ENTERPRISE_ONLY +iff defined NO_GPL_BUILD then + remtrace NO_GPL_BUILD=BUILD_ENTERPRISE_ONLY remtrace Recompile EiffelStudio cdd %FINALIZATION_DIR safe_copy %EIFFEL_SRC\Eiffel\Ace\*.* . @@ -126,63 +126,67 @@ iff defined BUILD_ENTERPRISE_ONLY then else iff not defined NO_NEW_EC then - remtrace GPL edition - cdd %EIFFEL_SRC\Eiffel\API\constants - remtrace update version for system_constants.e - set_version %EIFFEL_SRC 0000 system_constants.e - cdd %FINALIZATION_DIR - safe_copy %EIFFEL_SRC\Eiffel\Ace\*.* . - clean_project - remtrace finalize GPL edition "bench" - finalize ec.ecf bench - cleanup_eiffel bench ec.exe - iff exist ec.exe then - move ec.exe %INSTALL_DIR\releases\gpl_version - else - remerror Could not finalize a new "gpl_edition" EiffelStudio - CANCEL_ON_ERROR + iff not defined NO_GPL_BUILD then + remtrace GPL edition + cdd %EIFFEL_SRC\Eiffel\API\constants + remtrace update version for system_constants.e + set_version %EIFFEL_SRC 0000 system_constants.e + cdd %FINALIZATION_DIR + safe_copy %EIFFEL_SRC\Eiffel\Ace\*.* . + clean_project + remtrace finalize GPL edition "bench" + finalize ec.ecf bench + cleanup_eiffel bench ec.exe + iff exist ec.exe then + move ec.exe %INSTALL_DIR\releases\gpl_version + else + remerror Could not finalize a new "gpl_edition" EiffelStudio + CANCEL_ON_ERROR + endiff + + clean_project + remtrace finalize GPL edition "batch" + finalize ec.ecf batch + cleanup_eiffel batch ecb.exe + iff exist ecb.exe then + move ecb.exe %INSTALL_DIR\releases\gpl_version + else + remerror Could not finalize a new batch version of the compiler + CANCEL_ON_ERROR + endiff + + exprtfile -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/scripts/licensing/eiffelstudio/gpl.txt > %INSTALL_DIR\releases\gpl_version\LICENSE endiff - clean_project - remtrace finalize GPL edition "batch" - finalize ec.ecf batch - cleanup_eiffel batch ecb.exe - iff exist ecb.exe then - move ecb.exe %INSTALL_DIR\releases\gpl_version - else - remerror Could not finalize a new batch version of the compiler - CANCEL_ON_ERROR + iff not defined NO_ENTERPRISE_BUILD then + remtrace Enterprise edition for EiffelStudio + cdd %EIFFEL_SRC\Eiffel\API\constants + sed -e "s/Version_type_name:\ STRING\ =\ \"GPL\ Edition\"/Version_type_name:\ STRING\ =\ \"Enterprise\ Edition\"/g" system_constants.e >> new_system_constants.e + move new_system_constants.e system_constants.e + cdd %FINALIZATION_DIR + clean_project + safe_copy %EIFFEL_SRC\tools\estudio_enterprise\ec.ecf ec.ecf + finalize ec.ecf bench + cleanup_eiffel bench ec.exe + iff exist ec.exe then + move ec.exe %INSTALL_DIR\releases\enterprise_version + else + remerror Could not finalize a new "enterprise_version" EiffelStudio + CANCEL_ON_ERROR + endiff + + clean_project + finalize ec.ecf batch + cleanup_eiffel batch ecb.exe + iff exist ecb.exe then + move ecb.exe %INSTALL_DIR\releases\enterprise_version + else + remerror Could not finalize a new batch version of the compiler + CANCEL_ON_ERROR + endiff + + exprtfile -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/scripts/licensing/eiffelstudio/enterprise.txt > %INSTALL_DIR\releases\enterprise_version\LICENSE endiff - - exprtfile -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/scripts/licensing/eiffelstudio/gpl.txt > %INSTALL_DIR\releases\gpl_version\LICENSE - - remtrace Enterprise edition for EiffelStudio - cdd %EIFFEL_SRC\Eiffel\API\constants - sed -e "s/Version_type_name:\ STRING\ =\ \"GPL\ Edition\"/Version_type_name:\ STRING\ =\ \"Enterprise\ Edition\"/g" system_constants.e >> new_system_constants.e - move new_system_constants.e system_constants.e - cdd %FINALIZATION_DIR - clean_project - safe_copy %EIFFEL_SRC\tools\estudio_enterprise\ec.ecf ec.ecf - finalize ec.ecf bench - cleanup_eiffel bench ec.exe - iff exist ec.exe then - move ec.exe %INSTALL_DIR\releases\enterprise_version - else - remerror Could not finalize a new "enterprise_version" EiffelStudio - CANCEL_ON_ERROR - endiff - - clean_project - finalize ec.ecf batch - cleanup_eiffel batch ecb.exe - iff exist ecb.exe then - move ecb.exe %INSTALL_DIR\releases\enterprise_version - else - remerror Could not finalize a new batch version of the compiler - CANCEL_ON_ERROR - endiff - - exprtfile -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/scripts/licensing/eiffelstudio/enterprise.txt > %INSTALL_DIR\releases\enterprise_version\LICENSE endiff endiff diff --git a/windows_deliv/make_installations.btm b/windows_deliv/make_installations.btm index 30dba17..2452bdb 100644 --- a/windows_deliv/make_installations.btm +++ b/windows_deliv/make_installations.btm @@ -86,50 +86,61 @@ remtrace Creating WIX files espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo clean" espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo" -remtrace Preparing GPL edition -espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo gpl_%WINNAME" -safe_copy %INIT_DIR\install\bin\studio_gpl_%WINNAME\package.msi %INSTALL_DIR\setups\gpl\%STUDIO_NAME%_gpl_%SVN_VERSION-%ISE_PLATFORM%.msi +iff not NO_GPL_BUILD then + remtrace Preparing GPL edition + espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo gpl_%WINNAME" + safe_copy %INIT_DIR\install\bin\studio_gpl_%WINNAME\package.msi %INSTALL_DIR\setups\gpl\%STUDIO_NAME%_gpl_%SVN_VERSION-%ISE_PLATFORM%.msi +endiff -remtrace Preparing Commercial edition -espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo enterprise_%WINNAME" -safe_copy %INIT_DIR\install\bin\studio_ent_%WINNAME\package.msi %INSTALL_DIR\setups\enterprise\%STUDIO_NAME%_ent_%SVN_VERSION-%ISE_PLATFORM%.msi +iff not NO_ENTERPRISE_BUILD then + remtrace Preparing Commercial edition + espawn -u:%ISE_C_COMPILER_VER% "nmake /nologo enterprise_%WINNAME" + safe_copy %INIT_DIR\install\bin\studio_ent_%WINNAME\package.msi %INSTALL_DIR\setups\enterprise\%STUDIO_NAME%_ent_%SVN_VERSION-%ISE_PLATFORM%.msi +endiff remtrace ---------------------------------------------- remtrace Building the Zips remtrace ---------------------------------------------- cdd %INSTALL_DIR -ren EiffelStudio %STUDIO_NAME% - -safe_copy %INSTALL_DIR\releases\gpl_version\ec.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin -safe_copy %INSTALL_DIR\releases\gpl_version\ecb.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin -iff exist %INSTALL_DIR\releases\gpl_version\LICENSE then - safe_copy %INSTALL_DIR\releases\gpl_version\LICENSE %INSTALL_DIR\%STUDIO_NAME%\LICENSE -else - remtrace Missing GPL license text +iff not NO_GPL_BUILD then + ren EiffelStudio %STUDIO_NAME% + remtrace GPL archive + safe_copy %INSTALL_DIR\releases\gpl_version\ec.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin + safe_copy %INSTALL_DIR\releases\gpl_version\ecb.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin + iff exist %INSTALL_DIR\releases\gpl_version\LICENSE then + safe_copy %INSTALL_DIR\releases\gpl_version\LICENSE %INSTALL_DIR\%STUDIO_NAME%\LICENSE + else + remtrace Missing GPL license text + endiff + 7z a -t7z %INSTALL_DIR\setups\gpl\%STUDIO_NAME%_gpl_%SVN_VERSION-%ISE_PLATFORM%.7z %STUDIO_NAME% -mx9 >>& %INSTALL_LOG endiff -7z a -t7z %INSTALL_DIR\setups\gpl\%STUDIO_NAME%_gpl_%SVN_VERSION-%ISE_PLATFORM%.7z %STUDIO_NAME% -mx9 >>& %INSTALL_LOG -safe_copy %INSTALL_DIR\releases\enterprise_version\ec.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin -safe_copy %INSTALL_DIR\releases\enterprise_version\ecb.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin -iff exist %INSTALL_DIR\releases\enterprise_version\LICENSE then - safe_copy %INSTALL_DIR\releases\enterprise_version\LICENSE %INSTALL_DIR\%STUDIO_NAME%\LICENSE -else - remtrace Missing Enterprise license text +iff not NO_ENTERPRISE_BUILD then + remtrace Enterprise archive + safe_copy %INSTALL_DIR\releases\enterprise_version\ec.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin + safe_copy %INSTALL_DIR\releases\enterprise_version\ecb.exe %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin + iff exist %INSTALL_DIR\releases\enterprise_version\LICENSE then + safe_copy %INSTALL_DIR\releases\enterprise_version\LICENSE %INSTALL_DIR\%STUDIO_NAME%\LICENSE + else + remtrace Missing Enterprise license text + endiff + 7z a -t7z %INSTALL_DIR\setups\enterprise\%STUDIO_NAME%_ent_%SVN_VERSION-%ISE_PLATFORM%.7z %STUDIO_NAME% -mx9 >>& %INSTALL_LOG endiff -7z a -t7z %INSTALL_DIR\setups\enterprise\%STUDIO_NAME%_ent_%SVN_VERSION-%ISE_PLATFORM%.7z %STUDIO_NAME% -mx9 >>& %INSTALL_LOG remtrace Restoring the layout to its original state cdd %INSTALL_DIR ren %STUDIO_NAME% EiffelStudio remtrace Uploading packages online -cdd %INSTALL_DIR\setups\gpl -share_delivery %STUDIO_NAME%_gpl_%SVN_VERSION%-%ISE_PLATFORM%.msi -share_delivery %STUDIO_NAME%_gpl_%SVN_VERSION%-%ISE_PLATFORM%.7z +iff not NO_GPL_BUILD then + cdd %INSTALL_DIR\setups\gpl + share_delivery %STUDIO_NAME%_gpl_%SVN_VERSION%-%ISE_PLATFORM%.msi + share_delivery %STUDIO_NAME%_gpl_%SVN_VERSION%-%ISE_PLATFORM%.7z +endiff -fullrf %INSTALL_DIR\EiffelStudio\studio\spec\%ISE_PLATFORM%\bin\ec.exe -fullrf %INSTALL_DIR\EiffelStudio\studio\spec\%ISE_PLATFORM%\bin\ecb.exe +fullrf %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin\ec.exe +fullrf %INSTALL_DIR\%STUDIO_NAME%\studio\spec\%ISE_PLATFORM%\bin\ecb.exe remtrace Your deliveries are now ready cdd %INIT_DIR diff --git a/windows_deliv/menu.bat b/windows_deliv/menu.bat index d80329e..9b6112f 100644 --- a/windows_deliv/menu.bat +++ b/windows_deliv/menu.bat @@ -1,8 +1,9 @@ @echo off setlocal set TCCLECMD="C:\apps\JPSoft\TCCLE14x64\tcc.exe" +set TCCLECMD="C:\Program Files\JPSoft\TCCLE14x64\tcc.exe" -@echo EiffelStudio delivery: +echo EiffelStudio delivery: @echo 1: make_delivery @echo 2: make_exes @@ -10,26 +11,34 @@ set TCCLECMD="C:\apps\JPSoft\TCCLE14x64\tcc.exe" @echo 4: starting environment @echo 5: bootstrap environment @echo 6: display logs +@echo 7: make_gpl_delivery @echo ------------------- @echo i: display info @echo ------------------- @echo q: quit -CHOICE /C 123456iq /M " > selection:" +CHOICE /C 1234567iq /M " > selection:" if .%ERRORLEVEL%. == .1. GOTO make_delivery if .%ERRORLEVEL%. == .2. GOTO make_exes if .%ERRORLEVEL%. == .3. GOTO make_installations if .%ERRORLEVEL%. == .4. GOTO starting_env if .%ERRORLEVEL%. == .5. GOTO bootstrap_env if .%ERRORLEVEL%. == .6. GOTO display_logs -if .%ERRORLEVEL%. == .7. GOTO display_info -if .%ERRORLEVEL%. == .8. goto end +if .%ERRORLEVEL%. == .7. GOTO make_gpl_delivery +if .%ERRORLEVEL%. == .8. GOTO display_info +if .%ERRORLEVEL%. == .9. goto end goto end :make_delivery %TCCLECMD% /C make_delivery.btm goto end +:make_gpl_delivery +echo Build only GPL delivery +set NO_ENTERPRISE_BUILD="True" +%TCCLECMD% /C make_delivery.btm +goto end + :make_exes %TCCLECMD% /C make_exes.btm goto end