User:Amanieu/Getting Started With PNaCl

From Unvanquished
Jump to: navigation, search

Steps to compile and run the NaCl game code:

  1. Download the NaCl SDK from Google:
  2. In CMake, disable the QVM_COMPAT option and point the NACL_SDK_PATH variable to the version of the SDK you want to use (pepper_30 for example)
  3. If you get an error about PYTHONPATH, it means that your system python is python 3. Set PNACLPYTHON to /bin/python2 to resolve this issue.
  4. Build the NaCl game code (BUILD_GAME_NACL)
  5. From the tools/ subdirectory of the NaCl SDK, copy the following files to the directory containing the engine executable (example is linux x86_64, adjust for your platform):
  • Copy sel_ldr_x86_64 to sel_ldr
  • (Linux only) Copy nacl_helper_bootstrap_x86_64 to nacl_helper_bootstrap
  • Copy irt_core_x86_64.nexe to irt_core-x86_64.nexe (Note the dash vs underscore when renaming)
  1. When running the game, vm_game = 0 will use the NaCl module main/game-<arch>.nexe, vm_game = 1 will use the native module main/game
  2. Keep in mind that modules are only loaded from fs_libpath (which should be the directory containing the executable).