2021-10-05 23:54:53 +00:00
|
|
|
a = new ActiveXObject("scripting.filesystemobject")
|
|
|
|
b = a.opentextfile("res\\GAMES.CONF")
|
|
|
|
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
while (!b.atendofstream)
|
|
|
|
{
|
|
|
|
c = b.readline()
|
|
|
|
d = c.indexOf("#")
|
|
|
|
|
|
|
|
if (d >= 0)
|
|
|
|
{
|
|
|
|
c = c.substr(0, d)
|
|
|
|
}
|
|
|
|
|
|
|
|
d = c.indexOf("=")
|
|
|
|
|
|
|
|
if (d >= 0)
|
|
|
|
{
|
|
|
|
c = c.substr(0, d)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (c.indexOf("[") >= 0)
|
|
|
|
{
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-10-07 00:26:23 +00:00
|
|
|
c = c.substr(c.indexOf(",") + 1)
|
2021-10-05 23:54:53 +00:00
|
|
|
|
|
|
|
if (c.length > 0)
|
|
|
|
{
|
|
|
|
entries.push(c)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
entries.sort()
|
|
|
|
y = "res\\GAMEHELP\\"
|
|
|
|
f = a.createtextfile(WScript.Arguments(0))
|
2021-10-12 23:37:45 +00:00
|
|
|
f.write(entry = a.opentextfile(y + "STANDARD").readall().replace(/\r\n/g, "\n"))
|
2021-10-05 23:54:53 +00:00
|
|
|
help_off = entry.length
|
|
|
|
|
2021-10-12 23:37:45 +00:00
|
|
|
groups = "*=0\n" + "!le16 " + entries.length.toString() + ", 0\n"
|
2021-10-05 23:54:53 +00:00
|
|
|
i = 0
|
|
|
|
|
|
|
|
while (i < entries.length)
|
|
|
|
{
|
2021-10-12 23:37:45 +00:00
|
|
|
c = 0
|
2021-10-05 23:54:53 +00:00
|
|
|
|
2021-10-12 23:37:45 +00:00
|
|
|
if (a.fileexists(y + entries[i]))
|
2021-10-05 23:54:53 +00:00
|
|
|
{
|
2021-10-12 23:37:45 +00:00
|
|
|
c = help_off
|
|
|
|
f.write(entry = a.opentextfile(y + entries[i]).readall().replace(/\r\n/g, "\n"))
|
|
|
|
help_off += entry.length
|
2021-10-05 23:54:53 +00:00
|
|
|
}
|
2021-10-12 23:37:45 +00:00
|
|
|
|
|
|
|
groups += "!byte " + (1 + 1 + entries[i].length + 3).toString() + "\n" + "!byte " + entries[i].length + "\n" + "!text \"" + entries[i] + "\"\n" + "!be24 " + c + "\n\n"
|
|
|
|
++i
|
2021-10-05 23:54:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
f = a.createtextfile(WScript.Arguments(1))
|
|
|
|
f.write(groups)
|
2021-10-12 23:37:45 +00:00
|
|
|
f.close()
|
|
|
|
new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1))
|