{"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":7.012843,"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-macosx.txt","currentUser":null,"blob":{"rawLines":["==============================================================================\r","Using the Simple DirectMedia Layer with Mac OS X\r","==============================================================================\r","\r","These instructions are for people using Apple's Mac OS X (pronounced\r","\"ten\").\r","\r","From the developer's point of view, OS X is a sort of hybrid Mac and\r","Unix system, and you have the option of using either traditional\r","command line tools or Apple's IDE Xcode.\r","\r","To build SDL using the command line, use the standard configure and make\r","process:\r","\r","\t./configure\r","\tmake\r","\tsudo make install\r","\r","You can also build SDL as a Universal library (a single binary for both\r","32-bit and 64-bit Intel architectures), on Mac OS X 10.7 and newer, by using\r","the fatbuild.sh script in build-scripts:\r","\tsh build-scripts/fatbuild.sh\r","\tsudo build-scripts/fatbuild.sh install\r","This script builds SDL with 10.5 ABI compatibility on i386 and 10.6\r","ABI compatibility on x86_64 architectures. For best compatibility you\r","should compile your application the same way. A script which wraps\r","gcc to make this easy is provided in test/gcc-fat.sh\r","\r","Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK\r","(even if you target back to 10.5 systems). PowerPC support for Mac OS X has\r","been officially dropped as of SDL 2.0.2.\r","\r","To use the library once it's built, you essential have two possibilities:\r","use the traditional autoconf/automake/make method, or use Xcode.\r","\r","==============================================================================\r","Caveats for using SDL with Mac OS X\r","==============================================================================\r","\r","Some things you have to be aware of when using SDL on Mac OS X:\r","\r","- If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),\r"," SDL will not register its own. This means that SDL will not terminate using\r"," SDL_Quit if it receives a termination request, it will terminate like a \r"," normal app, and it will not send a SDL_DROPFILE when you request to open a\r"," file with the app. To solve these issues, put the following code in your \r"," NSApplicationDelegate implementation:\r","\r"," - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender\r"," {\r"," if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {\r"," SDL_Event event;\r"," event.type = SDL_QUIT;\r"," SDL_PushEvent(&event);\r"," }\r","\r"," return NSTerminateCancel;\r"," }\r","\r"," - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename\r"," {\r"," if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {\r"," SDL_Event event;\r"," event.type = SDL_DROPFILE;\r"," event.drop.file = SDL_strdup([filename UTF8String]);\r"," return (SDL_PushEvent(&event) > 0);\r"," }\r","\r"," return NO;\r"," }\r","\r","==============================================================================\r","Using the Simple DirectMedia Layer with a traditional Makefile\r","==============================================================================\r","\r","An existing autoconf/automake build system for your SDL app has good chances\r","to work almost unchanged on OS X. However, to produce a \"real\" Mac OS X binary\r","that you can distribute to users, you need to put the generated binary into a\r","so called \"bundle\", which basically is a fancy folder with a name like\r","\"MyCoolGame.app\".\r","\r","To get this build automatically, add something like the following rule to\r","your Makefile.am:\r","\r","bundle_contents = APP_NAME.app/Contents\r","APP_NAME_bundle: EXE_NAME\r","\tmkdir -p $(bundle_contents)/MacOS\r","\tmkdir -p $(bundle_contents)/Resources\r","\techo \"APPL????\" > $(bundle_contents)/PkgInfo\r","\t$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/\r","\r","You should replace EXE_NAME with the name of the executable. APP_NAME is what\r","will be visible to the user in the Finder. Usually it will be the same\r","as EXE_NAME but capitalized. E.g. if EXE_NAME is \"testgame\" then APP_NAME \r","usually is \"TestGame\". You might also want to use @PACKAGE@ to use the package\r","name as specified in your configure.in file.\r","\r","If your project builds more than one application, you will have to do a bit\r","more. For each of your target applications, you need a separate rule.\r","\r","If you want the created bundles to be installed, you may want to add this\r","rule to your Makefile.am:\r","\r","install-exec-hook: APP_NAME_bundle\r","\trm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app\r","\tmkdir -p $(DESTDIR)$(prefix)/Applications/\r","\tcp -r $< /$(DESTDIR)$(prefix)Applications/\r","\r","This rule takes the Bundle created by the rule from step 3 and installs them\r","into $(DESTDIR)$(prefix)/Applications/.\r","\r","Again, if you want to install multiple applications, you will have to augment\r","the make rule accordingly.\r","\r","\r","But beware! That is only part of the story! With the above, you end up with\r","a bare bone .app bundle, which is double clickable from the Finder. But\r","there are some more things you should do before shipping your product...\r","\r","1) The bundle right now probably is dynamically linked against SDL. That \r"," means that when you copy it to another computer, *it will not run*,\r"," unless you also install SDL on that other computer. A good solution\r"," for this dilemma is to static link against SDL. On OS X, you can\r"," achieve that by linking against the libraries listed by\r"," sdl-config --static-libs\r"," instead of those listed by\r"," sdl-config --libs\r"," Depending on how exactly SDL is integrated into your build systems, the\r"," way to achieve that varies, so I won't describe it here in detail\r","2) Add an 'Info.plist' to your application. That is a special XML file which\r"," contains some meta-information about your application (like some copyright\r"," information, the version of your app, the name of an optional icon file,\r"," and other things). Part of that information is displayed by the Finder\r"," when you click on the .app, or if you look at the \"Get Info\" window.\r"," More information about Info.plist files can be found on Apple's homepage.\r","\r","\r","As a final remark, let me add that I use some of the techniques (and some\r","variations of them) in Exult and ScummVM; both are available in source on\r","the net, so feel free to take a peek at them for inspiration!\r","\r","\r","==============================================================================\r","Using the Simple DirectMedia Layer with Xcode\r","==============================================================================\r","\r","These instructions are for using Apple's Xcode IDE to build SDL applications.\r","\r","- First steps\r","\r","The first thing to do is to unpack the Xcode.tar.gz archive in the\r","top level SDL directory (where the Xcode.tar.gz archive resides).\r","Because Stuffit Expander will unpack the archive into a subdirectory,\r","you should unpack the archive manually from the command line:\r","\tcd [path_to_SDL_source]\r","\ttar zxf Xcode.tar.gz\r","This will create a new folder called Xcode, which you can browse\r","normally from the Finder.\r","\r","- Building the Framework\r","\r","The SDL Library is packaged as a framework bundle, an organized\r","relocatable folder hierarchy of executable code, interface headers,\r","and additional resources. For practical purposes, you can think of a \r","framework as a more user and system-friendly shared library, whose library\r","file behaves more or less like a standard UNIX shared library.\r","\r","To build the framework, simply open the framework project and build it. \r","By default, the framework bundle \"SDL.framework\" is installed in \r","/Library/Frameworks. Therefore, the testers and project stationary expect\r","it to be located there. However, it will function the same in any of the\r","following locations:\r","\r"," ~/Library/Frameworks\r"," /Local/Library/Frameworks\r"," /System/Library/Frameworks\r","\r","- Build Options\r"," There are two \"Build Styles\" (See the \"Targets\" tab) for SDL.\r"," \"Deployment\" should be used if you aren't tweaking the SDL library.\r"," \"Development\" should be used to debug SDL apps or the library itself.\r","\r","- Building the Testers\r"," Open the SDLTest project and build away!\r","\r","- Using the Project Stationary\r"," Copy the stationary to the indicated folders to access it from\r"," the \"New Project\" and \"Add target\" menus. What could be easier?\r","\r","- Setting up a new project by hand\r"," Some of you won't want to use the Stationary so I'll give some tips:\r"," * Create a new \"Cocoa Application\"\r"," * Add src/main/macosx/SDLMain.m , .h and .nib to your project\r"," * Remove \"main.c\" from your project\r"," * Remove \"MainMenu.nib\" from your project\r"," * Add \"$(HOME)/Library/Frameworks/SDL.framework/Headers\" to include path\r"," * Add \"$(HOME)/Library/Frameworks\" to the frameworks search path\r"," * Add \"-framework SDL -framework Foundation -framework AppKit\" to \"OTHER_LDFLAGS\"\r"," * Set the \"Main Nib File\" under \"Application Settings\" to \"SDLMain.nib\"\r"," * Add your files\r"," * Clean and build\r","\r","- Building from command line\r"," Use pbxbuild in the same directory as your .pbproj file\r","\r","- Running your app\r"," You can send command line args to your app by either invoking it from\r"," the command line (in *.app/Contents/MacOS) or by entering them in the\r"," \"Executables\" panel of the target settings.\r"," \r","- Implementation Notes\r"," Some things that may be of interest about how it all works...\r"," * Working directory\r"," As defined in the SDL_main.m file, the working directory of your SDL app\r"," is by default set to its parent. You may wish to change this to better\r"," suit your needs.\r"," * You have a Cocoa App!\r"," Your SDL app is essentially a Cocoa application. When your app\r"," starts up and the libraries finish loading, a Cocoa procedure is called,\r"," which sets up the working directory and calls your main() method.\r"," You are free to modify your Cocoa app with generally no consequence \r"," to SDL. You cannot, however, easily change the SDL window itself.\r"," Functionality may be added in the future to help this.\r","\r","\r","Known bugs are listed in the file \"BUGS\"\r"],"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-macosx.txt","displayUrl":"https://github.com/libsdl-org/SDL/blame/a838a56d45b237888810ca4c76d9345fe98f27f6/README-macosx.txt?raw=true","headerInfo":{"blobSize":"9.78 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":"895b9d1","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Flibsdl-org%2FSDL%2Fblame%2Fa838a56d45b237888810ca4c76d9345fe98f27f6%2FREADME-macosx.txt","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"226","truncatedSloc":"179"},"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/blame/a838a56d45b237888810ca4c76d9345fe98f27f6/README-macosx.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-macosx.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,"blame":{"ranges":{"1":{"start":1,"oldStart":1,"end":226,"oldEnd":226,"commitOid":"3dcb451f85773e07bef3c5d1668c58ea6755c7f1","reblamePath":null}},"commits":{"3dcb451f85773e07bef3c5d1668c58ea6755c7f1":{"oid":"3dcb451f85773e07bef3c5d1668c58ea6755c7f1","message":"Added a README file regarding WinRT support\n\nTo note, this file is currently formatted with CRLF line endings, rather than\nLF, to allow the file to be viewed with Notepad.","shortMessageHtmlLink":"Added a README file regarding WinRT support","authorAvatarUrl":"https://avatars.githubusercontent.com/u/475856?s=80&v=4","committerName":"David Ludwig","committerEmail":"dludwig@pobox.com","committedDate":"2014-04-09T21:29:19.000-04:00","firstParentOid":null}},"ignoreRevs":{"path":".git-blame-ignore-revs","present":false,"timedOut":null}},"csrf_tokens":{"/libsdl-org/SDL/branches":{"post":"GpSpis0ybFBvQxncXg6_ae5Rsf3mliTyUPSwOyYpNhc504dznWLlaBMmTPcj83LC_FsznlMRbta_VkS-x1jMdg"},"/repos/preferences":{"post":"PL6q-8cFv5lUF9GUna-LixgmsL_N04z2LnxzPKVUiVoj_VbU0FgknAH6E5AtHzng70eg0bjnr9CpPTtr49Lt-A"}}},"title":"Blaming SDL/README-macosx.txt at a838a56d45b237888810ca4c76d9345fe98f27f6 ยท libsdl-org/SDL"}