Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- echo TRK Build Tool
- set compilerpath=C:\Program Files (x86)\FreeBASIC\fbc
- if not exist "Revision History\" mkdir "Revision History"
- if not exist "Revision History\Compiler\" mkdir "Revision History\Compiler"
- set stamp=%DATE% %TIME%
- set stampdate=%stamp:~4,10%
- set stamptime=%stamp:~-11,11%
- set stampdate=%stampdate:~-4,4%%stampdate:~-10,2%%stampdate:~-7,2%
- set stamptime=%stamptime:~0,2%%stamptime:~3,2%%stamptime:~6,2%%stamptime:~9,2%
- set stamp=%stampdate:~0,4%-%stampdate:~4,2%%stampdate:~6,2%-%stamptime:~0,2%%stamptime:~2,2%-%stamptime:~4,2%%stamptime:~6,2%
- echo DateTime: %stamp%
- set timestamp=%stamp%
- setlocal enabledelayedexpansion
- set argCount=0
- for %%x in (%*) do (
- set /A argCount+=1
- set "argVec[!argCount!]=%%~x"
- )
- echo Project Ct: %argCount%
- if %argCount%==0 goto :eof
- for /L %%i in (1,1,%argCount%) do call :debug %%i !argVec[%%i]!
- echo No.[%%i]: "!argVec[%%i]!"
- set prjname=!argVec[%%i]!
- echo Project No.[%%i] of %argCount%: %prjname%
- goto eof:
- :debug
- echo Project No.%1: "%2"
- set prjname=%2
- if not %prjname%=="" (
- tasklist /FI "IMAGENAME eq %prjname%.exe" 2>NUL | find /I /N "%prjname%.exe">NUL
- if "%ERRORLEVEL%"=="0" taskkill -f -im "%prjname%.exe"
- "%compilerpath%" "%prjname%.bas" -s gui "rc\%prjname%.rc" > "Debug %prjname%.log"
- if not exist "Revision History\Compiler\%prjname%\" mkdir "Revision History\Compiler\%prjname%"
- cmd /c F | xcopy "Debug %prjname%.log" "Revision History\Compiler\%prjname%\Debug %timestamp%.log"
- )
- GOTO :eof
Add Comment
Please, Sign In to add comment