[Feature Request] add SDL2 lib to emscripten cache
kevodwyer opened this issue · 1 comments
I was wondering if you would be able to add libSDL2.a to /emscripten/cache/sysroot/lib/wasm32-emscripten
in the files published to the demo branch?
I tried manually adding the file from a local install of emscripten 3.1.24, but when issuing the em++ command from inside emception i can see it tries to download SDL2. Not sure how to trick the script i have the file or otherwise workaround this.
To give some context to my use case. I work on the boxedwine emulator (multiplatform emulator to run WINE). Click here to run age of empires in the browser. The emulator as a number of 'cores' ranging from simple (used by emscripten build) to a binary translator that can achieve a good fraction of native speed. Like dosbox, a third dynamic 'core' can work like a JIT. In the case of emscripten build, it dynamically generates c++ code, but does not compile/load it. Rather boxedwine can be subsequently compiled with the additional generated code to produce an optimised build (x2 performance improvement).
The idea is to use emception to compile boxedwine. To that end I have pushed some code based on emception to do this here. Boxedwine uses SDL2, in its absence I have hacked the code to use SDL1 for quick demonstration. It takes < 2 min to compile.
If you can tell me where in the build process I may be able to force emscripten to add the SDL2 libraries so they are available in the build I would be grateful. Happy to manually add/modify files if you can provide a guide to what need editing.