Skip to content
Snippets Groups Projects
Commit 5b9699f3 authored by Pregmodder's avatar Pregmodder
Browse files

Add extra memory settings to compile.bat

parent 44974fcd
No related branches found
No related tags found
1 merge request!8925Add extra memory settings to compile.bat
...@@ -5,6 +5,14 @@ ...@@ -5,6 +5,14 @@
pushd %~dp0 pushd %~dp0
SETLOCAL SETLOCAL
:: If compile is invoked with "extramemory", set SORT_MEM (used by concatFiles.bat)
SET CMD_OPTION=%~1
IF DEFINED CMD_OPTION IF /I [%CMD_OPTION%]==[EXTRAMEMORY] SET CMD_OPTION=EXTRAMEM
IF DEFINED CMD_OPTION IF /I [%CMD_OPTION%]==[EMEMORY] SET CMD_OPTION=EXTRAMEM
IF DEFINED CMD_OPTION IF /I [%CMD_OPTION%]==[EXTRAMEM] SET SORT_MEM=65535
:: See if we can find a git installation :: See if we can find a git installation
set GITFOUND=no set GITFOUND=no
for %%k in (HKCU HKLM) do ( for %%k in (HKCU HKLM) do (
......
...@@ -8,10 +8,14 @@ CHCP 65001 > NUL ...@@ -8,10 +8,14 @@ CHCP 65001 > NUL
:: TODO Proper temp file instead of bin\list.txt :: TODO Proper temp file instead of bin\list.txt
IF EXIST %3 DEL %3 IF EXIST %3 DEL %3
SET _LISTFILE=bin\list.txt SET _LISTFILE=bin\list.txt
SET _SORT_CMD=sort
:: If SORT_MEM is defined, use memory option for SORT
IF DEFINED SORT_MEM SET _SORT_CMD=%_SORT_CMD% /m %SORT_MEM%
:: Collect sorted list of files :: Collect sorted list of files
ECHO "Ignore the first line to skip the BOM" >%_LISTFILE% ECHO "Ignore the first line to skip the BOM" >%_LISTFILE%
(FOR /R "%~1" %%F IN (%2) DO echo "%%F") | sort >>%_LISTFILE% (FOR /R "%~1" %%F IN (%2) DO echo "%%F") | %_SORT_CMD% >>%_LISTFILE%
:: If we have powershell available, strip the absolute path information :: If we have powershell available, strip the absolute path information
:: If not, fail silently (which is fine, but will leak path information into the built file) :: If not, fail silently (which is fine, but will leak path information into the built file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment