2020-05-03 06:22 PM
I want to automate the process of "make" command using a batch file or whatever way convenient. Is it possible to send command to touchgfx environment using batch script ? Or write a batch script in touchgfx environment.
Solved! Go to Solution.
2020-05-03 11:21 PM
For batch, try something like this - Let's call it `mingwexe.bat`:
@echo off
setlocal
set root=%~dp0
set PATH=%root%env\MinGW\bin;%root%env\MinGW\msys\1.0\bin;%root%env\MinGW\msys\1.0\Ruby193\bin;%root%env\MinGW\msys\1.0\gnu-arm-gcc\bin;%PATH%
echo "%root%env\MinGW /mingw" > %root%env\MinGW\msys\1.0\etc\fstab
set _first=%1
set _all=%*
call set _tail=%%_all:*%2=%%
set _tail=%2%_tail%
if exist %_first% (
cd %_first%
%_tail%
) else (
cd %root%
%_all%
)
And call with something like:
mingwexe.bat make -f simulator/gcc/Makefile
This is pretty similar to what we do in our build environment on windows agents. Or, you can set up your windows path to include the PATH defined in the above script and avoid the batch script (makes it less portable).
/Martin
2020-05-03 11:21 PM
For batch, try something like this - Let's call it `mingwexe.bat`:
@echo off
setlocal
set root=%~dp0
set PATH=%root%env\MinGW\bin;%root%env\MinGW\msys\1.0\bin;%root%env\MinGW\msys\1.0\Ruby193\bin;%root%env\MinGW\msys\1.0\gnu-arm-gcc\bin;%PATH%
echo "%root%env\MinGW /mingw" > %root%env\MinGW\msys\1.0\etc\fstab
set _first=%1
set _all=%*
call set _tail=%%_all:*%2=%%
set _tail=%2%_tail%
if exist %_first% (
cd %_first%
%_tail%
) else (
cd %root%
%_all%
)
And call with something like:
mingwexe.bat make -f simulator/gcc/Makefile
This is pretty similar to what we do in our build environment on windows agents. Or, you can set up your windows path to include the PATH defined in the above script and avoid the batch script (makes it less portable).
/Martin
2020-05-04 11:59 AM
Thank you that really helped.
2020-05-04 04:45 PM
No problem! :)