From ead72d2435b697f2238eee8ecb488bfd665ea509 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 15 May 2010 02:31:44 -0400 Subject: [PATCH] Fixed Build-and-run in the Xcode project. 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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Xcode/Lugaru.xcodeproj/project.pbxproj b/Xcode/Lugaru.xcodeproj/project.pbxproj index 72e0754..1d43d19 100644 --- a/Xcode/Lugaru.xcodeproj/project.pbxproj +++ b/Xcode/Lugaru.xcodeproj/project.pbxproj @@ -579,6 +579,7 @@ 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, + 56F2189C119E7612000FCD52 /* ShellScript */, ); buildRules = ( ); @@ -621,6 +622,23 @@ }; /* 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; -- 2.39.2