diff --git a/devTools/concatFiles.bat b/devTools/concatFiles.bat index 3da9527a846693b3f9a9c87fea44c70c5b48e6f4..38617bc125293b4302ad631aaf8f4d250304cbea 100644 --- a/devTools/concatFiles.bat +++ b/devTools/concatFiles.bat @@ -1,15 +1,29 @@ @echo off :: Concatenates files from dir %1 specified with wildcard %2 and outputs result to %3 +:: temporary codepage change to avoid mojibake +FOR /f "tokens=2 delims=:." %%x IN ('CHCP') DO SET _CP=%%x +CHCP 65001 > NUL + :: TODO Proper temp file instead of bin\list.txt IF EXIST %3 DEL %3 SET _LISTFILE="bin\list.txt" + +:: Collect sorted list of files >%_LISTFILE% (FOR /R "%~1" %%F IN (%2) DO echo "%%F") sort /O %_LISTFILE% %_LISTFILE% + +:: 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) +powershell -command "" 2> NUL +IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -raw -encoding utf8) -replace [regex]::escape('%CD%'),'' -replace '\"','' ^| set-content -encoding utf8 -path %_LISTFILE%" + +:: Append the files (FOR /F "usebackq delims=" %%F IN (`type "%_LISTFILE%"`) DO ( echo /* %%F */ >> %3 - copy /b %3+%%F %3 1>NUL + copy /b %3+"%CD%%%F" %3 1>NUL ) ) DEL %_LISTFILE% +CHCP %_CP% > NUL \ No newline at end of file diff --git a/src/npc/generate/newSlaveIntro.js b/src/npc/generate/newSlaveIntro.js index ccd961c4b39fcffa68bf1bd6841c4100b9d11d63..f4954f90b0792b4648d3873604685b56cca6cce8 100644 --- a/src/npc/generate/newSlaveIntro.js +++ b/src/npc/generate/newSlaveIntro.js @@ -24,6 +24,8 @@ App.UI.newSlaveIntro = function(slave, slave2 = V.eventSlave) { el.append(choices()); + App.Utils.scheduleSidebarRefresh(); // Sidebar endWeek button is baked in sometimes. Make sure it refreshes. + return el; /**