From 1fc27ceb49a862c4e5e2fc5d4cd7fb0eecff284a Mon Sep 17 00:00:00 2001 From: Jocelyn FIAT Date: Thu, 27 Sep 2018 14:02:31 +0200 Subject: [PATCH] Added script to fix dotnet Eiffel compilation. Updated delivery script for minor changes. --- build_fix_dotnet.bat | 47 +++++++++++++++++++++++++ windows_deliv/etc/machines/WINPC.btm | 2 +- windows_deliv/make_exes.btm | 51 ++++++++++++++++------------ windows_deliv/set_simple_aliases.btm | 2 +- 4 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 build_fix_dotnet.bat diff --git a/build_fix_dotnet.bat b/build_fix_dotnet.bat new file mode 100644 index 0000000..f53660a --- /dev/null +++ b/build_fix_dotnet.bat @@ -0,0 +1,47 @@ +@echo off +setlocal +rem Output a set of command to remove EiffelSoftware regasm-registered dll. +rem removing the related reg key helps fixing dotnet Eiffel compilation. +rem +rem Usage: build_fix_dotnet.bat > fix_dotnet.bat.bat +rem - edit, check and modify if needed, the "fix_dotnet.bat.bat" script +rem - then execute "fix_dotnet.bat.bat" following the requirements. +rem Requirements: +rem - have ISE_EIFFEL and ISE_PLATFORM set, in order to perform new registration using regasm. +rem - run "fix_dotnet.bat.bat" in administration mode. + +set TMP_SCRIPT_FILENAME=fix_dotnet.bat + +echo REM Build script to fix dotnet Eiffel environment... + +echo REM Fix dotnet Eiffel environment > %TMP_SCRIPT_FILENAME% + +reg query HKCR > %TMP_SCRIPT_FILENAME%.tmp +for /f %%f in ('findstr "EiffelSoftware" %TMP_SCRIPT_FILENAME%.tmp') do call :getclsid %%f +del %TMP_SCRIPT_FILENAME%.tmp + +echo %ISE_EIFFEL%\tools\spec\%ISE_PLATFORM%\bin\espawn.exe "regasm %ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin\EiffelSoftware.Runtime.dll" >> %TMP_SCRIPT_FILENAME% +echo %ISE_EIFFEL%\tools\spec\%ISE_PLATFORM%\bin\espawn.exe "regasm %ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin\EiffelSoftware.MetadataConsumer.dll" >> %TMP_SCRIPT_FILENAME% + +echo REM completed, see %TMP_SCRIPT_FILENAME% + +goto end + + +:getclsid +::echo getclsid %1 +reg query "%1\CLSID" > %TMP_SCRIPT_FILENAME%.tmp2 +for /f "tokens=3*" %%a in ('findstr "Default" %TMP_SCRIPT_FILENAME%.tmp2') do call :delclsid %%a +del %TMP_SCRIPT_FILENAME%.tmp2 + +echo REG DELETE %1 /f +echo REG DELETE %1 /f >> %TMP_SCRIPT_FILENAME% +goto :EOF + +:delclsid +echo REG DELETE HKCR\CLSID\%1 /f +echo REG DELETE HKCR\CLSID\%1 /f >> %TMP_SCRIPT_FILENAME% +goto :EOF + +:end +goto :EOF diff --git a/windows_deliv/etc/machines/WINPC.btm b/windows_deliv/etc/machines/WINPC.btm index 8da6ca2..39c17df 100644 --- a/windows_deliv/etc/machines/WINPC.btm +++ b/windows_deliv/etc/machines/WINPC.btm @@ -4,7 +4,7 @@ iff not defined ISE_PLATFORM then set ISE_PLATFORM=win64 endiff iff not defined ISE_EIFFEL then - set ISE_EIFFEL=C:\DEV\Eiffel\18.05_%ISE_PLATFORM% + set ISE_EIFFEL=C:\DEV\Eiffel\18.07_%ISE_PLATFORM% endiff iff "%ISE_PLATFORM%" == "win64" then diff --git a/windows_deliv/make_exes.btm b/windows_deliv/make_exes.btm index 78720b9..6ee671f 100644 --- a/windows_deliv/make_exes.btm +++ b/windows_deliv/make_exes.btm @@ -42,8 +42,12 @@ else safe_copy %EIFFEL_SRC\C\CONFIGS\windows-x86-64-mingw %STUDIO_DIR\studio\config\%ISE_PLATFORM\mingw\config.sh endiff -remtrace Compile the run-time for Microsoft -espawn -u:VC140 "%COMSPEC% /c %INIT_DIR%\make_runtimes.btm msc_vc140" +iff defined HAS_VC140 then + remtrace Compile the run-time for Microsoft (msc_vc140) + espawn -u:VC140 "%COMSPEC% /c %INIT_DIR%\make_runtimes.btm msc_vc140" +endiff + +remtrace Compile the run-time for Microsoft (ISE_C_COMPILER=%ISE_C_COMPILER% ISE_C_COMPILER_VER=%ISE_C_COMPILER_VER%) espawn -u:%ISE_C_COMPILER_VER% "%COMSPEC% /c %INIT_DIR%\make_runtimes.btm msc" remtrace Copy the header files @@ -133,16 +137,6 @@ else 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" @@ -155,6 +149,18 @@ else CANCEL_ON_ERROR endiff + 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 + + exprtfile -r %PUBLIC_SVN_REVISION %DEFAULT_PUBLIC_SVN/Src/Delivery/scripts/licensing/eiffelstudio/gpl.txt > %INSTALL_DIR\releases\gpl_version\LICENSE endiff @@ -164,16 +170,6 @@ else 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 @@ -185,6 +181,17 @@ else CANCEL_ON_ERROR endiff + 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 + 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/set_simple_aliases.btm b/windows_deliv/set_simple_aliases.btm index 6f2b3e6..8df4151 100644 --- a/windows_deliv/set_simple_aliases.btm +++ b/windows_deliv/set_simple_aliases.btm @@ -63,7 +63,7 @@ REM Eiffel Compilation REM Remove a project from the current directory, if any alias clean_project `iff exist EIFGENs .or. isdir EIFGENs then & fullrd EIFGENs & endiff` REM Finalize at the Eiffel level only -alias finalize `iff "%2" == "" then & ecb -batch -finalize -c_compile -config %$ >>& %INSTALL_LOG & else & ecb -batch -finalize -c_compile -config %1 -target %2 >>& %INSTALL_LOG & endiff` +alias finalize `echo ISE_C_COMPILER=%ISE_C_COMPILER% (ISE_C_COMPILER_VER=%ISE_C_COMPILER_VER%) & iff "%2" == "" then & ecb -batch -finalize -c_compile -config %$ >>& %INSTALL_LOG & else & ecb -batch -finalize -c_compile -config %1 -target %2 >>& %INSTALL_LOG & endiff` REM Melt at the Eiffel level only alias melt `ecb -config %$ >>& %INSTALL_LOG` alias freeze `ecb -freeze -c_compile -config %$ >>& %INSTALL_LOG`