Open main menu

Difference between revisions of "Compiling ScummVM/iPhone"

m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Fix one too many bracket)
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Tags: Mobile edit Mobile web edit
Line 16: Line 16:
== Creating the Xcode project ==
== Creating the Xcode project ==
Clone the ScummVM repository from GitHub to get the source code:
Clone the ScummVM repository from GitHub to get the source code:
<source lang="bash">
<syntaxhighlight lang="bash">
git clone https://github.com/scummvm/scummvm.git
git clone https://github.com/scummvm/scummvm.git
</source>
</source>


Generate the create_project tool:
Generate the create_project tool:
<source lang="bash">
<syntaxhighlight lang="bash">
cd scummvm/devtools/create_project/xcode
cd scummvm/devtools/create_project/xcode
xcodebuild
xcodebuild
Line 28: Line 28:


Create a build directory, extract the [https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip iOS libraries package] and generate the Xcode project
Create a build directory, extract the [https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip iOS libraries package] and generate the Xcode project
<source lang="bash">
<syntaxhighlight lang="bash">
cd ../../../..
cd ../../../..
mkdir build
mkdir build
Line 35: Line 35:


Download the [https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip iOS libraries package] and extract them in the build directory:
Download the [https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip iOS libraries package] and extract them in the build directory:
<source lang="bash">
<syntaxhighlight lang="bash">
unzip ~/Downloads/ScummVM-iOS-libraries.zip
unzip ~/Downloads/ScummVM-iOS-libraries.zip
</source>
</source>


Generate Xcode project and open it:
Generate Xcode project and open it:
<source lang="bash">
<syntaxhighlight lang="bash">
../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-bink --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-libcurl --disable-sdlnet
../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-bink --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-libcurl --disable-sdlnet
</source>
</source>
Line 51: Line 51:


You are now ready to compile ScummVM. First open the project in Xcode:
You are now ready to compile ScummVM. First open the project in Xcode:
<source lang="bash">
<syntaxhighlight lang="bash">
open scummvm.xcodeproj
open scummvm.xcodeproj
</source>
</source>
Line 76: Line 76:


Here is a script to download, and compile all the required tools. This script has been wrote for Debian 8.2, and should be run as root.
Here is a script to download, and compile all the required tools. This script has been wrote for Debian 8.2, and should be run as root.
<source lang="bash">
<syntaxhighlight lang="bash">
#!/bin/bash
#!/bin/bash


Line 158: Line 158:


Now, in order to compile ScummVM, execute the following commands:
Now, in order to compile ScummVM, execute the following commands:
<source lang="bash">
<syntaxhighlight lang="bash">
export SDKROOT=/usr/share/ios-sdk/iPhoneOS8.1.sdk
export SDKROOT=/usr/share/ios-sdk/iPhoneOS8.1.sdk
export CC=ios-clang
export CC=ios-clang
Line 197: Line 197:


* For ''iphone'' use:
* For ''iphone'' use:
<source lang="bash">
<syntaxhighlight lang="bash">
export TARGET=arm-apple-darwin9
export TARGET=arm-apple-darwin9
</source>
</source>


* For ''ios7'' use:
* For ''ios7'' use:
<source lang="bash">
<syntaxhighlight lang="bash">
export TARGET=arm-apple-darwin11
export TARGET=arm-apple-darwin11
</source>
</source>
Line 208: Line 208:
==== Setting up the Environment ====
==== Setting up the Environment ====


<source lang="bash">
<syntaxhighlight lang="bash">
export PATH="$IOS_TOOLCHAIN_BASE/bin:$IOS_TOOLCHAIN_BASE/$TARGET/bin:$IOS_TOOLCHAIN_BASE/$TARGET/usr/bin:$PATH"
export PATH="$IOS_TOOLCHAIN_BASE/bin:$IOS_TOOLCHAIN_BASE/$TARGET/bin:$IOS_TOOLCHAIN_BASE/$TARGET/usr/bin:$PATH"
export CPPFLAGS="-isystem $IOS_TOOLCHAIN_BASE/$TARGET/usr/include"
export CPPFLAGS="-isystem $IOS_TOOLCHAIN_BASE/$TARGET/usr/include"
Line 223: Line 223:
First, navigate to a path where you want your build files to be located (this can be the ScummVM root directory but does not have to be).
First, navigate to a path where you want your build files to be located (this can be the ScummVM root directory but does not have to be).
Then run the following:
Then run the following:
<source lang="bash">
<syntaxhighlight lang="bash">
./path/to/scummvm/configure --host=ios7 --with-staticlib-prefix=$IOS_TOOLCHAIN_BASE/$TARGET/usr
./path/to/scummvm/configure --host=ios7 --with-staticlib-prefix=$IOS_TOOLCHAIN_BASE/$TARGET/usr
</source>
</source>
Line 231: Line 231:


You can compile ScummVM with running make:
You can compile ScummVM with running make:
<source lang="bash">
<syntaxhighlight lang="bash">
make iphone
make iphone
</source>
</source>
Line 237: Line 237:


Please note that if you want to deploy ScummVM on your iOS device you will need to generate a bundle file. For this run either:
Please note that if you want to deploy ScummVM on your iOS device you will need to generate a bundle file. For this run either:
<source lang="bash">
<syntaxhighlight lang="bash">
make ios7bundle
make ios7bundle
</source>
</source>
for the ''ios7'' backend. Or
for the ''ios7'' backend. Or
<source lang="bash">
<syntaxhighlight lang="bash">
make iphonebundle
make iphonebundle
</source>
</source>
TrustedUser
2,147

edits