Commit aee4d8ff authored by rswindell's avatar rswindell
Browse files

When executing non-native (e.g. 16-bit DOS) programs, set the PCBNODE

environment variable (to the same value as SBBSNNUM) as some door games
(e.g. Bordello, by T&J Software) have support for this environment variable
built into their configuration file parsing. This makes setting up multiple
nodes much easier/faster, as you can re-use the same configuration file for
all of them by just specifying this environment variable in the .cfg file
(e.g. "c:\sbbs\node%PCBNODE%\door.sys"). Unfortunately, you can't use just
*any* environment variable, it has to be one of the ones specifically supported
by their programs (or door frame door kit?). Anyway, this simple hack can save
a lot of time setting up some of these doors.
I did not do this for executing native (32-bit) programs as I'm pretty sure
there was never a 32-bit version of PCBoard, so that wouldn't make much sense.
parent 7429c32c
......@@ -528,6 +528,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
fprintf(fp, "SBBSDATA=%s\n", data_dir);
fprintf(fp, "SBBSEXEC=%s\n", exec_dir);
fprintf(fp, "SBBSNNUM=%d\n", cfg.node_num);
fprintf(fp, "PCBNODE=%d\n", cfg.node_num);
/* date/time env vars */
fprintf(fp, "DAY=%02u\n", tm.tm_mday);
fprintf(fp, "WEEKDAY=%s\n",wday[tm.tm_wday]);
......@@ -1409,6 +1410,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
fprintf(doscmdrc,"SBBSDATA=E:\\data\\\n");
fprintf(doscmdrc,"SBBSEXEC=E:\\exec\\\n");
fprintf(doscmdrc,"SBBSNNUM=%d\n",cfg.node_num);
fprintf(doscmdrc,"PCBNODE=%d\n",cfg.node_num);
fclose(doscmdrc);
SAFECOPY(str,fullcmdline);
......@@ -1542,6 +1544,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
fprintf(dosemubat,"set SBBSCTRL=%s\r\n",ctrldrive);
fprintf(dosemubat,"set SBBSDATA=%s\r\n",datadrive);
fprintf(dosemubat,"set SBBSEXEC=%s\r\n",execdrive);
fprintf(dosemubat,"set PCBNODE=%d\r\n",cfg.node_num);
/* clear existing redirections on dos side */
fprintf(dosemubat,"lredir del %s\r\nlredir del %s\r\nlredir del %s\r\nlredir del %s\r\n",xtrndrive,ctrldrive,datadrive,execdrive);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment