app run integrated to command.js

This commit is contained in:
minjaesong
2023-06-16 17:15:48 +09:00
parent a83cdc1a02
commit a46db3f206
4 changed files with 29 additions and 11 deletions

View File

@@ -733,10 +733,7 @@ shell.execute = function(line) {
}
else {
let programCode = searchFile.sread()
let extension = undefined
// get proper extension
let dotSepTokens = cmd.split('.')
if (dotSepTokens.length > 1) extension = dotSepTokens[dotSepTokens.length - 1].toUpperCase()
let extension = searchFile.extension.toUpperCase()
if ("BAT" == extension) {
// parse and run as batch file
@@ -745,6 +742,13 @@ shell.execute = function(line) {
shell.execute(line)
})
}
else if ("APP" == extension) {
let appexec = `A:${_TVDOS.variables.DOSDIR}\\sbin\\appexec.js`
let foundFile = searchFile.fullPath
// println(`${appexec} ${foundFile} ${parsedTokens.tail().join(' ')}`)
shell.execute(`${appexec} ${foundFile} ${parsedTokens.tail().join(' ')}`)
}
else {
let gotError = false