mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
tvdos installer wip
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
1
assets/disk0/tvdos/installer/!BOOTSEC
Normal file
1
assets/disk0/tvdos/installer/!BOOTSEC
Normal 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");
|
||||
8
assets/disk0/tvdos/installer/AUTOEXEC.BAT
Normal file
8
assets/disk0/tvdos/installer/AUTOEXEC.BAT
Normal 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
|
||||
29
assets/disk0/tvdos/installer/install.js
Normal file
29
assets/disk0/tvdos/installer/install.js
Normal 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}`)
|
||||
})
|
||||
}
|
||||
@@ -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.}
|
||||
|
||||
Reference in New Issue
Block a user