Commit ec033a1d authored by Sam Lantinga's avatar Sam Lantinga

Updated iOS projects and renamed iPhoneOS to iOS

--HG--
rename : README.iphoneos => README.iOS
rename : Xcode-iPhoneOS/Demos/Default.png => Xcode-iOS/Demos/Default.png
rename : Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
rename : Xcode-iPhoneOS/Demos/Icon.png => Xcode-iOS/Demos/Icon.png
rename : Xcode-iPhoneOS/Demos/Info.plist => Xcode-iOS/Demos/Info.plist
rename : Xcode-iPhoneOS/Demos/README => Xcode-iOS/Demos/README
rename : Xcode-iPhoneOS/Demos/data/bitmapfont/kromasky_16x16.bmp => Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp
rename : Xcode-iPhoneOS/Demos/data/bitmapfont/license.txt => Xcode-iOS/Demos/data/bitmapfont/license.txt
rename : Xcode-iPhoneOS/Demos/data/drums/ds_brush_snare.wav => Xcode-iOS/Demos/data/drums/ds_brush_snare.wav
rename : Xcode-iPhoneOS/Demos/data/drums/ds_china.wav => Xcode-iOS/Demos/data/drums/ds_china.wav
rename : Xcode-iPhoneOS/Demos/data/drums/ds_kick_big_amb.wav => Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav
rename : Xcode-iPhoneOS/Demos/data/drums/ds_loose_skin_mute.wav => Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav
rename : Xcode-iPhoneOS/Demos/data/icon.bmp => Xcode-iOS/Demos/data/icon.bmp
rename : Xcode-iPhoneOS/Demos/data/ship.bmp => Xcode-iOS/Demos/data/ship.bmp
rename : Xcode-iPhoneOS/Demos/data/space.bmp => Xcode-iOS/Demos/data/space.bmp
rename : Xcode-iPhoneOS/Demos/data/stroke.bmp => Xcode-iOS/Demos/data/stroke.bmp
rename : Xcode-iPhoneOS/Demos/src/accelerometer.c => Xcode-iOS/Demos/src/accelerometer.c
rename : Xcode-iPhoneOS/Demos/src/common.c => Xcode-iOS/Demos/src/common.c
rename : Xcode-iPhoneOS/Demos/src/common.h => Xcode-iOS/Demos/src/common.h
rename : Xcode-iPhoneOS/Demos/src/fireworks.c => Xcode-iOS/Demos/src/fireworks.c
rename : Xcode-iPhoneOS/Demos/src/happy.c => Xcode-iOS/Demos/src/happy.c
rename : Xcode-iPhoneOS/Demos/src/keyboard.c => Xcode-iOS/Demos/src/keyboard.c
rename : Xcode-iPhoneOS/Demos/src/mixer.c => Xcode-iOS/Demos/src/mixer.c
rename : Xcode-iPhoneOS/Demos/src/rectangles.c => Xcode-iOS/Demos/src/rectangles.c
rename : Xcode-iPhoneOS/Demos/src/touch.c => Xcode-iOS/Demos/src/touch.c
rename : Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
rename : Xcode-iPhoneOS/SDL/testsdl-Info.plist => Xcode-iOS/SDL/testsdl-Info.plist
rename : Xcode-iPhoneOS/Template/SDL iOS Application/Default.png => Xcode-iOS/Template/SDL iOS Application/Default.png
rename : Xcode-iPhoneOS/Template/SDL iOS Application/Icon.png => Xcode-iOS/Template/SDL iOS Application/Icon.png
rename : Xcode-iPhoneOS/Template/SDL iOS Application/Info.plist => Xcode-iOS/Template/SDL iOS Application/Info.plist
rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
rename : Xcode-iPhoneOS/Template/SDL iOS Application/main.c => Xcode-iOS/Template/SDL iOS Application/main.c
rename : Xcode-iPhoneOS/Test/Info.plist => Xcode-iOS/Test/Info.plist
rename : Xcode-iPhoneOS/Test/README => Xcode-iOS/Test/README
rename : Xcode-iPhoneOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
parent da1a15e0
......@@ -36,7 +36,7 @@ VERSION_OBJECTS = @VERSION_OBJECTS@
SDLMAIN_TARGET = libSDLmain.a
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
SRC_DIST = acinclude Android.mk autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS
SRC_DIST = acinclude Android.mk autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iOS
GEN_DIST = SDL.spec
HDRS = \
......
......@@ -5,30 +5,31 @@ Building the Simple DirectMedia Layer for iPhone OS 2.0
Requirements: Mac OS X v10.5 or later and the iPhone SDK.
Instructions:
1. Open SDLiPhoneOS.xcodeproj (located in Xcode-iPhoneOS/SDL) in XCode.
2. Set Project->Set Active SDK to "Use Project Settings"
3. Select your desired target, and hit build.
1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in XCode.
2. Select your desired target, and hit build.
There are three build targets:
- StaticLibiPhoneOS:
Build SDL as a statically linked (armv6) library for iPhone OS 2.0.
- StaticLibSimulator:
Build SDL as a statically linked (x86) library for the iPhone Simulator
- libSDL.a:
Build SDL as a statically linked library
- testsdl
Build a test program (there are known test failures which are fine)
- Template:
Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.
==============================================================================
Using the Simple DirectMedia Layer for iPhone OS 2.0
Using the Simple DirectMedia Layer for iOS
==============================================================================
FIXME: This needs to be updated for the latest methods
Here is the easiest method:
1. Build the SDL libraries (libSDLiPhoneOS.a and libSDLSimulator.a) and the iPhone SDL Application template.
1. Install the iPhone SDL Application template by copying it to one of XCode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iPhoneOS.platform/Developer/Library/XCode/Project Templates/" and placing it there.
1. Build the SDL libraries (libSDL.a and libSDLSimulator.a) and the iPhone SDL Application template.
1. Install the iPhone SDL Application template by copying it to one of XCode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/XCode/Project Templates/" and placing it there.
2. Start a new project using the template. The project should be immediately ready for use with SDL.
Here is a more manual method:
1. Create a new iPhone view based application.
2. Build the SDL static libraries (libSDLiPhoneOS.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator.
2. Build the SDL static libraries (libSDL.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator.
3. Include the SDL header files in your project.
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically.
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code.
......@@ -86,7 +87,7 @@ MySDLApp Home/
When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences".
More information on this subject is available here:
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_6_section_3.html#//apple_ref/doc/uid/TP40007072-CH7-SW21
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
==============================================================================
Notes -- iPhone SDL limitations
......@@ -107,5 +108,3 @@ Audio:
Loading Shared Objects:
This is disabled by default since it seems to break the terms of the iPhone SDK agreement. It can be re-enabled in SDL_config_iphoneos.h.
......@@ -2,7 +2,7 @@
About the iPhone OS Demo Applications
==============================================================================
DemosiPhoneOS.xcodeproj contains several targets for iPhone oriented SDL demos. These demos are written strictly using SDL 1.3 calls. All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script. To run them on your favorite platform, you may wish to set the macros SCREEN_WIDTH and SCREEN_HEIGHT, located in common.h.
Demos.xcodeproj contains several targets for iPhone oriented SDL demos. These demos are written strictly using SDL 1.3 calls. All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script. To run them on your favorite platform, you may wish to set the macros SCREEN_WIDTH and SCREEN_HEIGHT, located in common.h.
Common files:
......
......@@ -7,17 +7,6 @@
objects = {
/* Begin PBXAggregateTarget section */
00B4F47112F696830084EC00 /* BuildUniversalSimulatorDevicelibSDL */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 00B4F47412F696B30084EC00 /* Build configuration list for PBXAggregateTarget "BuildUniversalSimulatorDevicelibSDL" */;
buildPhases = (
00B4F47012F696830084EC00 /* ShellScript */,
);
dependencies = (
);
name = BuildUniversalSimulatorDevicelibSDL;
productName = "Build Universal Simulator/Device libSDL";
};
00B4F48B12F6A69C0084EC00 /* PrepareXcodeProjectTemplate */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 00B4F48E12F6A6BA0084EC00 /* Build configuration list for PBXAggregateTarget "PrepareXcodeProjectTemplate" */;
......@@ -25,7 +14,6 @@
00B4F48A12F6A69C0084EC00 /* ShellScript */,
);
dependencies = (
00B4F49712F6A7B00084EC00 /* PBXTargetDependency */,
);
name = PrepareXcodeProjectTemplate;
productName = PrepareXcodeProjectTemplate;
......@@ -248,14 +236,7 @@
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
remoteInfo = StaticLibiPhoneOS;
};
00B4F49612F6A7B00084EC00 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 00B4F47112F696830084EC00;
remoteInfo = BuildUniversalSimulatorDevicelibSDL;
remoteInfo = StaticLib;
};
/* End PBXContainerItemProxy section */
......@@ -1298,7 +1279,10 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLiPhoneOS" */;
attributes = {
LastUpgradeCheck = 0420;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDL" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
......@@ -1314,7 +1298,6 @@
targets = (
FD6526620DE8FCCB002AD96B /* libSDL */,
006E982111955059001DE610 /* testsdl */,
00B4F47112F696830084EC00 /* BuildUniversalSimulatorDevicelibSDL */,
00B4F48B12F6A69C0084EC00 /* PrepareXcodeProjectTemplate */,
);
};
......@@ -1338,22 +1321,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
00B4F47012F696830084EC00 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SYMROOT)/$(CONFIGURATION)-iphonesimulator/libSDL.a",
"$(SYMROOT)/$(CONFIGURATION)-iphoneos/libSDL.a",
);
outputPaths = (
"$(SYMROOT)/$CONFIGURATION-Universal/libSDL.a",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Build the simulator binary\n# xcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration Release -sdk iphonesimulator\nxcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration $CONFIGURATION -sdk iphonesimulator\n\n# Build the device binary\n# xcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration Release -sdk iphoneos\nxcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration $CONFIGURATION -sdk iphoneos\n\n# create a simulator/device fat binary from the 2 separate builds\nlipo $SYMROOT/$CONFIGURATION-iphonesimulator/libSDL.a $SYMROOT/$CONFIGURATION-iphoneos/libSDL.a -output $SYMROOT/$CONFIGURATION-Universal/libSDL.a -create\n\necho \"Created Universal Simulator/Device binary at $SYMROOT/$CONFIGURATION-Universal/libSDL.a\"\n\n\nexit 0\n";
};
00B4F48A12F6A69C0084EC00 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -1493,23 +1460,14 @@
target = FD6526620DE8FCCB002AD96B /* libSDL */;
targetProxy = 006E982A11955065001DE610 /* PBXContainerItemProxy */;
};
00B4F49712F6A7B00084EC00 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 00B4F47112F696830084EC00 /* BuildUniversalSimulatorDevicelibSDL */;
targetProxy = 00B4F49612F6A7B00084EC00 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
006E98251195505B001DE610 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "testsdl-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
OTHER_LDFLAGS = (
......@@ -1518,7 +1476,6 @@
"-framework",
UIKit,
);
PREBINDING = NO;
PRODUCT_NAME = testsdl;
};
name = Debug;
......@@ -1526,12 +1483,8 @@
006E98261195505B001DE610 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "testsdl-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
OTHER_LDFLAGS = (
......@@ -1540,30 +1493,7 @@
"-framework",
UIKit,
);
PREBINDING = NO;
PRODUCT_NAME = testsdl;
ZERO_LINK = NO;
};
name = Release;
};
00B4F47212F696830084EC00 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = BuildUniversalSimulatorDevicelibSDL;
};
name = Debug;
};
00B4F47312F696830084EC00 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = BuildUniversalSimulatorDevicelibSDL;
ZERO_LINK = NO;
};
name = Release;
};
......@@ -1582,7 +1512,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = PrepareXcodeProjectTemplate;
ZERO_LINK = NO;
};
......@@ -1591,16 +1520,11 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_DEBUGGING_SYMBOLS = full;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
......@@ -1609,14 +1533,10 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
PREBINDING = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
......@@ -1625,12 +1545,7 @@
FD6526640DE8FCCB002AD96B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
DEPLOYMENT_LOCATION = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PREBINDING = NO;
PRODUCT_NAME = SDL;
SKIP_INSTALL = YES;
};
......@@ -1639,15 +1554,9 @@
FD6526650DE8FCCB002AD96B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_LOCATION = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PREBINDING = NO;
PRODUCT_NAME = SDL;
SKIP_INSTALL = YES;
ZERO_LINK = NO;
};
name = Release;
};
......@@ -1663,15 +1572,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
00B4F47412F696B30084EC00 /* Build configuration list for PBXAggregateTarget "BuildUniversalSimulatorDevicelibSDL" */ = {
isa = XCConfigurationList;
buildConfigurations = (
00B4F47212F696830084EC00 /* Debug */,
00B4F47312F696830084EC00 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
00B4F48E12F6A6BA0084EC00 /* Build configuration list for PBXAggregateTarget "PrepareXcodeProjectTemplate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
......@@ -1681,7 +1581,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLiPhoneOS" */ = {
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDL" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
......
......@@ -635,7 +635,7 @@ EXCLUDE = ../doxy \
../Xcode \
../VisualC \
../VisualCE \
../Xcode-iPhoneOS
../Xcode-iOS
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment