tvdos installer wip

This commit is contained in:
minjaesong
2022-12-23 02:25:53 +09:00
parent 204571b792
commit 1ecb85354b
7 changed files with 49 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
echo "Starting TVDOS..."
rem put set-xxx commands here:
set PATH=\tvdos\tuidev;$PATH
set PATH=\tvdos\installer;\tvdos\tuidev;$PATH
set KEYBOARD=us_colemak
rem this line specifies which shell to be presented after the boot precess:

View File

@@ -1,8 +1,4 @@
echo "Starting TVDOS Installation Medium..."
rem put set-xxx commands here:
rem e.g. set PATH=\home\my-cool-project;$PATH
set PATH=\tvdos\installer;$PATH
set KEYBOARD=us_qwerty
rem this line specifies which shell to be presented after the boot precess:
command /fancy
command

View File

@@ -84,13 +84,17 @@ function printmotd() {
con.mvaddch(cy, 4, 16);con.curs_right();print(' ')
const PCX_INIT = margin - 2
let tcnt = 0
let pcx = margin - 1
let pcx = PCX_INIT
while (tcnt <= motd.length) {
let char = motd.charAt(tcnt)
if (char != '\n') {
print(motd.charAt(tcnt))
// prevent the line starting from ' '
if (pcx != PCX_INIT || char != ' ') {
print(motd.charAt(tcnt))
}
pcx += 1
}
@@ -105,7 +109,7 @@ function printmotd() {
// next line header
let [ncy, __] = con.getyx()
con.mvaddch(ncy, 4, 16);con.curs_right();print(' ')
pcx = margin - 1
pcx = PCX_INIT
}
tcnt += 1

View File

@@ -0,0 +1 @@
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");

View File

@@ -0,0 +1,8 @@
echo "Starting TVDOS..."
rem put set-xxx commands here:
rem e.g. set PATH=\home\my-cool-project;$PATH
set KEYBOARD=us_qwerty
rem this line specifies which shell to be presented after the boot precess:
command /fancy

View File

@@ -0,0 +1,29 @@
println("let's install!")
function copyFiles(destDrive) {
function dir(path) {
return `${destDrive}:/${path}`
}
const dos = _G.shell.coreutils
dos.mkdir(dir("home"))
dos.mkdir(dir("tvdos"))
dos.mkdir(dir("tvdos\\bin"))
// tvdos/bin
files.open("A:\\tvdos\\bin").list().forEach((file)=>{
dos.cp(file.fullPath, `${destDrive}:${file.path}`)
})
// tvdos
;["gl.js", "TVDOS.SYS", "us_colemak.key", "us_qwerty.key"].forEach((name)=>{
dos.cp(`A:\\tvdos\\${name}`, `${destDrive}:\\tvdos\\${name}`)
})
// bare files in the root dir
;["!BOOTSEC", "AUTOEXEC.BAT"].forEach((name)=>{
dos.cp(`A:\\tvdos\\installer\\${name}`, `${destDrive}:\\${name}`)
})
}

View File

@@ -153,7 +153,7 @@ Properties:
\begin{outline}
\1\propertysynopsis{size}{Int}{Returns a size of the file in bytes.}
\1\propertysynopsis{path}{String}{Returns a path (NOT including the drive letter) of the file. Paths are separated using reverse solidus.}
\1\propertysynopsis{path}{String}{Returns a path (NOT including the drive letter) of the file. Paths are started with, and separated using reverse solidus.}
\1\propertysynopsis{fullPath}{String}{Returns a fully qualified path (including the drive letter) of the file. Paths are separated using reverse solidus.}
\1\propertysynopsis{driverID}{String}{Returns a filesystem driver ID associated with the file.}
\1\propertysynopsis{driver}{[Object object]}{Returns a filesystem driver (a Javascript object) for the file.}