RetroArch/pkg/emscripten
Rob Loach db46d91ec6
emscripten: Add Emscripten compile documentation
This adds some documentation about compiling emscripten.
2018-09-30 20:23:05 -04:00
..
libretro emscripten: Add ChaiLove selection to web player 2018-09-14 09:39:20 -04:00
.gitignore
README.md emscripten: Add Emscripten compile documentation 2018-09-30 20:23:05 -04:00

RetroArch Web Player

The RetroArch Web Player is RetroArch compiled through Emscripten. The following outlines how to compile RetroArch using Emscripten, and running it in your browser.

Compiling

To compile RetroArch with Emscripten, you'll first have to download and install the Emscripten SDK. Once it's loaded in your shell, you'll run something like the following...

mkdir ~/retroarch
cd ~/retroarch
git clone https://github.com/libretro/libretro-fceumm.git
cd libretro-fceumm
emmake make -f Makefile.libretro platform=emscripten
git clone https://github.com/libretro/RetroArch.git ~/retroarch/RetroArch
cp ~/retroarch/libretro-fceumm/fceumm_libretro_emscripten.bc ~/retroarch/RetroArch/dist-scripts/fceumm_libretro_emscripten.bc
cd ~/retroarch/RetroArch/dist-scripts
emmake ./dist-cores.sh emscripten

Usage

Most of the magic happens on the browser so nothing really on that regard

I you want a self hosted version you need

  • A web server, nginx/apache will do, download a build here: https://buildbot.libretro.com/nightly/emscripten/
  • Extract the build somewhere in your web-server
  • Unzip it in the same dir you extracted the rest, inside /assets/frontend/bundle
  • Create an assets/cores dir, you can put game data in that dir so it's available under downloads
  • chmod +x the indexer script
  • run the indexer script (you need coffeescript) like this: ./indexer ./assets/frontend > ./assets/frontend/.index-xhr
  • run the indexer script (you need coffeescript) like this: ./indexer ./assets/cores > ./assets/cores/.index-xhr

That should be it, you can add more cores to the list by editing index.html