libretro / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
46 stars 56 forks source link

How to compile using Ecmascripten? #201

Open MurhafSousli opened 5 years ago

MurhafSousli commented 5 years ago

Hi can anyone guide me

I am trying to apply the ecmscripten tutorial https://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html to build and compile this project, but I cannot find figure out where to start from, I cannot find ./configure nor any CMAKE file

image

Do I write the cmake file, and where is the main entry file where that I can use to compile all cpp files and get the application compiled?

Can anyone guide me on this please?

Many thanks

stellarporter commented 5 years ago

@MurhafSousli Trying following this guide, as it's simple and works https://github.com/libretro/RetroArch/tree/master/pkg/emscripten

If you want to use an Appveyor buildbot, here's a script for compiling snes9x forks:

version: 0.1.{build}

shallow_clone: true

image:
- ubuntu1804

before_build:
  - git clone https://github.com/libretro/RetroArch Retroarch

  - git clone https://github.com/emscripten-core/emsdk emsdk
  - cd emsdk
  - ./emsdk install latest
  - ./emsdk activate latest
  - source ./emsdk_env.sh

build_script:
  - cd ../libretro
  - emmake make -f Makefile platform=emscripten
  - cp *.bc ../Retroarch/dist-scripts

  - cd ../Retroarch/dist-scripts
  - chmod a+x dist-cores.sh
  - emmake ./dist-cores.sh emscripten

artifacts:
  - path: '**\snes9x*.js'
  - path: '**\snes9x*.wasm'