...
Third-party Libraries
Ice Touch depends on mcpp 2.7.2 (with patches). Binary and source distributions of mcpp are available on our our download page.
Xcode Plug-in
Our Our Xcode Plug-in is is required for building the Cocoa and iPhone sample projects included in this distribution. We strongly recommended that you develop Ice for C++ and Ice Touch applications with Xcode, as it greatly simplifies the build process.
Ztop |
---|
Compiling and Testing Ice Touch
Unpack the Ice Touch source archive. The source files are contained in the the IceTouch-1.3.13
subdirectory.
Building the Slice Compilers
The mandatory first step is to build the Slice-to-C++ and Slice-to-Objective-C compilers (slice2cpp
and and slice2objc
, respectively).
Change the working directory to to IceTouch-1.3.13/cpp
:
$ cd IceTouch-1.3.13/cpp
Set Set MCPP_HOME
to to point to the installation directory of your MCPP binaries, for example:
$ export MCPP_HOME=$HOME/IceTouch-1.3.13-ThirdParty
Set Set OPTIMIZE_SPEED SPEED
to yes
to yes
to create an optimized build:
...
You can build a C++ SDK for each of three different targets: Cocoa, iPhone, and iPhone Simulator. Change to the the IceTouch-1.3.13/cpp
directory directory and run one of the following commands to build an SDK:
$ cd IceTouch-1.3.13/cpp
$ make COMPILE_FOR_COCOA=yes
or$ make COMPILE_FOR_IPHONE=yes
or$ make COMPILE_FOR_IPHONE_SIMULATOR=yes
This will build static libraries and a test suite for the specified target. The build configuration options can be found in config/Make.rules
.
Tip |
---|
When building for iPhone in debug mode, make will by default build only |
...
for |
...
Ice Touch supports |
Info |
---|
OS X and iOS provide two C++ run time libraries, the older The Ice Touch build system targets iOS 5.1.1 and OS X 10.7, and as a result creates libraries linked with The resulting libraries will carry a These |
If you built for iPhone or the iPhone simulator, you should now should now use Xcode to build the demos and test suite GUI located in the following the following subdirectories:
demo/iPhone/hello
test/iPhone/container
After a successful build, you can run the test suite. For For a Cocoa build, run:
$ python allTests.py
If everything works, you should see lots of "ok" messages. In case of a failure, the tests abort with "failed".
For the iPhone or iPhone simulator, the test suite runs within an iPhone application named "Test Suite". You can run it from the Xcode project located in the the cpp/test/iPhone/container
directory directory. Note that the C++ tests must be run from Xcode; they won't run if you launch the Test Suite application from the device directly.
Info |
---|
The container project has two targets:
|
The architecture used to build the "Test Suite" application or the hello demo is specified with the "Architectures" build setting in the Xcode project. It must match the architecture used to build Ice Touch.
To build for a different target, you first need to clean the current build using the clean
command command. For example, if you built for Cocoa, run
$ make COMPILEmake COMPILE_FOR_COCOA=yes cleanyes clean
You can now start a new build for the desired target.
...
You can build an Objective-C SDK for each of four different targets: OS X (command line), Cocoa, iPhone, and iPhone Simulator. Change to the IceTouch-1.3.13/objc
directory and run one of the following commands to build an SDK:
$ cd IceTouch-1.3.13/objc
$ make
or$ make COMPILE_FOR_COCOA=yes
or$ make COMPILE_FOR_IPHONE=yes
or$ make COMPILE_FOR_IPHONE_SIMULATOR=yes
The first first make
command command (without any arguments) builds the OS X SDK with dynamic libraries, the test suite, and the demos. The remaining make
commands commands generate static libraries and build the test suite. The build configuration options can be found in config/Make.rules
.
Tip |
---|
When building for iPhone in debug mode, make will by default build only for
Ice Touch supports |
Info |
---|
The Ice Touch Objective-C SDK relies on C++ code. OS X and iOS provide two C++ run time libraries, the older The Ice Touch build system targets iOS 5.1.1 and OS X 10.7, and as a result creates libraries linked with
The resulting libraries will carry a |
If you built for Cocoa, you should now use Xcode to build the demos located in the following subdirectories:
demo/Cocoa/chat
demo/Cocoa/library
If you are building for iPhone or the iPhone simulator, you should now use Xcode to build the demos and test suite GUI located in the following subdirectories:
demo/iPhone/chat
demo/iPhone/library
demo/iPhone/hello
demo/iPhone/router
demo/iPhone/voip
test/iPhone/container
To compile the demos, you can also open the Xcode workspace IceTouch-1.3.13/demos.xcworkspace
. The workspace includes the Cocoa and iPhone demo projects.
Tip |
---|
Make sure you build the appropriate SDK before opening the corresponding demo or test projects in Xcode. |
If you build Ice Touch in debug mode (the default), you must ensure that the architecture used to build the tests and demos is the same architecture as the one used to build Ice Touch. To build Ice Touch with a specific architecture, you can set ARCHFLAGS in config/Make.rules
or on the make command line:
$ make COMPILE_FOR_IPHONE=yes ARCHFLAGS="-arch arm64
"
Available architectures are armv7
, armv7s
and arm64
. The architecture used to build the tests or demos is specified with the "Architectures" build setting in the Xcode project. It must match the architecture used to build Ice Touch.
After a successful build, you can run the test suite. For For an OS X or Cocoa build, run:
$ python allTests.py
If everything works, you should see lots of "ok" messages. In case of a failure, the tests abort with "failed".
For the iPhone or iPhone simulator, the test suite runs within an iPhone application named "Test Suite". You can run it from the Xcode project located in the the test/iPhone/container
directory directory.
Ztop |
---|
Installing Ice Touch
For the OS X build, simply run run make install
to install Ice Touch in the directories specified by the the prefix
variables in cpp/config/Make.rules
and and objc/config/Make.rules
.
For OS X builds of Ice Touch, the install name of each shared library is prefixed with with @rpath
. Link your executables with -Wl,-rpath,/Library/Developer/IceTouch-1.3/lib
to allow the dynamic linker to locate the libraries in the Ice Touch installation directory.
If you choose not to embed a runpath into executables at build time, you will need to add the the /Library/Developer/IceTouch-1.3/lib
directory to your your DYLD_LIBRARY_PATH
.
Ztop |
---|