diff --git a/win/build-deps.cmd b/win/build-deps.cmd index 976c03480a..7ab70aa37b 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -31,13 +31,13 @@ setlocal EnableDelayedExpansion :: Make sure vcvarsall.bat is called and dev env set is up. IF "%VSINSTALLDIR%"=="" ( - utils\cecho {0C}Visual Studio environment variables not set - cannot proceed!{# #}{\n} + call utils\cecho.cmd 0 12 "Visual Studio environment variables not set - cannot proceed!" GOTO :Error ) set PROJECT_NAME=IfcOpenShell -utils\cecho {F0}This script fetches and builds all %PROJECT_NAME% dependencies{# #}{\n} +call utils\cecho.cmd 15 0 "This script fetches and builds all %PROJECT_NAME% dependencies" echo. :: Set up variables depending on the used Visual Studio version @@ -47,14 +47,14 @@ IF NOT %ERRORLEVEL%==0 GOTO :Error set BUILD_TYPE=%3 IF %GENERATOR%=="" ( - cecho {0C}GENERATOR not specified - cannot proceed!{# #}{\n} + call cecho.cmd 0 12 "GENERATOR not specified - cannot proceed!" GOTO :Error ) IF "%BUILD_TYPE%"=="" set BUILD_TYPE=Build IF NOT "!BUILD_TYPE!"=="Build" IF NOT "!BUILD_TYPE!"=="Rebuild" IF NOT "!BUILD_TYPE!"=="Clean" ( - utils\cecho {0C}Invalid build type passed: !BUILD_TYPE!. Cannot proceed, aborting!{# #}{\n} + call utils\cecho.cmd 0 12 "Invalid build type passed: !BUILD_TYPE!. Cannot proceed, aborting!" GOTO :Error ) @@ -68,63 +68,64 @@ IF %VS_VER%==2008 set PATH=C:\Windows\Microsoft.NET\Framework\v3.5;%PATH% :: User-configurable build options IF "%IFCOS_INSTALL_PYTHON%"=="" set IFCOS_INSTALL_PYTHON=TRUE IF "%IFCOS_USE_PYTHON2%"=="" set IFCOS_USE_PYTHON2=FALSE -IF "%IFCOS_NUM_BUILD_PROCESSES%"=="" set IFCOS_NUM_BUILD_PROCESSES=%NUMBER_OF_PROCESSORS% +IF "%IFCOS_NUM_BUILD_PROCS%"=="" set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS% :: For subroutines -set MSBUILD_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCESSES% /t:%BUILD_TYPE% +set MSBUILD_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS% /t:%BUILD_TYPE% REM /clp:ErrorsOnly;WarningsOnly :: Note BUILD_TYPE not passed, Clean e.g. wouldn't delete the installed files. -set INSTALL_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCESSES% +set INSTALL_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS% set BUILD_DIR=build-vs%VS_VER%-%TARGET_ARCH% REM echo. -REM cecho {F0}This script fetches and builds all %PROJECT_NAME% dependencies{# #}{\n} +REM call cecho.cmd 0 15 "This script fetches and builds all %PROJECT_NAME% dependencies" :: Print build configuration information echo. -cecho {0A}Script configuration:{# #}{\n} -cecho {0D} CMake Generator = %GENERATOR%{# #}{\n} -echo - Passed to CMake -G option. -cecho {0D} Target Architecture = %TARGET_ARCH%{# #}{\n} -echo - Whether were doing 32-bit (x86) or 64-bit (x64) build. -cecho {0D} Dependency Directory = %DEPS_DIR%{# #}{\n} -echo - The directory where %PROJECT_NAME% dependencies are fetched and built. -cecho {0D} Installation Directory = %INSTALL_DIR%{# #}{\n} -echo - The directory where %PROJECT_NAME% dependencies are installed. -cecho {0D} Build Config Type = %BUILD_CFG%{# #}{\n} -echo - The used build configuration type for the dependencies. + +call cecho.cmd 0 10 "Script configuration:" +call cecho.cmd 0 13 "* CMake Generator`t= '`"%GENERATOR_DEFAULT%`'`t +echo - Passed to CMake -G option. +call cecho.cmd 0 13 "* Target Architecture`t= %TARGET_ARCH%" +echo - Whether were doing 32-bit (x86) or 64-bit (x64) build. +call cecho.cmd 0 13 "* Dependency Directory`t= %DEPS_DIR%" +echo - The directory where %PROJECT_NAME% dependencies are fetched and built. +call cecho.cmd 0 13 "* Installation Directory = %INSTALL_DIR%" +echo - The directory where %PROJECT_NAME% dependencies are installed. +call cecho.cmd 0 13 "* Build Config Type`t= %BUILD_CFG%" +echo - The used build configuration type for the dependencies. echo Defaults to RelWithDebInfo if not specified. -IF %BUILD_CFG%==MinSizeRel cecho {0E} WARNING: MinSizeRel build can suffer from a significant performance loss.{# #}{\n} -cecho {0D} Build Type = %BUILD_TYPE%{# #}{\n} -echo - The used build type for the dependencies (Build, Rebuild, Clean). +IF %BUILD_CFG%==MinSizeRel call cecho.cmd 0 14 " WARNING: MinSizeRel build can suffer from a significant performance loss." +call cecho.cmd 0 13 "* Build Type`t`t= %BUILD_TYPE%" +echo - The used build type for the dependencies (Build, Rebuild, Clean). echo Defaults to Build if not specified. Rebuild/Clean also uninstalls Python (if it was installed by this script). -cecho {0D} IFCOS_INSTALL_PYTHON = %IFCOS_INSTALL_PYTHON%{# #}{\n} -echo - Download and install Python. +call cecho.cmd 0 13 "* IFCOS_INSTALL_PYTHON`t= %IFCOS_INSTALL_PYTHON%" +echo - Download and install Python. echo Set to something other than TRUE if you wish to use an already installed version of Python. -cecho {0D} IFCOS_USE_PYTHON2 = %IFCOS_USE_PYTHON2%{# #}{\n} -echo - Use Python 2 instead of 3. +call cecho.cmd 0 13 "* IFCOS_USE_PYTHON2`t= %IFCOS_USE_PYTHON2%" +echo - Use Python 2 instead of 3. echo Set to TRUE if you wish to use Python 2 instead of 3. Has no effect if IFCOS_INSTALL_PYTHON is not TRUE. -cecho {0D} IFCOS_NUM_BUILD_PROCESSES = %IFCOS_NUM_BUILD_PROCESSES%{# #}{\n} -echo - How many MSBuild.exe processes may be run in parallel. +call cecho.cmd 0 13 "* IFCOS_NUM_BUILD_PROCS`t= %IFCOS_NUM_BUILD_PROCS%" +echo - How many MSBuild.exe processes may be run in parallel. echo Defaults to NUMBER_OF_PROCESSORS. echo. :: Print script's usage information -cecho {0A}Requirements for a successful execution:{# #}{\n} -echo 1. Install PowerShell (preinstalled in Windows ^>= 7) and make sure 'powershell' is accessible from PATH. -echo - https://support.microsoft.com/en-us/kb/968929 -echo 2. Install Git and make sure 'git' is accessible from PATH. -echo - http://code.google.com/p/tortoisegit/ -echo 3. Install CMake and make sure 'cmake' is accessible from PATH. -echo - http://www.cmake.org/ -echo 4. Visual Studio 2008 or newer (2013 or newer recommended). -echo - http://www.cmake.org/ -echo 5. Run this batch script with Visual Studio environment variables set. -echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx +call cecho.cmd 0 10 "Requirements for a successful execution:" +echo 1. Install PowerShell (preinstalled in Windows ^>= 7) and make sure 'powershell' is accessible from PATH. +echo - https://support.microsoft.com/en-us/kb/968929 +echo 2. Install Git and make sure 'git' is accessible from PATH. +echo - http://code.google.com/p/tortoisegit/ +echo 3. Install CMake and make sure 'cmake' is accessible from PATH. +echo - http://www.cmake.org/ +echo 4. Visual Studio 2008 or newer (2013 or newer recommended). +echo - https://www.visualstudio.com/ +echo 5. Run this batch script with Visual Studio environment variables set. +echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx echo. REM TODO 3ds Max SDK? -cecho {0E}Warning: You will need roughly 8 GB of disk space to proceed (VS 2015 x64 RelWithDebInfo).{# #}{\n} +call cecho.cmd 0 14 "Warning: You will need roughly 8 GB of disk space to proceed `(VS 2015 x64 RelWithDebInfo`)." echo. echo If you are not ready with the above, press Ctrl-C to abort! @@ -150,6 +151,7 @@ set ZIP_EXT=7z set BOOST_ZIP=boost_%BOOST_VER%.%ZIP_EXT% call :DownloadFile http://downloads.sourceforge.net/project/boost/boost/%BOOST_VERSION%/%BOOST_ZIP% "%DEPS_DIR%" %BOOST_ZIP% + IF NOT %ERRORLEVEL%==0 GOTO :Error call :ExtractArchive %BOOST_ZIP% "%DEPS_DIR%" "%DEPS_DIR%\boost" IF NOT %ERRORLEVEL%==0 GOTO :Error @@ -160,7 +162,7 @@ IF EXIST "%DEPS_DIR%\boost_%BOOST_VER%". ( ren boost_%BOOST_VER% boost IF NOT EXIST "%DEPS_DIR%\boost\boost.css" GOTO :Error cd "%DEPS_DIR%\boost" - cecho {0D}Building Boost build script.{# #}{\n} + call cecho.cmd 0 13 "Building Boost build script." call bootstrap vc%VC_VER% IF NOT %ERRORLEVEL%==0 GOTO :Error ) @@ -168,9 +170,9 @@ IF EXIST "%DEPS_DIR%\boost_%BOOST_VER%". ( set BOOST_LIBS=--with-system --with-regex --with-thread --with-program_options --with-date_time :: NOTE Boost is fast to build with limited set of libraries so build it always. cd "%DEPS_DIR%\boost" -cecho {0D}Building %DEPENDENCY_NAME% %BOOST_LIBS% Please be patient, this will take a while.{# #}{\n} +call cecho.cmd 0 13 "Building %DEPENDENCY_NAME% %BOOST_LIBS% Please be patient, this will take a while." IF EXIST "%DEPS_DIR%\boost\bin.v2\project-cache.jam" del "%DEPS_DIR%\boost\bin.v2\project-cache.jam" -call .\b2 toolset=msvc-%VC_VER%.0 runtime-link=static address-model=%ARCH_BITS% -j%IFCOS_NUM_BUILD_PROCESSES% ^ +call .\b2 toolset=msvc-%VC_VER%.0 runtime-link=static address-model=%ARCH_BITS% -j%IFCOS_NUM_BUILD_PROCS% ^ variant=%DEBUG_OR_RELEASE_LOWERCASE% %BOOST_LIBS% stage --stagedir=stage/vs%VS_VER%-%VS_PLATFORM% IF NOT %ERRORLEVEL%==0 GOTO :Error @@ -301,18 +303,18 @@ IF "%IFCOS_INSTALL_PYTHON%"=="TRUE" ( IF NOT %ERRORLEVEL%==0 GOTO :Error REM Uninstall if build Rebuild/Clean used IF NOT %BUILD_TYPE%==Build ( - cecho {0D}Uninstalling %DEPENDENCY_NAME%. Please be patient, this will take a while.{# #}{\n} + call cecho.cmd 0 13 "Uninstalling %DEPENDENCY_NAME%. Please be patient, this will take a while." msiexec /x %PYTHON_INSTALLER% /qn ) IF NOT EXIST "%PYTHONPATH%". ( - cecho {0D}Installing %DEPENDENCY_NAME%. Please be patient, this will take a while.{# #}{\n} + call cecho.cmd 0 13 "Installing %DEPENDENCY_NAME%. Please be patient, this will take a while." msiexec /qn /i %PYTHON_INSTALLER% TARGETDIR="%PYTHONPATH%" ) ELSE ( - cecho {0D}%DEPENDENCY_NAME% already installed. Skipping.{# #}{\n} + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already installed. Skipping." ) ) ELSE ( - cecho {0D}IFCOS_INSTALL_PYTHON not true, skipping installation of Python.{# #}{\n} + call cecho.cmd 0 13 "IFCOS_INSTALL_PYTHON not true, skipping installation of Python." ) :SWIG @@ -334,12 +336,12 @@ IF EXIST "%DEPS_DIR%\swigwin\". robocopy "%DEPS_DIR%\swigwin" "%INSTALL_DIR%\swi :Successful echo. -%TOOLS%\utils\cecho {0A}%PROJECT_NAME% dependencies built.{# #}{\n} +call %TOOLS%\utils\cecho.cmd 0 10 "%PROJECT_NAME% dependencies built." goto :Finish :Error echo. -%TOOLS%\utils\cecho {0C}An error occurred! Aborting!{# #}{\n} +call %TOOLS%\utils\cecho.cmd 0 12 "An error occurred! Aborting!" goto :Finish :Finish @@ -355,11 +357,11 @@ goto :EOF :DownloadFile pushd %2 IF NOT EXIST "%3". ( - cecho {0D}Downloading %DEPENDENCY_NAME% into %2.{# #}{\n} + call cecho.cmd 0 13 "Downloading %DEPENDENCY_NAME% into %2." powershell -Command "$webClient = new-object System.Net.WebClient; $webClient.DownloadFile('%1', '%3')" REM Old wget version in case someone has problem with PowerShell: wget --no-check-certificate %1 ) ELSE ( - cecho {0D}%DEPENDENCY_NAME% already downloaded. Skipping.{# #}{\n} + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already downloaded. Skipping." ) set RET=%ERRORLEVEL% popd @@ -369,10 +371,10 @@ exit /b %RET% :: Params: %1 filename, %2 destinationDir, %3 dirAfterExtraction :ExtractArchive IF NOT EXIST "%3". ( - cecho {0D}Extracting %DEPENDENCY_NAME% into %2.{# #}{\n} + call cecho.cmd 0 13 "Extracting %DEPENDENCY_NAME% into %2." 7za x %1 -y -o%2 ) ELSE ( - cecho {0D}%DEPENDENCY_NAME% already extracted into %3. Skipping.{# #}{\n} + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already extracted into %3. Skipping." ) exit /b %ERRORLEVEL% @@ -381,11 +383,11 @@ exit /b %ERRORLEVEL% :: F.ex. call :GitCloneRepository https://github.com/KhronosGroup/OpenCOLLADA.git "%DEPS_DIR%\OpenCOLLADA\" :GitCloneOrPullRepository IF NOT EXIST %2. ( - cecho {0D}Cloning %DEPENDENCY_NAME% into %2.{# #}{\n} + call cecho.cmd 0 13 "Cloning %DEPENDENCY_NAME% into %2." pushd "%DEPS_DIR%" call git clone %1 %2 ) ELSE ( - cecho {0D}%DEPENDENCY_NAME% already cloned. Pulling latest changes.{# #}{\n} + call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned. Pulling latest changes." pushd %2 call git pull ) @@ -397,7 +399,7 @@ exit /b %RET% :: Params: %* cmakeOptions :: NOTE cd to root CMakeLists.txt folder before calling this if the CMakeLists.txt is not in the repo root. :RunCMake -cecho {0D}Running CMake for %DEPENDENCY_NAME%.{# #}{\n} +call cecho.cmd 0 13 "Running CMake for %DEPENDENCY_NAME%." IF NOT EXIST %BUILD_DIR%. mkdir %BUILD_DIR% IF NOT %ERRORLEVEL%==0 GOTO :Error pushd %BUILD_DIR% @@ -412,7 +414,7 @@ exit /b %RET% :: BuildSolution - Builds/Rebuilds/Cleans a solution using MSBuild :: Params: %1 solutioName, %2 configuration :BuildSolution -cecho {0D}%BUILD_TYPE%ing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while.{# #}{\n} +call cecho.cmd 0 13 "%BUILD_TYPE%ing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while." %MSBUILD_CMD% %1 /p:configuration=%2;platform=%VS_PLATFORM% exit /b %ERRORLEVEL% @@ -421,7 +423,7 @@ exit /b %ERRORLEVEL% :: NOTE the actual install dir is set during cmake run. :InstallCMakeProject pushd %1 -cecho {0D}Installing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while.{# #}{\n} +call cecho.cmd 0 13 "Installing %2 %DEPENDENCY_NAME%. Please be patient, this will take a while." %INSTALL_CMD% INSTALL.%VCPROJ_FILE_EXT% /p:configuration=%2;platform=%VS_PLATFORM% set RET=%ERRORLEVEL% popd diff --git a/win/run-cmake.bat b/win/run-cmake.bat index 8ee76982b2..80518dab05 100644 --- a/win/run-cmake.bat +++ b/win/run-cmake.bat @@ -56,11 +56,11 @@ set PATH=%PATH%;%SWIG_DIR%;%PYTHONPATH% :: TODO 3ds Max SDK? echo. -cecho {0A}Script configuration:{# #}{\n} +call cecho.cmd 0 10 "Script configuration:" echo CMake Generator = %GENERATOR% echo All arguments = %* echo. -cecho {0A}Dependency Environment Variables for %PROJECT_NAME%:{# #}{\n} +call cecho.cmd 0 10 "Dependency Environment Variables for %PROJECT_NAME%:" echo BOOST_ROOT = %BOOST_ROOT% REM echo BOOST_INCLUDEDIR = %BOOST_INCLUDEDIR% echo BOOST_LIBRARYDIR = %BOOST_LIBRARYDIR% @@ -81,7 +81,7 @@ echo. set CMAKELISTS_DIR=..\cmake REM IF NOT EXIST %PROJECT_NAME%.sln. ( IF EXIST CMakeCache.txt. del /Q CMakeCache.txt - cecho {0D}Running CMake for %PROJECT_NAME%.{# #}{\n} + call cecho.cmd 0 13 "Running CMake for %PROJECT_NAME%." IF "%2"=="" ( REM No extra arguments provided, trust that GENERATOR is set properly. cmake.exe %CMAKELISTS_DIR% -G %GENERATOR% -DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" @@ -94,8 +94,8 @@ REM IF NOT EXIST %PROJECT_NAME%.sln. ( ) IF NOT %ERRORLEVEL%==0 GOTO :Error REM ) ELSE ( - REM cecho {0A}%PROJECT_NAME%.sln exists. Skipping CMake call for %PROJECT_NAME%.{# #}{\n} - REM cecho {0A}Delete %CD%\%PROJECT_NAME%.sln to trigger a CMake rerun.{# #}{\n} + REM call cecho.cmd 0 10 "%PROJECT_NAME%.sln exists. Skipping CMake call for %PROJECT_NAME%." + REM call cecho.cmd 0 10 "Delete %BUILD_DIR%\%PROJECT_NAME%.sln to trigger a CMake rerun." REM ) echo. @@ -103,7 +103,7 @@ goto :Finish :Error echo. -cecho {0C}An error occurred! Aborting!{# #}{\n} +cecho {0C}An error occurred! Aborting!" goto :Finish :Finish diff --git a/win/utils/cecho test.bat b/win/utils/cecho test.bat deleted file mode 100644 index 0d872e2d30..0000000000 --- a/win/utils/cecho test.bat +++ /dev/null @@ -1,65 +0,0 @@ -@echo off - - -:: -:: cecho by thomas_polaert@yahoo.fr -:: -echo cecho by thomas_polaert@yahoo.fr - -cecho - -cecho {00}00 - black{\n} -cecho {01}01 - navy{\n} -cecho {02}02 - green{\n} -cecho {03}03 - teal{\n} -cecho {04}04 - maroon{\n} -cecho {05}05 - purple{\n} -cecho {06}06 - olive{\n} -cecho {07}07 - silver{\n} -cecho {08}08 - gray{\n} -cecho {09}09 - blue{\n} -cecho {0A}0A - lime{\n} -cecho {0B}0B - aqua{\n} -cecho {0C}0C - red{\n} -cecho {0D}0D - fuchisa{\n} -cecho {0E}0E - yellow{\n} -cecho {0F}0F - white{\n} - -echo. - -cecho {00}00 {10}10 {20}20 {30}30 {40}40 {50}50 {60}60 {70}70 {80}80 {90}90 {A0}A0 {B0}B0 {C0}80 {D0}90 {E0}A0 {F0}B0{\n} -cecho {01}01 {11}11 {21}21 {31}31 {41}41 {51}51 {61}61 {71}71 {81}81 {91}91 {A1}A1 {B1}B1 {C1}81 {D1}91 {E1}A1 {F1}B1{\n} -cecho {02}02 {12}12 {22}22 {32}32 {42}42 {52}52 {62}62 {72}72 {82}82 {92}92 {A2}A2 {B2}B2 {C2}82 {D2}92 {E2}A2 {F2}B2{\n} -cecho {03}03 {13}13 {23}23 {33}33 {43}43 {53}53 {63}63 {73}73 {83}83 {93}93 {A3}A3 {B3}B3 {C3}83 {D3}93 {E3}A3 {F3}B3{\n} -cecho {04}04 {14}14 {24}24 {34}34 {44}44 {54}54 {64}64 {74}74 {84}84 {94}94 {A4}A4 {B4}B4 {C4}84 {D4}94 {E4}A4 {F4}B4{\n} -cecho {05}05 {15}15 {25}25 {35}35 {45}45 {55}55 {65}65 {75}75 {85}85 {95}95 {A5}A5 {B5}B5 {C5}85 {D5}95 {E5}A5 {F5}B5{\n} -cecho {06}06 {16}16 {26}26 {36}36 {46}46 {56}56 {66}66 {76}76 {86}86 {96}96 {A6}A6 {B6}B6 {C6}86 {D6}96 {E6}A6 {F6}B6{\n} -cecho {07}07 {17}17 {27}27 {37}37 {47}47 {57}57 {67}67 {77}77 {87}87 {97}97 {A7}A7 {B7}B7 {C7}87 {D7}97 {E7}A7 {F7}B7{\n} -cecho {08}08 {18}18 {28}28 {38}38 {48}48 {58}58 {68}68 {78}78 {88}88 {98}98 {A8}A8 {B8}B8 {C8}88 {D8}98 {E8}A8 {F8}B8{\n} -cecho {09}09 {19}19 {29}29 {39}39 {49}49 {59}59 {69}69 {79}79 {89}89 {99}99 {A9}A9 {B9}B9 {C9}89 {D9}99 {E9}A9 {F9}B9{\n} -cecho {0A}0A {1A}1A {2A}2A {3A}3A {4A}4A {5A}5A {6A}6A {7A}7A {8A}8A {9A}9A {AA}AA {BA}BA {CA}8A {DA}9A {EA}AA {FA}BA{\n} -cecho {0B}0B {1B}1B {2B}2B {3B}3B {4B}4B {5B}5B {6B}6B {7B}7B {8B}8B {9B}9B {AB}AB {BB}BB {CB}8B {DB}9B {EB}AB {FB}BB{\n} -cecho {0C}0C {1C}1C {2C}2C {3C}3C {4C}4C {5C}5C {6C}6C {7C}7C {8C}8C {9C}9C {AC}AC {BC}BC {CC}8C {DC}9C {EC}AC {FC}BC{\n} -cecho {0D}0D {1D}1D {2D}2D {3D}3D {4D}4D {5D}5D {6D}6D {7D}7D {8D}8D {9D}9D {AD}AD {BD}BD {CD}8D {DD}9D {ED}AD {FD}BD{\n} -cecho {0E}0E {1E}1E {2E}2E {3E}3E {4E}4E {5E}5E {6E}6E {7E}7E {8E}8E {9E}9E {AE}AE {BE}BE {CE}8E {DE}9E {EE}AE {FE}BE{\n} -cecho {0F}0F {1F}1F {2F}2F {3F}3F {4F}4F {5F}5F {6F}6F {7F}7F {8F}8F {9F}9F {AF}AF {BF}BF {CF}8F {DF}9F {EF}AF {FF}BF{\n} - -echo. - -cecho {silver} -cecho {\uDA} -cecho Escape charater {{ -echo. -cecho {\u07 \u07}beep x2 -echo. -cecho {\t}line #1{\n\t}line #2{\n\t}line #3 -echo. -cecho {green}print green {default} and back to initial color -echo. -cecho {a red foreground on a white background}a red foreground on a white background {# #} and back to initial colors -echo. -cecho {blue gray}blue gray -echo. -cecho {purple yellow}purple yellow{\n silver} - -pause \ No newline at end of file diff --git a/win/utils/cecho.cmd b/win/utils/cecho.cmd new file mode 100644 index 0000000000..2923fcb986 --- /dev/null +++ b/win/utils/cecho.cmd @@ -0,0 +1,4 @@ +:: Usage: call cecho.cmd background foreground "message here" +:: NOTES/TODOS 1) This is super slow 2) leading spaces are omitted 3) printing string with quotes doesn't work (quotes must be escaped awkwardly) +@powershell -command write-host -background %~1 -foreground "%~2" "%3" +@exit /b diff --git a/win/utils/cecho.exe b/win/utils/cecho.exe deleted file mode 100644 index 9f310e5dc8..0000000000 Binary files a/win/utils/cecho.exe and /dev/null differ diff --git a/win/utils/cecho.txt b/win/utils/cecho.txt deleted file mode 100644 index cdc61b2ffe..0000000000 --- a/win/utils/cecho.txt +++ /dev/null @@ -1 +0,0 @@ -cecho is from http://www.codeproject.com/Articles/17033/Add-Colors-to-Batch-Files \ No newline at end of file diff --git a/win/vs-cfg.cmd b/win/vs-cfg.cmd index dbf2f405bd..88b025eed0 100644 --- a/win/vs-cfg.cmd +++ b/win/vs-cfg.cmd @@ -52,7 +52,7 @@ set GENERATOR_DEFAULT=%GENERATOR_VS2015_64% IF "!GENERATOR!"=="" ( set GENERATOR=%GENERATOR_DEFAULT% - utils\cecho {0E}vs-cfg.cmd: Warning: Generator not passed - using the default %GENERATOR_DEFAULT%.{# #}{\n} + call utils\cecho.cmd 0 14 "vs-cfg.cmd: Warning: Generator not passed - using the default '`"%GENERATOR_DEFAULT%`'`t ) IF NOT !GENERATOR!==%GENERATOR_VS2008_32% IF NOT !GENERATOR!==%GENERATOR_VS2008_64% ( @@ -60,8 +60,8 @@ IF NOT !GENERATOR!==%GENERATOR_VS2010_32% IF NOT !GENERATOR!==%GENERATOR_VS2010_ IF NOT !GENERATOR!==%GENERATOR_VS2012_32% IF NOT !GENERATOR!==%GENERATOR_VS2012_64% ( IF NOT !GENERATOR!==%GENERATOR_VS2013_32% IF NOT !GENERATOR!==%GENERATOR_VS2013_64% ( IF NOT !GENERATOR!==%GENERATOR_VS2015_32% IF NOT !GENERATOR!==%GENERATOR_VS2015_64% ( - utils\cecho {0C}vs-cfg.cmd: Invalid or unsupported CMake generator string passed: !GENERATOR!. Cannot proceed, aborting!{# #}{\n} - GOTO :EOF + call utils\cecho.cmd 0 12 "vs-cfg.cmd: Invalid or unsupported CMake generator string passed: '`"!GENERATOR!`'". Cannot proceed, aborting!" + exit /b 1 ))))) :: Figure out the build configuration from the CMake generator string. @@ -120,11 +120,11 @@ set BUILD_CFG_DEFAULT=%BUILD_CFG_RELWITHDEBINFO% IF "!BUILD_CFG!"=="" ( set BUILD_CFG=%BUILD_CFG_DEFAULT% - utils\cecho {0E}vs-cfg.cmd: Warning: BUILD_CFG not specified - using the default %BUILD_CFG_DEFAULT%{# #}{\n} + call utils\cecho.cmd 0 14 "vs-cfg.cmd: Warning: BUILD_CFG not specified - using the default %BUILD_CFG_DEFAULT%" ) IF NOT !BUILD_CFG!==%BUILD_CFG_MINSIZEREL% IF NOT !BUILD_CFG!==%BUILD_CFG_RELEASE% ( IF NOT !BUILD_CFG!==%BUILD_CFG_RELWITHDEBINFO% IF NOT !BUILD_CFG!==%BUILD_CFG_DEBUG% ( - utils\cecho {0C}vs-cfg.cmd: Invalid or unsupported CMake build configuration type passed: !BUILD_CFG!. Cannot proceed, aborting!{# #}{\n} + call utils\cecho.cmd 0 12 "vs-cfg.cmd: Invalid or unsupported CMake build configuration type passed: !BUILD_CFG!. Cannot proceed, aborting!" exit /b 1 )) @@ -148,7 +148,7 @@ IF %BUILD_CFG%==Debug ( :: Populate path variables cd ..\ set ORIGINAL_PATH=%PATH% -set PATH=%PATH%;"%CD%\win\utils" +set PATH=%PATH%;%CD%\win\utils :: Fetch and build the dependencies to a dedicated directory depending on the used VS version and target architecture. :: NOTE For IfcOpenShell we can build all of our deps both x86 and x64 using different VS versions in the same directories