mirror of
https://github.com/a2-4am/4cade.git
synced 2024-10-07 01:00:10 +00:00
fix filesystem race-condition
This commit is contained in:
parent
b95005701a
commit
8e14c1805a
@ -41,5 +41,6 @@ if (!a.fileexists(WScript.Arguments(1)) || a.getfile(WScript.Arguments(1)).datel
|
||||
source.writeline("!text \"" + ((val >= 0) ? (entries[i].substr(val + 1)) : "") + "\"")
|
||||
}
|
||||
|
||||
source.close()
|
||||
new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(1) + ' build\\okvs.tmp', 0, 1)
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ while (!b.atendofstream)
|
||||
entries.push(b.readline())
|
||||
}
|
||||
|
||||
pre_off = a.getfile(WScript.Arguments(2)).size + a.getfile(WScript.Arguments(0) + "\\STANDARD").size
|
||||
osize = pre_off
|
||||
osize = a.getfile(WScript.Arguments(0) + "\\STANDARD").size
|
||||
pre_off = a.getfile(WScript.Arguments(2)).size + osize
|
||||
|
||||
groups = "*=0\n" + "!le16 " + entries.length + ", 0\n"
|
||||
|
||||
for (i = 0; i < entries.length; i++)
|
||||
{
|
||||
c = 0
|
||||
c = a.getfile(WScript.Arguments(2)).size
|
||||
size = osize
|
||||
|
||||
if (a.fileexists(WScript.Arguments(0) + "\\" + entries[i]))
|
||||
|
@ -25,7 +25,9 @@ else
|
||||
|
||||
entries.sort()
|
||||
|
||||
a.createtextfile("build\\GAMES.SORTED").write(entries.toString().replace(/,/g, "\n"))
|
||||
f = a.createtextfile("build\\GAMES.SORTED")
|
||||
f.write(entries.toString().replace(/,/g, "\n"))
|
||||
f.close()
|
||||
ss_off = a.fileexists(WScript.Arguments(2)) ? a.getFile(WScript.Arguments(2)).size : 0
|
||||
groups = "*=0\n" + "!le16 " + entries.length + ", 0\n"
|
||||
|
||||
|
@ -33,4 +33,5 @@ while (!b.atendofstream)
|
||||
}
|
||||
}
|
||||
|
||||
a.createtextfile("build\\GAMES.CONF").write(c.toString().replace(/,/g, "\n"))
|
||||
a.createtextfile("build\\GAMES.SORTED").write(c.sort().toString().replace(/,/g, "\n"))
|
||||
|
@ -60,6 +60,7 @@ cscript /nologo bin\subst.js res\HELPTEXT build\HELPTEXT >>build\log
|
||||
cscript /nologo bin\subst.js res\CREDITS build\CREDITS >>build\log
|
||||
for %%q in (res\GAMEHELP\*) do cscript /nologo bin\subst.js %%q build\GAMEHELP\%%~nxq >>build\log
|
||||
rem
|
||||
rem create distribution version of GAMES.CONF without comments or blank lines
|
||||
rem create a sorted list of game filenames, without metadata or display names
|
||||
rem
|
||||
cscript /nologo bin\makesorted.js
|
||||
@ -133,7 +134,7 @@ rem
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\TITLE" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\COVER" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\HELP" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\GAMES.CONF" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\GAMES.CONF" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\PREFS.CONF" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\CREDITS" >>build\log
|
||||
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log
|
||||
|
Loading…
Reference in New Issue
Block a user