This commit is contained in:
Peter Ferrie 2021-10-23 19:17:36 -07:00
parent 024869cf37
commit 47ed1d6dd4
3 changed files with 51 additions and 0 deletions

26
bin/builddisplaynames.js Normal file
View File

@ -0,0 +1,26 @@
a = new ActiveXObject("scripting.filesystemobject")
b = a.opentextfile("build\\GAMES.CONF")
c = a.createtextfile("build\\DISPLAY.CONF")
while (!b.atendofstream)
{
d = b.readline()
if (d.indexOf("[") == -1)
{
if (d.indexOf("=") == -1)
{
e = d.indexOf(",") + 1
f = d.substr(e).split(".")
for (g = 0; g < f.length; g++)
{
f[g] = f[g].charAt(0) + f[g].substr(1).toLowerCase()
}
d += "=" + f.join(" ").replace(" Ii", " II")
}
c.writeline(d)
}
}

13
bin/buildsearch.js Normal file
View File

@ -0,0 +1,13 @@
a = new ActiveXObject("scripting.filesystemobject")
x = new ActiveXObject("wscript.shell")
b = x.exec('findstr /b \"' + WScript.Arguments(0) + '\" build\\DISPLAY.CONF')
c = a.createtextfile("build\\search.txt")
while (!b.stdout.atendofstream)
{
d = b.stdout.readline()
c.writeline(d.substr(d.indexOf(",") + 1))
}
c.close()
x.run('cscript /nologo bin\\buildokvs.js build\\search.txt ' + WScript.Arguments(1), 0, 1)

View File

@ -65,6 +65,14 @@ rem create a sorted list of game filenames, without metadata or display names
rem rem
cscript /nologo bin\makesorted.js cscript /nologo bin\makesorted.js
rem rem
rem create search indexes
rem
cscript /nologo bin\builddisplaynames.js
cscript /nologo bin\buildsearch.js "00" build\SEARCH00.IDX
cscript /nologo bin\buildsearch.js "0" build\SEARCH01.IDX
cscript /nologo bin\buildsearch.js ".0" build\SEARCH10.IDX
cscript /nologo bin\buildsearch.js "." build\SEARCH11.IDX
rem
rem precompute indexed files for prelaunch rem precompute indexed files for prelaunch
rem note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch rem note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch
rem note 2: these can not be padded because they are loaded at $0106 and padding would clobber the stack rem note 2: these can not be padded because they are loaded at $0106 and padding would clobber the stack
@ -139,6 +147,10 @@ rem
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\CREDITS" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\CREDITS" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\ATTRACT.IDX" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\ATTRACT.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\SEARCH00.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\SEARCH01.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\SEARCH10.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\SEARCH11.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\FX.IDX" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\FX.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\DFX.IDX" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\DFX.IDX" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\GAMEHELP.IDX" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\GAMEHELP.IDX" >>build\log