User:Amanieu/Getting Started With PNaCl
Steps to compile and run the NaCl game code:
- Download the NaCl SDK from Google: https://developers.google.com/native-client/sdk/download
- 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)
- 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.
- Build the NaCl game code (BUILD_GAME_NACL)
- 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)
- 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
- Keep in mind that modules are only loaded from fs_libpath (which should be the directory containing the executable).