Skip to content
Snippets Groups Projects
Commit df5ed490 authored by Kayz's avatar Kayz
Browse files

enhancements to install scripts

parent 891eba29
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!85dreamware and sunrise
Showing
with 58 additions and 58 deletions
......@@ -18,7 +18,7 @@ if (!file.open("r")) {
var lines = file.readAll();
file.close();
lines[0] = '%PCBDIR%\DOOR.SYS';
lines[0] = "%PCBDRIVE%%PCBDIR%door.sys";
lines[1] = system.name;
var op = system.operator.split(" ", 2);
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'BLAKJACK.CFG';
var cfg_filename = gamedir + 'BLAKJACK.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -20,8 +20,8 @@ lines[4] = gamedir + "BLAKJACK.ASC";
lines[5] = gamedir + "BLAKJACK.ANS";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'CRAZY8.CFG';
var cfg_filename = gamedir + 'CRAZY8.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -19,8 +19,8 @@ file.close();
lines[4] = gamedir;
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'SAMPLE.CFG';
var cfg_filename = gamedir + 'SAMPLE.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -19,8 +19,8 @@ file.close();
lines[4] = gamedir;
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -8,7 +8,7 @@ var gamedir = fullpath(js.startup_dir);
file_backup(gamedir + "MB.CFG", 3);
var cfg_filename = js.startup_dir + 'MB.CFG';
var cfg_filename = gamedir + 'MB.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'MINEZONE.CFG';
var cfg_filename = gamedir + 'MINEZONE.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -20,8 +20,8 @@ lines[4] = gamedir + "MINESCOR.ASC";
lines[5] = gamedir + "MINESCOR.ANS";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'SAMPLE.CFG';
var cfg_filename = gamedir + 'SAMPLE.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -19,8 +19,8 @@ file.close();
lines[4] = gamedir;
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'PLINKO.CFG';
var cfg_filename = gamedir + 'PLINKO.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -29,8 +29,8 @@ lines[10] = "@PAUSE@";
lines[11] = "1537381269776M";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[3] = system.node_list[i].dir;
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'ROCK.CFG';
var cfg_filename = gamedir + 'ROCK.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -20,8 +20,8 @@ lines[4] = gamedir + "ROCKSCOR.ASC";
lines[5] = gamedir + "ROCKSCOR.ANS";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -6,7 +6,7 @@ var i;
var gamedir = fullpath(js.startup_dir);
var cfg_filename = js.startup_dir + 'SAMPLE.CFG';
var cfg_filename = gamedir + 'SAMPLE.CFG';
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -19,8 +19,8 @@ file.close();
lines[6] = gamedir;
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + 'door.sys';
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -8,8 +8,8 @@ var lines = [];
lines[0] = "@ECHO OFF";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
var nodenumpad = ("00" + nodenum).slice(-2);
lines[1] = "FUTURE _FUTURE.C" + nodenumpad;
......
......@@ -8,8 +8,8 @@ var lines = [];
lines[0] = "@ECHO OFF";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
var nodenumpad = ("00" + nodenum).slice(-2);
lines[1] = "ISLAND _ISLAND.C" + nodenumpad;
......
......@@ -8,8 +8,8 @@ var lines = [];
lines[0] = "@ECHO OFF";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
var nodenumpad = ("00" + nodenum).slice(-2);
lines[1] = "NUKE _NUKE.C" + nodenumpad;
......
......@@ -8,8 +8,8 @@ var lines = [];
lines[0] = "@ECHO OFF";
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
var nodenumpad = ("00" + nodenum).slice(-2);
lines[1] = "REbEL _REBEL.C" + nodenumpad;
......
......@@ -18,8 +18,8 @@ lines[3] = system.operator;
lines[4] = '38400';
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[1] = system.node_list[i].dir;
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -13,8 +13,8 @@ lines[3] = system.operator;
lines[4] = '38400';
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[1] = system.node_list[i].dir;
writeln("Creating " + js.startup_dir + 'node' + nodenum + '.cfg');
......
......@@ -18,8 +18,8 @@ lines[8] = '0';
lines[9] = '0';
writeln("Beginning node config generation...");
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[1] = system.node_list[i].dir;
writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CTL');
......
......@@ -6,15 +6,15 @@ var i;
var gamedir = fullpath(js.startup_dir);
var conffile = "PAIR3.CFG";
var cfg_filename = gamedir + conffile;
if (!file_exists(gamedir + conffile)) {
writeln("Conf not found: " + gamedir + conffile);
if (!file_exists(cfg_filename)) {
writeln("Conf not found: " + cfg_filename);
exit(1);
}
file_backup(gamedir + conffile, 3);
file_backup(cfg_filename, 3);
var cfg_filename = js.startup_dir + conffile;
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -24,7 +24,7 @@ if (!file.open("r")) {
var lines = file.readAll();
file.close();
lines[0] = '%PCBDRIVE%%PCBDIR%\DOOR.SYS';
lines[0] = '%PCBDRIVE%%PCBDIR%door.sys';
lines[1] = system.name;
var op = system.operator.split(" ", 2);
......
......@@ -6,13 +6,13 @@ var i;
var gamedir = fullpath(js.startup_dir);
var conffilesrc = "SAMPLE.CFG";
var cfg_filename = gamedir + conffilesrc;
if (!file_exists(gamedir + conffilesrc)) {
writeln("Conf not found: " + gamedir + conffilesrc);
if (!file_exists(cfg_filename)) {
writeln("Conf not found: " + cfg_filename);
exit(1);
}
var cfg_filename = js.startup_dir + conffilesrc;
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -27,11 +27,11 @@ lines[3] = system.operator;
lines[5] = gamedir + "4corn.ans";
lines[6] = gamedir + "4corn.asc";
lines[7] = gamedir + "cornhof.ans";
lines[8] = gamedir + "cornhof.asc";
lines[8] = gamedir + "cornhof.asc";
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
lines[1] = system.node_list[i].dir + "\DOOR.SYS";
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[1] = system.node_list[i].dir + "door.sys";
writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG');
......
......@@ -6,13 +6,13 @@ var i;
var gamedir = fullpath(js.startup_dir);
var conffilesrc = "ACEY.CFG";
var cfg_filename = gamedir + conffilesrc;
if (!file_exists(gamedir + conffilesrc)) {
writeln("Conf not found: " + gamedir + conffilesrc);
if (!file_exists(cfg_filename)) {
writeln("Conf not found: " + cfg_filename);
exit(1);
}
var cfg_filename = js.startup_dir + conffilesrc;
var file = new File(cfg_filename);
if (!file.open("r")) {
writeln("Error " + file.error + " opening " + file.name);
......@@ -34,9 +34,9 @@ lines[9] = gamedir + "aceydhof.ans";
lines[10] = gamedir + "aceydhof.asc";
lines[11] = "1";
for (i in system.node_list) {
var nodenum = parseInt(i, 10) + 1;
lines[0] = system.node_list[i].dir + "\DOOR.SYS";
for(i = 0; i < system.nodes; i++) {
var nodenum = i + 1;
lines[0] = system.node_list[i].dir + "door.sys";
writeln("Creating " + js.startup_dir + 'NODE' + nodenum + '.CFG');
......
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