]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed Build-and-run in the Xcode project.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 15 May 2010 06:31:44 +0000 (02:31 -0400)
committerRyan C. Gordon <icculus@icculus.org>
Sat, 15 May 2010 06:31:44 +0000 (02:31 -0400)
Now it copies SDL and the game data to the app bundle in a custom build step,
 so the game can actually work if launched from Xcode.

Thanks to Wolf Mathwig for documenting how to do this.

Xcode/Lugaru.xcodeproj/project.pbxproj

index 72e075410d9697d23e20875393c7859e5c528d83..1d43d19605671f624ebdc1695f8fb6269ca96f1b 100644 (file)
                                8D1107290486CEB800E47090 /* Resources */,
                                8D11072C0486CEB800E47090 /* Sources */,
                                8D11072E0486CEB800E47090 /* Frameworks */,
+                               56F2189C119E7612000FCD52 /* ShellScript */,
                        );
                        buildRules = (
                        );
                };
 /* End PBXResourcesBuildPhase section */
 
+/* Begin PBXShellScriptBuildPhase section */
+               56F2189C119E7612000FCD52 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       comments = "Copy libSDL dylib and the Data folder to build path when building.";
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "#!/bin/sh\nBUILDPATH=build/Debug/Lugaru.app/Contents/MacOS\nLIBPATH=../Dependencies\nDATAPATH=..\ncp -r ${LIBPATH}/SDL12/lib/macosx/libSDL-1.2.0.dylib $BUILDPATH/\ncp -r ${DATAPATH}/Data ${BUILDPATH}/../../\n";
+               };
+/* End PBXShellScriptBuildPhase section */
+
 /* Begin PBXSourcesBuildPhase section */
                8D11072C0486CEB800E47090 /* Sources */ = {
                        isa = PBXSourcesBuildPhase;