diff --git a/compile.bat b/compile.bat index 2a06b08270c083d45c949ee958095a248b32b52d..d91b67280d69782543c0faf24b4cc5683b099907 100644 --- a/compile.bat +++ b/compile.bat @@ -4,7 +4,7 @@ :: Set working directory pushd %~dp0 if not exist "bin\resources" mkdir bin\resources -CALL devTools/concatFiles.bat js/ "*.js" bin/fc.js +CALL devTools/concatFiles.bat js\ "*.js" bin\fc.js :: Run the appropriate compiler for the user's CPU architecture. if %PROCESSOR_ARCHITECTURE% == AMD64 ( CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" --module=bin/fc.js --head devTools/head.html "%~dp0src" diff --git a/devTools/concatFiles.bat b/devTools/concatFiles.bat index cce8129af35c054ac8f951eef9818ff8ae4aa08d..3da9527a846693b3f9a9c87fea44c70c5b48e6f4 100644 --- a/devTools/concatFiles.bat +++ b/devTools/concatFiles.bat @@ -2,12 +2,13 @@ :: Concatenates files from dir %1 specified with wildcard %2 and outputs result to %3 :: TODO Proper temp file instead of bin\list.txt +IF EXIST %3 DEL %3 SET _LISTFILE="bin\list.txt" >%_LISTFILE% (FOR /R "%~1" %%F IN (%2) DO echo "%%F") sort /O %_LISTFILE% %_LISTFILE% ->%3 (FOR /F "usebackq delims=" %%F IN (`type "%_LISTFILE%"`) DO ( - echo /* %%F */ - type %%F +(FOR /F "usebackq delims=" %%F IN (`type "%_LISTFILE%"`) DO ( + echo /* %%F */ >> %3 + copy /b %3+%%F %3 1>NUL ) )