README-nacl.txt
author Gabriel Jacobo <gabomdq@gmail.com>
Fri, 06 Jun 2014 15:45:59 -0300
changeset 8833 ae720d61d14d
child 8851 a7cfe554d337
permissions -rw-r--r--
Chrome's Native Client backend implementation
     1 ================================================================================
     2 Simple DirectMedia Layer for Native Client
     3 ================================================================================
     4 
     5 Requirements: 
     6     
     7     * Native Client SDK (https://developer.chrome.com/native-client), 
     8       (tested with Pepper version 33 or higher).
     9 
    10 The SDL backend for Chrome's Native Client has been tested only with the PNaCl
    11 toolchain, which generates binaries designed to run on ARM and x86_32/64 
    12 platforms. This does not mean it won't work with the other toolchains!
    13 
    14 ================================================================================
    15 Building SDL for NaCl
    16 ================================================================================
    17 
    18 Set up the right environment variables (see naclbuild.sh), then configure SDL with:
    19 
    20     configure --host=pnacl --prefix some/install/destination
    21     
    22 Then "make". 
    23 
    24 As an example of how to create a deployable app a Makefile project is provided 
    25 in test/nacl/Makefile, which includes some monkey patching of the common.mk file 
    26 provided by NaCl, without which linking properly to SDL won't work (the search 
    27 path can't be modified externally, so the linker won't find SDL's binaries unless 
    28 you dump them into the SDK path, which is inconvenient).
    29 Also provided in test/nacl is the required support file, such as index.html, 
    30 manifest.json, etc.
    31 
    32 
    33 ================================================================================
    34 Running tests
    35 ================================================================================
    36 
    37 Due to the nature of NaCl programs, building and running SDL tests is not as
    38 straightforward as one would hope. The script naclbuild.sh in build-scripts 
    39 automates the process and should serve as a guide for users of SDL trying to build 
    40 their own applications.
    41 
    42 Basic usage:
    43     
    44     ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)
    45     
    46 This will build testgles2.c by default.
    47 
    48 If you want to build a different test, for example testrendercopyex.c:
    49     
    50     SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35
    51     
    52 Once the build finishes, you have to serve the contents with a web server (the
    53 script will give you instructions on how to do that with Python).
    54 
    55 ================================================================================
    56 TODO - Known Issues
    57 ================================================================================
    58 * Audio backend is not usable yet.
    59 * Testing of all systems with a real application (something other than SDL's tests)
    60