Open main menu

Difference between revisions of "Compiling ScummVM/iPhone"

m
Text replacement - "</source>" to "</syntaxhighlight>"
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Tags: Mobile edit Mobile web edit
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 18: Line 18:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone https://github.com/scummvm/scummvm.git
git clone https://github.com/scummvm/scummvm.git
</source>
</syntaxhighlight>


Generate the create_project tool:
Generate the create_project tool:
Line 24: Line 24:
cd scummvm/devtools/create_project/xcode
cd scummvm/devtools/create_project/xcode
xcodebuild
xcodebuild
</source>
</syntaxhighlight>
''Note:'' you may need to run xcodebuild with sudo the first time ('sudo xcodebuild') if the Xcode command line tools are not yet installed. Command line tools can also be installed from Xcode or using 'sudo xcode-select --install'  
''Note:'' you may need to run xcodebuild with sudo the first time ('sudo xcodebuild') if the Xcode command line tools are not yet installed. Command line tools can also be installed from Xcode or using 'sudo xcode-select --install'  


Line 32: Line 32:
mkdir build
mkdir build
cd build
cd build
</source>
</syntaxhighlight>


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:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
unzip ~/Downloads/ScummVM-iOS-libraries.zip
unzip ~/Downloads/ScummVM-iOS-libraries.zip
</source>
</syntaxhighlight>


Generate Xcode project and open it:
Generate Xcode project and open it:
<syntaxhighlight 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>
</syntaxhighlight>


At this point your build directory should contain:
At this point your build directory should contain:
Line 53: Line 53:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
open scummvm.xcodeproj
open scummvm.xcodeproj
</source>
</syntaxhighlight>
''Note:'' you can also double-click on the ''scummvm.xcodeproj'' file in the Finder to open it with Xcode.
''Note:'' you can also double-click on the ''scummvm.xcodeproj'' file in the Finder to open it with Xcode.


Line 155: Line 155:
tar xjf iPhoneOS8.1.sdk.tbz2
tar xjf iPhoneOS8.1.sdk.tbz2
rm iPhoneOS8.1.sdk.tbz2
rm iPhoneOS8.1.sdk.tbz2
</source>
</syntaxhighlight>


Now, in order to compile ScummVM, execute the following commands:
Now, in order to compile ScummVM, execute the following commands:
Line 164: Line 164:
./configure --host=ios7 --disable-mt32emu --enable-release
./configure --host=ios7 --disable-mt32emu --enable-release
make ios7bundle
make ios7bundle
</source>
</syntaxhighlight>


At the end of the compilation, you'll find a '''ScummVM.app''' application: copy it over SSH, and reboot your device.
At the end of the compilation, you'll find a '''ScummVM.app''' application: copy it over SSH, and reboot your device.
Line 199: Line 199:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
export TARGET=arm-apple-darwin9
export TARGET=arm-apple-darwin9
</source>
</syntaxhighlight>


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


==== Setting up the Environment ====
==== Setting up the Environment ====
Line 212: Line 212:
export CPPFLAGS="-isystem $IOS_TOOLCHAIN_BASE/$TARGET/usr/include"
export CPPFLAGS="-isystem $IOS_TOOLCHAIN_BASE/$TARGET/usr/include"
export LDFLAGS="-L$IOS_TOOLCHAIN_BASE/$TARGET/usr/lib"
export LDFLAGS="-L$IOS_TOOLCHAIN_BASE/$TARGET/usr/lib"
</source>
</syntaxhighlight>
Where ''IOS_TOOLCHAIN_BASE'' contains the directory where you installed the toolchain. And ''TRAGET'' has been setup from the previous step.
Where ''IOS_TOOLCHAIN_BASE'' contains the directory where you installed the toolchain. And ''TRAGET'' has been setup from the previous step.


Line 225: Line 225:
<syntaxhighlight 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>
</syntaxhighlight>
Replace ''ios7'' with ''iphone'' if you want to build the older version of our iOS backend.
Replace ''ios7'' with ''iphone'' if you want to build the older version of our iOS backend.


Line 233: Line 233:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
make iphone
make iphone
</source>
</syntaxhighlight>
If you simply want to test whether changes you made compile but do not plan to use the binary for deployment you can also simply run ''make''.
If you simply want to test whether changes you made compile but do not plan to use the binary for deployment you can also simply run ''make''.


Line 239: Line 239:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
make ios7bundle
make ios7bundle
</source>
</syntaxhighlight>
for the ''ios7'' backend. Or
for the ''ios7'' backend. Or
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
make iphonebundle
make iphonebundle
</source>
</syntaxhighlight>
for the ''iphone'' backend.
for the ''iphone'' backend.


Then simply upload the whole ScummVM.app directory to your device under the /Applications folder, and you're done!
Then simply upload the whole ScummVM.app directory to your device under the /Applications folder, and you're done!
TrustedUser
2,147

edits