satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Remove hacks for emscripten issues, use patched emscripten #74

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Removes the partial hacks for some issues encountered with emscripten documented at https://github.com/satoshinm/emglfwbugs (all except fullscreen_fullwindow_toggle, that workaround is less impactful and will have to stay until someone can figure it out), now that I have developed working fixes in emscripten in my branch at: https://github.com/satoshinm/emscripten/tree/netcraft

Before merging, need to: update readme describing to use this emscripten branch, and most importantly, update the CircleCI configuration to pick up these fixes, too (fortunately, shouldn't be too difficult since it is all in the JavaScript source - patch the emsdk? no need to recompile llvm, clang, etc. from source)

satoshinm commented 7 years ago

Attempting a patch to 1.37.9 so can use emsdk on CircleCI and not build from source, yet with these fixes, got to patch, build, and upload artifacts. A nice surprise, the assets can be viewed live: https://99-87007603-gh.circle-artifacts.com/0/root/NetCraft/release-build-js/craft.html (or https://99-87007603-gh.circle-artifacts.com/0/root/NetCraft/wasm-build/craft.html) - however, unable to move around! What broke, is it because it is served over https, or some optimization on 1.37.9? Doesn't occur with incoming+fixes, build, release-build-js...all fine here locally. Weirdly broken on CircleCI build, you can press T to start typing, but then Enter never enters, Backspace never backspaces, input bizarrely broken. Not browser-specific, same on Chrome and Safari and even Firefox.


Replicated locally with 1.37.9+patches, clean builds, release-build-js and build. Backported patch https://gist.github.com/satoshinm/1c5f517fd9cec6c0831302de9619a914 broke something.


A catastrophic typo in the backport patch editing, event.keycode should be event.keyCode. Fixed.

satoshinm commented 7 years ago

Finally working as of CircleCI build 104 (emscripten 1.37.9 + my fixes, so can remove the application workarounds):

https://circleci.com/gh/satoshinm/NetCraft/104#artifacts/containers/0 https://104-87007603-gh.circle-artifacts.com/0/tmp/artifacts/release-build-js/craft.html https://104-87007603-gh.circle-artifacts.com/0/tmp/artifacts/wasm-build/craft.html