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

@@ -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}`)
})
}