Skip to content

WIP: Support Qt for WebAssembly - #294

Draft
Vogtinator wants to merge 5 commits into
nspire-emus:masterfrom
Vogtinator:emscriptenfix
Draft

WIP: Support Qt for WebAssembly#294
Vogtinator wants to merge 5 commits into
nspire-emus:masterfrom
Vogtinator:emscriptenfix

Conversation

@Vogtinator

@Vogtinator Vogtinator commented Dec 29, 2022

Copy link
Copy Markdown
Member
  • Needs better platform integration (file management and settings)
  • Must not break other platforms
  • Fix caching of emsdk libraries in the GH build
  • On Firefox on Android, the screen is drawn too large. I suppose the condition for iOS in qtframebuffer.cpp needs to be extended

@Vogtinator
Vogtinator force-pushed the emscriptenfix branch 3 times, most recently from 29d8890 to f132010 Compare December 29, 2022 21:28
Vogtinator added a commit that referenced this pull request Dec 29, 2022
@Vogtinator

Copy link
Copy Markdown
Member Author

Demo deployed at https://nspire-emus.github.io/firebird/wasm

@Vogtinator
Vogtinator force-pushed the emscriptenfix branch 2 times, most recently from a27424d to 40374c8 Compare December 29, 2022 23:20
Vogtinator added a commit that referenced this pull request Dec 29, 2022
@Vogtinator
Vogtinator force-pushed the emscriptenfix branch 2 times, most recently from e7fda43 to de03b42 Compare December 30, 2022 18:52
@Vogtinator

Copy link
Copy Markdown
Member Author
  • Fix caching of emsdk libraries in the GH build

Apparently that's because setup-emsdk behaves differently if the cache was found. If it's not found, it'll install emsdk into emsdk-main and create a cache in emsdk-cache. The system libs end up in emsdk-main in those builds, but only emsdk-cache is cached. If the cache is found, it uses emsdk-cache as emsdk location and build system libs inside that directory.

@Vogtinator
Vogtinator force-pushed the emscriptenfix branch 5 times, most recently from db494c5 to 0850802 Compare December 30, 2022 20:51
@Vogtinator

Copy link
Copy Markdown
Member Author

Fix caching of emsdk libraries in the GH build

Fixed by running emsdk manually instead of using the setup-emsdk action

@Vogtinator
Vogtinator force-pushed the emscriptenfix branch 2 times, most recently from 5f11f3b to 522cb04 Compare December 30, 2022 22:21
Based on Adriweb's patch, but avoiding the QML file dialog.

CONFIG += ltcg causes the "-s X" options to be merged to a single "-s",
breaking build.
Basically implement cooperative multitasking manually by converting EmuThread
into a QTimer.
Same issue as on iOS also appears in browsers if scaling is used.
@Vogtinator

Copy link
Copy Markdown
Member Author

-O3 -flto is not noticably faster compared to the default (-O3 for object files, -O2 for linking), but it takes twice as long to build.

Vogtinator added a commit that referenced this pull request Dec 30, 2022
@MumflrFumperdink

Copy link
Copy Markdown

I got persistent file management and offline access once loaded on https://github.com/MumflrFumperdink/firebird-updated-fork/tree/emscriptenjit. Try live version on https://mumflrfumperdink.github.io/firebird-updated-fork/firebird-emu.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants