From ec7212d2062c7be8f899843f143025056ca6b8b5 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 22 May 2018 20:00:01 +0200 Subject: [PATCH] Updated C env info, and display info. --- windows_deliv/display_information.btm | 19 ++++++++++++ windows_deliv/etc/local-JFIATPC.btm | 36 +++++++++++------------ windows_deliv/etc/local-win64-wsdk71.btm | 12 ++++++++ windows_deliv/inc/display_environment.btm | 19 ++++++++++++ windows_deliv/inc/set_has_c_compiler.btm | 2 +- windows_deliv/init.btm | 11 +++++++ windows_deliv/menu.bat | 13 ++++++-- 7 files changed, 90 insertions(+), 22 deletions(-) create mode 100644 windows_deliv/display_information.btm create mode 100644 windows_deliv/etc/local-win64-wsdk71.btm diff --git a/windows_deliv/display_information.btm b/windows_deliv/display_information.btm new file mode 100644 index 0000000..89bbd68 --- /dev/null +++ b/windows_deliv/display_information.btm @@ -0,0 +1,19 @@ +@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 +call check_environment.btm +call inc\display_environment.btm + +goto EOF + +:broken +CANCEL diff --git a/windows_deliv/etc/local-JFIATPC.btm b/windows_deliv/etc/local-JFIATPC.btm index bd34cab..69c60c8 100644 --- a/windows_deliv/etc/local-JFIATPC.btm +++ b/windows_deliv/etc/local-JFIATPC.btm @@ -11,25 +11,25 @@ endiff rem set ISE_EC_FLAGS=-full -set ISE_C_COMPILER=msc_vc140 -set ISE_C_COMPILER_VER=VC140 -rem set ISE_C_COMPILER_VER=VC150 +iff not defined ISE_C_COMPILER then + set ISE_C_COMPILER=msc_vc140 +endiff +iff not defined ISE_C_COMPILER_VER then + set ISE_C_COMPILER_VER=VC140 +endiff -rem set ISE_C_COMPILER=msc -rem set ISE_C_COMPILER_VER=WSDK71 -rem set ISE_C_COMPILER_VER=VC100x -rem set ISE_C_COMPILER_VER=VC100 - -iff "%ISE_PLATFORM%" == "win64" then - rem set MYSQL=C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1 - rem set MYSQL=C:\DEV\mysql\winx64\ - rem set MYSQL=C:\apps\mysql-5.6.22-winx64\ - rem set MYSQL=C:\DEV\3rd\mysql\mysql-5.6.38-winx64 - set MYSQL=C:\DEV\include\mysql-connector-c-6.1.11-winx64 -else - rem set MYSQL=C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1 - rem set MYSQL=C:\DEV\3rd\mysql\mysql-5.6.38-win32 - set MYSQL=C:\DEV\include\mysql-connector-c-6.1.11-win32 +iff not defined MYSQL then + iff "%ISE_PLATFORM%" == "win64" then + rem set MYSQL=C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1 + rem set MYSQL=C:\DEV\mysql\winx64\ + rem set MYSQL=C:\apps\mysql-5.6.22-winx64\ + rem set MYSQL=C:\DEV\3rd\mysql\mysql-5.6.38-winx64 + set MYSQL=C:\DEV\include\mysql-connector-c-6.1.11-winx64 + else + rem set MYSQL=C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1 + rem set MYSQL=C:\DEV\3rd\mysql\mysql-5.6.38-win32 + set MYSQL=C:\DEV\include\mysql-connector-c-6.1.11-win32 + endiff endiff iff not defined WORK_DIR then diff --git a/windows_deliv/etc/local-win64-wsdk71.btm b/windows_deliv/etc/local-win64-wsdk71.btm new file mode 100644 index 0000000..2c52e1e --- /dev/null +++ b/windows_deliv/etc/local-win64-wsdk71.btm @@ -0,0 +1,12 @@ +REM Check ISE_BUILD_NAME=win64-wsdk71 +echo Use build "win64-wsdk71" +set ISE_PLATFORM=win64 + +iff exist %~dp0local-%COMPUTERNAME%.btm then + call %~dp0local-%COMPUTERNAME%.btm +elseiff exist %~dp0local.btm then + call %~dp0local.btm +endiff + +set ISE_C_COMPILER=msc +set ISE_C_COMPILER_VER=WSDK71 diff --git a/windows_deliv/inc/display_environment.btm b/windows_deliv/inc/display_environment.btm index f0244bd..4f3e187 100644 --- a/windows_deliv/inc/display_environment.btm +++ b/windows_deliv/inc/display_environment.btm @@ -13,6 +13,25 @@ echo The revision that will be generated: %PUBLIC_SVN_REVISION echo ecb version: ecb -version echo The C environment: ISE_C_COMPILER=%ISE_C_COMPILER% (ISE_C_COMPILER_VER=%ISE_C_COMPILER_VER%) +iff defined HAS_C_COMP_VER then + echo - HAS_C_COMP_VER=%HAS_C_COMP_VER% +endiff +iff defined HAS_WSDK71 then + echo - HAS_WSDK71=%HAS_WSDK71% +endiff +iff defined HAS_VC100 then + echo - HAS_VC100=%HAS_VC100% +endiff +iff defined HAS_VC110 then + echo - HAS_VC110=%HAS_VC110% +endiff +iff defined HAS_VC140 then + echo - HAS_VC140=%HAS_VC140% +endiff +iff defined HAS_VC150 then + echo - HAS_VC150=%HAS_VC150% +endiff + echo MYSQL lib location: %MYSQL% echo ----------------------------- iff exist %INSTALL_DIR .or. isdir %INSTALL_DIR then diff --git a/windows_deliv/inc/set_has_c_compiler.btm b/windows_deliv/inc/set_has_c_compiler.btm index 30fc278..ca3410a 100644 --- a/windows_deliv/inc/set_has_c_compiler.btm +++ b/windows_deliv/inc/set_has_c_compiler.btm @@ -1,3 +1,3 @@ -espawn --list > %INSTALL_LOG%.tmp.c_compiler +%ISE_EIFFEL%\tools\spec\%ISE_PLATFORM%\bin\espawn.exe --list > %INSTALL_LOG%.tmp.c_compiler for /f "usebackq delims=" %%a in (`findstr /n "\<%2\>" %INSTALL_LOG%.tmp.c_compiler`) do set "%1=True" fullrf %INSTALL_LOG%.tmp.c_compiler diff --git a/windows_deliv/init.btm b/windows_deliv/init.btm index 3006088..4fa4f9b 100644 --- a/windows_deliv/init.btm +++ b/windows_deliv/init.btm @@ -9,3 +9,14 @@ set PATH=%PATH;%@EXECSTR[cd]\wix set EIFFEL_SRC=%TMP_EIFFEL_SRC set ISE_LIBRARY=%TMP_EIFFEL_SRC set ISE_SRC=%TMP_EIFFEL_SRC + +call %INIT_DIR\inc\set_has_c_compiler HAS_WSDK71 WSDK71 +call %INIT_DIR\inc\set_has_c_compiler HAS_VC100 VC100 +call %INIT_DIR\inc\set_has_c_compiler HAS_VC140 VC140 +call %INIT_DIR\inc\set_has_c_compiler HAS_VC150 VC150 + +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 diff --git a/windows_deliv/menu.bat b/windows_deliv/menu.bat index 08835d3..d80329e 100644 --- a/windows_deliv/menu.bat +++ b/windows_deliv/menu.bat @@ -10,18 +10,20 @@ set TCCLECMD="C:\apps\JPSoft\TCCLE14x64\tcc.exe" @echo 4: starting environment @echo 5: bootstrap environment @echo 6: display logs - +@echo ------------------- +@echo i: display info @echo ------------------- @echo q: quit -CHOICE /C 123456q /M " > selection:" +CHOICE /C 123456iq /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%. == .4. goto end +if .%ERRORLEVEL%. == .7. GOTO display_info +if .%ERRORLEVEL%. == .8. goto end goto end :make_delivery @@ -49,4 +51,9 @@ goto end echo %INSTALL_LOG% goto end +:display_info +echo Display Info +%TCCLECMD% display_information.btm +goto end + :end