add testdropfile to OS X Project
authorEdward Rudd <urkle@outoforder.cc>
Tue, 04 Feb 2014 18:21:39 -0500
changeset 8174a8e60169b648
parent 8173 23919d993046
child 8175 4f4c65f5d797
add testdropfile to OS X Project
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
Xcode/SDLTest/TestDropFile-Info.plist
test/testdropfile.c
     1.1 --- a/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj	Tue Feb 04 18:17:16 2014 -0500
     1.2 +++ b/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj	Tue Feb 04 18:21:39 2014 -0500
     1.3 @@ -588,6 +588,18 @@
     1.4  		DB89957918A19ABA0092407C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A873910730675007319AE /* Carbon.framework */; };
     1.5  		DB89957A18A19ABA0092407C /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 003FA645093FFD41000C53B3 /* libSDL2.a */; };
     1.6  		DB89958418A19B130092407C /* testhotplug.c in Sources */ = {isa = PBXBuildFile; fileRef = DB89958318A19B130092407C /* testhotplug.c */; };
     1.7 +		DB445EEA18184B7000B306B0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F33A709CA188600EBEB88 /* Cocoa.framework */; };
     1.8 +		DB445EEB18184B7000B306B0 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863B10730545007319AE /* CoreAudio.framework */; };
     1.9 +		DB445EEC18184B7000B306B0 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863C10730545007319AE /* ForceFeedback.framework */; };
    1.10 +		DB445EED18184B7000B306B0 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863D10730545007319AE /* IOKit.framework */; };
    1.11 +		DB445EEE18184B7000B306B0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A869F10730593007319AE /* AudioToolbox.framework */; };
    1.12 +		DB445EEF18184B7000B306B0 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A86A010730593007319AE /* CoreFoundation.framework */; };
    1.13 +		DB445EF018184B7000B306B0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A86F2107305CE007319AE /* OpenGL.framework */; };
    1.14 +		DB445EF118184B7000B306B0 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A871410730623007319AE /* AudioUnit.framework */; };
    1.15 +		DB445EF218184B7000B306B0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A873910730675007319AE /* Carbon.framework */; };
    1.16 +		DB445EF318184B7000B306B0 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 003FA645093FFD41000C53B3 /* libSDL2.a */; };
    1.17 +		DB445EF418184B7000B306B0 /* libSDL_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB166D7F16A1D12400A1396C /* libSDL_test.a */; };
    1.18 +		DB445EFB18184BB600B306B0 /* testdropfile.c in Sources */ = {isa = PBXBuildFile; fileRef = DB445EFA18184BB600B306B0 /* testdropfile.c */; };
    1.19  /* End PBXBuildFile section */
    1.20  
    1.21  /* Begin PBXContainerItemProxy section */
    1.22 @@ -1172,6 +1184,9 @@
    1.23  		DB166ECF16A1D87000A1396C /* shapes */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shapes; path = ../../test/shapes; sourceTree = "<group>"; };
    1.24  		DB89957E18A19ABA0092407C /* testhotplug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhotplug; sourceTree = BUILT_PRODUCTS_DIR; };
    1.25  		DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhotplug.c; path = ../../test/testhotplug.c; sourceTree = "<group>"; };
    1.26 +		DB445EF818184B7000B306B0 /* testdropfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testdropfile.app; sourceTree = BUILT_PRODUCTS_DIR; };
    1.27 +		DB445EFA18184BB600B306B0 /* testdropfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdropfile.c; path = ../../test/testdropfile.c; sourceTree = "<group>"; };
    1.28 +		DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "TestDropFile-Info.plist"; sourceTree = "<group>"; };
    1.29  /* End PBXFileReference section */
    1.30  
    1.31  /* Begin PBXFrameworksBuildPhase section */
    1.32 @@ -1941,6 +1956,24 @@
    1.33  			);
    1.34  			runOnlyForDeploymentPostprocessing = 0;
    1.35  		};
    1.36 +		DB445EE918184B7000B306B0 /* Frameworks */ = {
    1.37 +			isa = PBXFrameworksBuildPhase;
    1.38 +			buildActionMask = 2147483647;
    1.39 +			files = (
    1.40 +				DB445EEA18184B7000B306B0 /* Cocoa.framework in Frameworks */,
    1.41 +				DB445EEB18184B7000B306B0 /* CoreAudio.framework in Frameworks */,
    1.42 +				DB445EEC18184B7000B306B0 /* ForceFeedback.framework in Frameworks */,
    1.43 +				DB445EED18184B7000B306B0 /* IOKit.framework in Frameworks */,
    1.44 +				DB445EEE18184B7000B306B0 /* AudioToolbox.framework in Frameworks */,
    1.45 +				DB445EEF18184B7000B306B0 /* CoreFoundation.framework in Frameworks */,
    1.46 +				DB445EF018184B7000B306B0 /* OpenGL.framework in Frameworks */,
    1.47 +				DB445EF118184B7000B306B0 /* AudioUnit.framework in Frameworks */,
    1.48 +				DB445EF218184B7000B306B0 /* Carbon.framework in Frameworks */,
    1.49 +				DB445EF318184B7000B306B0 /* libSDL2.a in Frameworks */,
    1.50 +				DB445EF418184B7000B306B0 /* libSDL_test.a in Frameworks */,
    1.51 +			);
    1.52 +			runOnlyForDeploymentPostprocessing = 0;
    1.53 +		};
    1.54  /* End PBXFrameworksBuildPhase section */
    1.55  
    1.56  /* Begin PBXGroup section */
    1.57 @@ -1974,6 +2007,7 @@
    1.58  		00794E4609D207B4003FC8A1 /* Resources */ = {
    1.59  			isa = PBXGroup;
    1.60  			children = (
    1.61 +				DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */,
    1.62  				DB166ECF16A1D87000A1396C /* shapes */,
    1.63  				00794E5D09D20839003FC8A1 /* icon.bmp */,
    1.64  				00794E5E09D20839003FC8A1 /* moose.dat */,
    1.65 @@ -2008,6 +2042,7 @@
    1.66  				001795B01074222D00F5D044 /* testaudioinfo.c */,
    1.67  				001797711074320D00F5D044 /* testdraw2.c */,
    1.68  				DB0F48D717CA51D2008798C5 /* testdrawchessboard.c */,
    1.69 +				DB445EFA18184BB600B306B0 /* testdropfile.c */,
    1.70  				083E4878006D85357F000001 /* testerror.c */,
    1.71  				002F341709CA1C5B00EBEB88 /* testfile.c */,
    1.72  				DB0F48D817CA51D2008798C5 /* testfilesystem.c */,
    1.73 @@ -2102,6 +2137,7 @@
    1.74  				DB0F48EC17CA51E5008798C5 /* testdrawchessboard */,
    1.75  				DB0F490117CA5212008798C5 /* testfilesystem */,
    1.76  				DB89957E18A19ABA0092407C /* testhotplug */,
    1.77 +				DB445EF818184B7000B306B0 /* testdropfile.app */,
    1.78  			);
    1.79  			name = Products;
    1.80  			sourceTree = "<group>";
    1.81 @@ -2837,7 +2873,7 @@
    1.82  			dependencies = (
    1.83  			);
    1.84  			name = testspriteminimal;
    1.85 -			productName = testsem;
    1.86 +			productName = testspriteminimal;
    1.87  			productReference = DB166E7E16A1D78400A1396C /* testspriteminimal */;
    1.88  			productType = "com.apple.product-type.tool";
    1.89  		};
    1.90 @@ -2854,7 +2890,7 @@
    1.91  			dependencies = (
    1.92  			);
    1.93  			name = teststreaming;
    1.94 -			productName = testsem;
    1.95 +			productName = teststreaming;
    1.96  			productReference = DB166E9116A1D78C00A1396C /* teststreaming */;
    1.97  			productType = "com.apple.product-type.tool";
    1.98  		};
    1.99 @@ -2874,6 +2910,22 @@
   1.100  			productReference = DB89957E18A19ABA0092407C /* testhotplug */;
   1.101  			productType = "com.apple.product-type.tool";
   1.102  		};
   1.103 +		DB445EE618184B7000B306B0 /* testdropfile */ = {
   1.104 +			isa = PBXNativeTarget;
   1.105 +			buildConfigurationList = DB445EF518184B7000B306B0 /* Build configuration list for PBXNativeTarget "testdropfile" */;
   1.106 +			buildPhases = (
   1.107 +				DB445EE718184B7000B306B0 /* Sources */,
   1.108 +				DB445EE918184B7000B306B0 /* Frameworks */,
   1.109 +			);
   1.110 +			buildRules = (
   1.111 +			);
   1.112 +			dependencies = (
   1.113 +			);
   1.114 +			name = testdropfile;
   1.115 +			productName = testdropfile;
   1.116 +			productReference = DB445EF818184B7000B306B0 /* testdropfile.app */;
   1.117 +			productType = "com.apple.product-type.application";
   1.118 +		};
   1.119  /* End PBXNativeTarget section */
   1.120  
   1.121  /* Begin PBXProject section */
   1.122 @@ -2911,6 +2963,7 @@
   1.123  				00179595107421BF00F5D044 /* testaudioinfo */,
   1.124  				00179756107431B300F5D044 /* testdraw2 */,
   1.125  				DB0F48D917CA51E5008798C5 /* testdrawchessboard */,
   1.126 +				DB445EE618184B7000B306B0 /* testdropfile */,
   1.127  				BEC566FB0761D90300A33029 /* testerror */,
   1.128  				002F340109CA1BFF00EBEB88 /* testfile */,
   1.129  				DB0F48EF17CA5212008798C5 /* testfilesystem */,
   1.130 @@ -3361,6 +3414,14 @@
   1.131  			);
   1.132  			runOnlyForDeploymentPostprocessing = 0;
   1.133  		};
   1.134 +		DB445EE718184B7000B306B0 /* Sources */ = {
   1.135 +			isa = PBXSourcesBuildPhase;
   1.136 +			buildActionMask = 2147483647;
   1.137 +			files = (
   1.138 +				DB445EFB18184BB600B306B0 /* testdropfile.c in Sources */,
   1.139 +			);
   1.140 +			runOnlyForDeploymentPostprocessing = 0;
   1.141 +		};
   1.142  /* End PBXSourcesBuildPhase section */
   1.143  
   1.144  /* Begin PBXTargetDependency section */
   1.145 @@ -4262,6 +4323,22 @@
   1.146  			};
   1.147  			name = Release;
   1.148  		};
   1.149 +		DB445EF618184B7000B306B0 /* Debug */ = {
   1.150 +			isa = XCBuildConfiguration;
   1.151 +			buildSettings = {
   1.152 +				INFOPLIST_FILE = "TestDropFile-Info.plist";
   1.153 +				PRODUCT_NAME = testdropfile;
   1.154 +			};
   1.155 +			name = Debug;
   1.156 +		};
   1.157 +		DB445EF718184B7000B306B0 /* Release */ = {
   1.158 +			isa = XCBuildConfiguration;
   1.159 +			buildSettings = {
   1.160 +				INFOPLIST_FILE = "TestDropFile-Info.plist";
   1.161 +				PRODUCT_NAME = testdropfile;
   1.162 +			};
   1.163 +			name = Release;
   1.164 +		};
   1.165  /* End XCBuildConfiguration section */
   1.166  
   1.167  /* Begin XCConfigurationList section */
   1.168 @@ -4688,6 +4765,15 @@
   1.169  			defaultConfigurationIsVisible = 0;
   1.170  			defaultConfigurationName = Debug;
   1.171  		};
   1.172 +		DB445EF518184B7000B306B0 /* Build configuration list for PBXNativeTarget "testdropfile" */ = {
   1.173 +			isa = XCConfigurationList;
   1.174 +			buildConfigurations = (
   1.175 +				DB445EF618184B7000B306B0 /* Debug */,
   1.176 +				DB445EF718184B7000B306B0 /* Release */,
   1.177 +			);
   1.178 +			defaultConfigurationIsVisible = 0;
   1.179 +			defaultConfigurationName = Debug;
   1.180 +		};
   1.181  /* End XCConfigurationList section */
   1.182  	};
   1.183  	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/Xcode/SDLTest/TestDropFile-Info.plist	Tue Feb 04 18:21:39 2014 -0500
     2.3 @@ -0,0 +1,35 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     2.6 +<plist version="1.0">
     2.7 +<dict>
     2.8 +	<key>CFBundleDevelopmentRegion</key>
     2.9 +	<string>English</string>
    2.10 +	<key>CFBundleDocumentTypes</key>
    2.11 +	<array>
    2.12 +		<dict>
    2.13 +			<key>CFBundleTypeRole</key>
    2.14 +			<string>Viewer</string>
    2.15 +			<key>LSHandlerRank</key>
    2.16 +			<string>Alternate</string>
    2.17 +			<key>LSItemContentTypes</key>
    2.18 +			<array>
    2.19 +				<string>public.data</string>
    2.20 +			</array>
    2.21 +		</dict>
    2.22 +	</array>
    2.23 +	<key>CFBundleExecutable</key>
    2.24 +	<string>${EXECUTABLE_NAME}</string>
    2.25 +	<key>CFBundleIdentifier</key>
    2.26 +	<string>org.libsdl.test-dropfile</string>
    2.27 +	<key>CFBundleInfoDictionaryVersion</key>
    2.28 +	<string>6.0</string>
    2.29 +	<key>CFBundlePackageType</key>
    2.30 +	<string>APPL</string>
    2.31 +	<key>CFBundleShortVersionString</key>
    2.32 +	<string>1.0</string>
    2.33 +	<key>CFBundleVersion</key>
    2.34 +	<string>1.0</string>
    2.35 +	<key>LSMinimumSystemVersion</key>
    2.36 +	<string>10.6</string>
    2.37 +</dict>
    2.38 +</plist>
     3.1 --- a/test/testdropfile.c	Tue Feb 04 18:17:16 2014 -0500
     3.2 +++ b/test/testdropfile.c	Tue Feb 04 18:21:39 2014 -0500
     3.3 @@ -44,6 +44,10 @@
     3.4          int consumed;
     3.5  
     3.6          consumed = SDLTest_CommonArg(state, i);
     3.7 +        // needed vodoo to allow app to launch via OS X Finder
     3.8 +        if (SDL_strncmp(argv[i], "-psn", 4)==0) {
     3.9 +            consumed = 1;
    3.10 +        }
    3.11          if (consumed == 0) {
    3.12              consumed = -1;
    3.13          }
    3.14 @@ -64,6 +68,8 @@
    3.15          SDL_RenderPresent(renderer);
    3.16      }
    3.17  
    3.18 +    SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
    3.19 +
    3.20      /* Main render loop */
    3.21      done = 0;
    3.22      while (!done) {