Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Last active December 16, 2015 13:28
Show Gist options
  • Select an option

  • Save zeroeth/5441658 to your computer and use it in GitHub Desktop.

Select an option

Save zeroeth/5441658 to your computer and use it in GitHub Desktop.
Polycode OSX 10.7 build with xcode 4.6.1
#!/bin/bash
# Performs full rebuild of Polycode dependencies and library, debug and release
# prereq:
# brew/port install Cmake
# sudo pip install ply
rm -rf Dependencies/Build
mkdir -p Dependencies/Build
rm -rf Build
mkdir -p Build
rm -rf Standalone/Build
mkdir -p Standalone/Build
rm -rf Release
pushd Dependencies/Build
echo $'\e[36m' # teal
cmake -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -G Xcode ..
echo $'\e[35m' # purple
xcodebuild -project PolycodeDependencies.xcodeproj -target ALL_BUILD -configuration Debug
echo $'\e[34m' # blue
xcodebuild -project PolycodeDependencies.xcodeproj -target ALL_BUILD -configuration Release
popd
pushd Build
echo $'\e[33m' # yellow
cmake -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -G Xcode ..
echo $'\e[32m' # green
xcodebuild -project Polycode.xcodeproj -target install -configuration Debug
echo $'\e[31m' # red
xcodebuild -project Polycode.xcodeproj -target install -configuration Release
popd
pushd Standalone/Build
cmake -G "Unix Makefiles" ..
make install
popd
pushd IDE/Build/Mac\ OS\ X
echo $'\e[1;36m' # cyan
xcodebuild -project Polycode.xcodeproj -target Polycode -configuration Debug
echo $'\e[1;35m' # light purple
xcodebuild -project Polycode.xcodeproj -target Polycode -configuration Release
popd

Status: work in progress

This is my personal compact build guide and log in an attempt to get the Polycode IDE running, since proper information seems to be scattered.

Things I encountered that were confusing

  • PHYSFS_LIBRARY not found during cmake for Polycode == Didn't build a release (archiving) target of Dependencies xcode project
  • Xcode 4.6 terminology: No debug or release targets. Instead it has schemes, which include running (debug) and archiving (release)

Build with IDE

  • Prerequisites
  • Dependencies
  • Core
  • Examples

Prerequisites

cmake and the ply library for python

brew/port install cmake
sudo pip install ply

Dependencies

Starting from the root of the project folder:

mkdir Dependencies/Build
cd Dependencies/Build
cmake -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -G Xcode ..

In Xcode:

  • Open Dependencies/Build/PolycodeDependencies.xcodeproj
  • Select target ALL_BUILD
  • select menu Product > Build for > Running
  • select menu Product > Build for > Archiving

Core

Starting from the root of the project folder:

mkdir Build
cd Build
cmake -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -G Xcode ..

In xcode:

  • Open Build/Polycode.xcodeproj
  • Select target install
  • Select menu Product > Build for > Running
  • Select menu Product > Build for > Archiving

C++ Examples

Open Release/Darwin/Framework/Examples/Darwin/PolycodeExample.xcodeproj, and select an example, build it!

Stand Alone

mkdir Standalone/Build
cd Standalone/Build
cmake -G "Unix Makefiles" ..
make install

IDE

In xcode:

  • Open IDE/Build/Mac OS X/Polycode.xcodeproj
  • Select menu Product > Build for > Running
  • Select menu Product > Build for > Archiving
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment