Skip to content

Commit

Permalink
0.4 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Oct 6, 2022
1 parent f621c3f commit e12a5c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 36 deletions.
11 changes: 6 additions & 5 deletions static/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ async def sitecustomize():
"mount" : {
"point" : appdir.as_posix(),
"path" : "/",
}

},
"path" : f"/ => {appdir.as_posix()}",
}


track = platform.window.MM.prepare(apk, json.dumps(cfg))

marginx = ux(.020) # 20%
Expand Down Expand Up @@ -257,9 +258,9 @@ config = {

<link rel="prefetch" href="{{cookiecutter.cdn}}pythonrc.py">
<link rel="prefetch" href="{{cookiecutter.cdn}}browserfs.min.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjssixel/xterm.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjssixel/xterm-addon-image.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjssixel/xterm-addon-image-worker.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjsixel/xterm.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjsixel/xterm-addon-image.js">
<link rel="prefetch" href="{{cookiecutter.cdn}}xtermjsixel/xterm-addon-image-worker.js">


<link rel="icon" type="image/png" href="favicon.png" sizes="16x16">
Expand Down
37 changes: 6 additions & 31 deletions static/pythons.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,33 +276,6 @@ function prerun(VM) {
VM.FS.init(stdin, stdout, stderr);
}

/*
async function _rcp(url, store) {
var content
store = store || ( "/data/data/" + url )
try {
content = await fetch(url, {})
} catch (x) {
console.error(__FILE__,`cannot rcp ${url} to ${store}`, x)
return false
}
console.info(__FILE__,`rcp ${url} => ${store}`, content.status)
if (content.ok) {
const text= await content.text()
await vm.FS.writeFile( store, text);
return true;
} else {
console.error(__FILE__,`cannot rcp ${url} to ${store}`)
return false
}
}
*/

const vm = {
APK : "org.python",
Expand Down Expand Up @@ -763,7 +736,7 @@ async function feat_vtx(debug_hidden) {
const { WasmTerminal } = await import("./vtx.js")

vm.vt = new WasmTerminal("terminal", 132, 42, [
{ url : "./xtermjsixel/xterm-addon-image-worker.js", sixelSupport:true }
{ url : config.cdn+"xtermjsixel/xterm-addon-image-worker.js", sixelSupport:true }
] )
}

Expand Down Expand Up @@ -1318,8 +1291,10 @@ function MM_autoevents(track) {
}


window.cross_dl = async function cross_dl(trackid, url, autoready) {
var response = await fetch(url, FETCH_FLAGS);
window.cross_dl = async function cross_dl(trackid, url, flags) {
var response = await fetch(url, flags || FETCH_FLAGS);

checkStatus(response)

const reader = response.body.getReader();

Expand Down Expand Up @@ -1409,7 +1384,7 @@ MM.prepare = function prepare(url, cfg) {
track.avail = true
} else {
console.log("MM.cross_dl", trackid, transport, type, url )
cross_dl(trackid, url)
cross_dl(trackid, url, {} )
}
}

Expand Down

0 comments on commit e12a5c3

Please sign in to comment.