-
Notifications
You must be signed in to change notification settings - Fork 12
Developing on Mac OS X
mogemimi edited this page Jan 26, 2018
·
11 revisions
⚠️ TODO: This is the documentation for older version. These sections needs updating for the latest version of the engine.
- Git
- Python 2.7+
- Mac OS X 10.11+
- Xcode 9.2+ (Apple LLVM version 9.0.0)
git clone https://github.com/mogemimi/pomdog.git
Make sure git is installed. From the root of your engine directory, run:
cd pomdog
git clone https://github.com/mogemimi/pomdog-third-party.git third-party
git clone --depth=1 https://chromium.googlesource.com/external/gyp.git tools/gyp
cd pomdog
cd third-party && git pull origin master && cd ..
cd tools/gyp && git pull origin master && cd ../..
1. Generating the Xcode project file
python tools/gyp/gyp_main.py test/TestApp/TestApp.gyp --depth=. -f xcode --generator-output=build.xcodefiles
You can also use gyp
instead of python tools/gyp/gyp_main.py
:
gyp test/TestApp/TestApp.gyp --depth=. -f xcode --generator-output=build.xcodefiles
For information on how to install gyp, see How to Install GYP on the wiki.
2. Building (Release/Debug)
xcodebuild -project build.xcodefiles/test/TestApp/TestApp.xcodeproj
To build in release mode, use -configuration
option:
xcodebuild -project build.xcodefiles/test/TestApp/TestApp.xcodeproj -configuration Release
3. Running app
open test/TestApp/build/Release/TestApp.app
First, build in release mode:
xcodebuild -project build.xcodefiles/test/TestApp/TestApp.xcodeproj -configuration Release
Second, bundle frameworks with application.
Copy Pomdog.framework
into your application (.app):
cd test/TestApp/build/Release
mkdir TestApp.app/Contents/Frameworks
cp -R Pomdog.framework TestApp.app/Contents/Frameworks
To replace dynamic library path with a new location, use install_name_tool
:
export POMDOG_DYLIB_OLD=@executable_path/../../../Pomdog.framework/Versions/A/Pomdog
export POMDOG_DYLIB_NEW=@executable_path/../Frameworks/Pomdog.framework/Versions/A/Pomdog
export POMDOG_EXECUTABLE=TestApp.app/Contents/MacOS/TestApp
install_name_tool -change $POMDOG_DYLIB_OLD $POMDOG_DYLIB_NEW $POMDOG_EXECUTABLE
Finally, run your application:
open TestApp.app