command.js will use OS_NAME variable of the DOS

This commit is contained in:
minjaesong
2022-09-24 18:55:22 +09:00
parent 0304ded991
commit 11214c0f7a
2 changed files with 4 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ _TVDOS.variables = {
PATH: "\\tvdos\\bin;\\tbas;\\home",
PATHEXT: ".com;.bat;.js",
HELPPATH: "\\tvdos\\help",
OS_NAME: "Terrarum Virtual DOS",
OS_NAME: "TSVM Disk Operating System",
OS_VERSION: _TVDOS.VERSION
};
Object.freeze(_TVDOS);

View File

@@ -11,8 +11,9 @@ let errorlevel = 0
const termWidth = con.getmaxyx()[1]
const termHeight = con.getmaxyx()[0]
const welcome_text = (termWidth > 40) ? "TSVM Disk Operating System, version " + _TVDOS.VERSION
: "TSVM Disk Operating System " + _TVDOS.VERSION
const osName = _TVDOS.variables.OS_NAME || "TVDOS"
const welcome_text = (termWidth > 40) ? `${osName}, version ${_TVDOS.VERSION}`
: `${osName} ${_TVDOS.VERSION}`
const greetLeftPad = (termWidth - welcome_text.length - 6) >> 1
const greetRightPad = termWidth - greetLeftPad - welcome_text.length - 6