{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"VisualC-WinRT","path":"VisualC-WinRT","contentType":"directory"},{"name":"VisualC","path":"VisualC","contentType":"directory"},{"name":"Xcode-iOS","path":"Xcode-iOS","contentType":"directory"},{"name":"Xcode","path":"Xcode","contentType":"directory"},{"name":"acinclude","path":"acinclude","contentType":"directory"},{"name":"android-project","path":"android-project","contentType":"directory"},{"name":"build-scripts","path":"build-scripts","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"debian","path":"debian","contentType":"directory"},{"name":"include","path":"include","contentType":"directory"},{"name":"premake","path":"premake","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":"visualtest","path":"visualtest","contentType":"directory"},{"name":".hgignore","path":".hgignore","contentType":"file"},{"name":"Android.mk","path":"Android.mk","contentType":"file"},{"name":"BUGS.txt","path":"BUGS.txt","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"COPYING.txt","path":"COPYING.txt","contentType":"file"},{"name":"CREDITS.txt","path":"CREDITS.txt","contentType":"file"},{"name":"INSTALL.txt","path":"INSTALL.txt","contentType":"file"},{"name":"Makefile.in","path":"Makefile.in","contentType":"file"},{"name":"Makefile.minimal","path":"Makefile.minimal","contentType":"file"},{"name":"Makefile.pandora","path":"Makefile.pandora","contentType":"file"},{"name":"Makefile.psp","path":"Makefile.psp","contentType":"file"},{"name":"Makefile.wiz","path":"Makefile.wiz","contentType":"file"},{"name":"README-SDL.txt","path":"README-SDL.txt","contentType":"file"},{"name":"README-android.txt","path":"README-android.txt","contentType":"file"},{"name":"README-cmake.txt","path":"README-cmake.txt","contentType":"file"},{"name":"README-directfb.txt","path":"README-directfb.txt","contentType":"file"},{"name":"README-dynapi.txt","path":"README-dynapi.txt","contentType":"file"},{"name":"README-gesture.txt","path":"README-gesture.txt","contentType":"file"},{"name":"README-hg.txt","path":"README-hg.txt","contentType":"file"},{"name":"README-ios.txt","path":"README-ios.txt","contentType":"file"},{"name":"README-linux.txt","path":"README-linux.txt","contentType":"file"},{"name":"README-macosx.txt","path":"README-macosx.txt","contentType":"file"},{"name":"README-nacl.txt","path":"README-nacl.txt","contentType":"file"},{"name":"README-pandora.txt","path":"README-pandora.txt","contentType":"file"},{"name":"README-platforms.txt","path":"README-platforms.txt","contentType":"file"},{"name":"README-porting.txt","path":"README-porting.txt","contentType":"file"},{"name":"README-psp.txt","path":"README-psp.txt","contentType":"file"},{"name":"README-raspberrypi.txt","path":"README-raspberrypi.txt","contentType":"file"},{"name":"README-touch.txt","path":"README-touch.txt","contentType":"file"},{"name":"README-wince.txt","path":"README-wince.txt","contentType":"file"},{"name":"README-windows.txt","path":"README-windows.txt","contentType":"file"},{"name":"README-winrt.txt","path":"README-winrt.txt","contentType":"file"},{"name":"README.txt","path":"README.txt","contentType":"file"},{"name":"SDL2.spec.in","path":"SDL2.spec.in","contentType":"file"},{"name":"TODO.txt","path":"TODO.txt","contentType":"file"},{"name":"VisualC.html","path":"VisualC.html","contentType":"file"},{"name":"WhatsNew.txt","path":"WhatsNew.txt","contentType":"file"},{"name":"autogen.sh","path":"autogen.sh","contentType":"file"},{"name":"cmake_uninstall.cmake.in","path":"cmake_uninstall.cmake.in","contentType":"file"},{"name":"configure","path":"configure","contentType":"file"},{"name":"configure.in","path":"configure.in","contentType":"file"},{"name":"sdl2-config.in","path":"sdl2-config.in","contentType":"file"},{"name":"sdl2.m4","path":"sdl2.m4","contentType":"file"},{"name":"sdl2.pc.in","path":"sdl2.pc.in","contentType":"file"}],"totalCount":58}},"fileTreeProcessingTime":3.660196,"foldersToFetch":[],"repo":{"id":330008801,"defaultBranch":"main","name":"SDL","ownerLogin":"libsdl-org","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-01-15T19:55:54.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/77683370?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"a838a56d45b237888810ca4c76d9345fe98f27f6","listCacheKey":"v0:1709678518.0","canEdit":false,"refType":"tree","currentOid":"a838a56d45b237888810ca4c76d9345fe98f27f6"},"path":"README-nacl.txt","currentUser":null,"blob":{"rawLines":["================================================================================","Simple DirectMedia Layer for Native Client","================================================================================","","Requirements: "," "," * Native Client SDK (https://developer.chrome.com/native-client), "," (tested with Pepper version 33 or higher).","","The SDL backend for Chrome's Native Client has been tested only with the PNaCl","toolchain, which generates binaries designed to run on ARM and x86_32/64 ","platforms. This does not mean it won't work with the other toolchains!","","================================================================================","Building SDL for NaCl","================================================================================","","Set up the right environment variables (see naclbuild.sh), then configure SDL with:",""," configure --host=pnacl --prefix some/install/destination"," ","Then \"make\". ","","As an example of how to create a deployable app a Makefile project is provided ","in test/nacl/Makefile, which includes some monkey patching of the common.mk file ","provided by NaCl, without which linking properly to SDL won't work (the search ","path can't be modified externally, so the linker won't find SDL's binaries unless ","you dump them into the SDK path, which is inconvenient).","Also provided in test/nacl is the required support file, such as index.html, ","manifest.json, etc.","SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.","This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),","hiding the asynchronous nature of the browser behind the scenes...which is not the","same as making it disappear!","","","================================================================================","Running tests","================================================================================","","Due to the nature of NaCl programs, building and running SDL tests is not as","straightforward as one would hope. The script naclbuild.sh in build-scripts ","automates the process and should serve as a guide for users of SDL trying to build ","their own applications.","","Basic usage:"," "," ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)"," ","This will build testgles2.c by default.","","If you want to build a different test, for example testrendercopyex.c:"," "," SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35"," ","Once the build finishes, you have to serve the contents with a web server (the","script will give you instructions on how to do that with Python).","","================================================================================","RWops and nacl_io","================================================================================","","SDL_RWops work transparently with nacl_io. Two functions control the mount points:"," "," int mount(const char* source, const char* target, "," const char* filesystemtype, "," unsigned long mountflags, const void *data);"," int umount(const char *target);"," "," For convenience, SDL will by default mount an httpfs tree at / before calling ","the app's main function. Such setting can be overridden by calling:"," "," umount(\"/\");","","And then mounting a different filesystem at /","","It's important to consider that the asynchronous nature of file operations on a","browser is hidden from the application, effectively providing the developer with","a set of blocking file operations just like you get in a regular desktop ","environment, which eases the job of porting to Native Client, but also introduces ","a set of challenges of its own, in particular when big file sizes and slow ","connections are involved.","","For more information on how nacl_io and mount points work, see:"," "," https://developer.chrome.com/native-client/devguide/coding/nacl_io"," https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h","","To be able to save into the directory \"/save/\" (like backup of game) :",""," mount(\"\", \"/save\", \"html5fs\", 0, \"type=PERSISTENT\");","","And add to manifest.json :",""," \"permissions\": ["," \"unlimitedStorage\""," ]","","================================================================================","TODO - Known Issues","================================================================================","* Testing of all systems with a real application (something other than SDL's tests)","* Key events don't seem to work properly"],"stylingDirectives":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/libsdl-org/SDL/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"README-nacl.txt","displayUrl":"https://github.com/libsdl-org/SDL/blob/a838a56d45b237888810ca4c76d9345fe98f27f6/README-nacl.txt?raw=true","headerInfo":{"blobSize":"4.34 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":null,"isGitLfs":false,"onBranch":false,"shortPath":"d868e91","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Flibsdl-org%2FSDL%2Fblob%2Fa838a56d45b237888810ca4c76d9345fe98f27f6%2FREADME-nacl.txt","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"104","truncatedSloc":"72"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Text","languageID":372,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/libsdl-org/SDL/blob/a838a56d45b237888810ca4c76d9345fe98f27f6/README-nacl.txt","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/libsdl-org/SDL/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/libsdl-org/SDL/raw/a838a56d45b237888810ca4c76d9345fe98f27f6/README-nacl.txt","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":true,"symbols":[]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/libsdl-org/SDL/branches":{"post":"jcdGC4Hjn_uHJ9MV2YdewNSFaFom9sLsnnznHiImCtbV76XGzE5VK8xPYWoxokQJH_izck6Pqza5teJlEPsX9g"},"/repos/preferences":{"post":"Byb_yWZydHwQb0Uxbyal_JEPxaM4YteV6TE6ZwhEWIXTiGfSVl6hiGWkcmJ1-2LSV1Mm9fXgbD7YiDNAOB7EoQ"}}},"title":"SDL/README-nacl.txt at a838a56d45b237888810ca4c76d9345fe98f27f6 ยท libsdl-org/SDL"}