Skip to content

Commit

Permalink
shell,wasm: rework how interop is loaded & zip crc32 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
takase1121 committed Nov 14, 2024
1 parent 5ae597f commit cd91da3
Show file tree
Hide file tree
Showing 10 changed files with 350 additions and 287 deletions.
4 changes: 2 additions & 2 deletions data/plugins/wasm_files.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function RootView:draw(...)
elseif operation.done then
color, progress, status = style.good, 1, "File / Directory downloaded."
else
color, progress = style.accent, operation.read / operation.total
status = string.format("(%s/%s): Zipping ", operation.read, operation.total)
color, progress = style.accent, 1
status = "Zipping "
local filename = operation.last or "files"
local filename_len = #filename > (POPUP_WIDTH - #status) and (POPUP_WIDTH - #status - 3) or filename
status = status .. (#filename > (POPUP_WIDTH - #status) and ("..." .. filename:sub(-filename_len, -1)) or filename)
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ elif host_machine.system() == 'emscripten'
'-s', 'ASYNCIFY=1',
'-s', 'ENVIRONMENT=web,worker',
'-s', 'EXIT_RUNTIME=1',
'-s', 'EXPORTED_FUNCTIONS=_main',
'-s', 'EXPORTED_FUNCTIONS=_main,_wasm_promise_update_handler',
'-s', 'FILESYSTEM=1',
'-s', 'FORCE_FILESYSTEM=1',
'-s', 'IGNORE_MISSING_MAIN=0',
Expand All @@ -81,7 +81,7 @@ elif host_machine.system() == 'emscripten'
'-s', 'SUPPORT_BIG_ENDIAN=1',
'-s', 'WASM=1',
'-s', 'MALLOC=emmalloc',
'-s', 'EXPORTED_RUNTIME_METHODS=FS,ENV,IDBFS',
'-s', 'EXPORTED_RUNTIME_METHODS=FS,ENV,IDBFS,cwrap',
'-lidbfs.js',
'--minify', '0',
'--pre-js', meson.current_source_dir() / 'src' / 'pre.js',
Expand Down
Loading

0 comments on commit cd91da3

Please sign in to comment.