TrustedUser, Bureaucrats, Administrators
442
edits
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=") Tags: Mobile edit Mobile web edit |
(Removes information now contained in the new docs, and adds a link to the new docs.) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This page explains how to compile your own version of [[ScummVM]] | This page explains how to compile your own version of [[ScummVM]] for [[iOS]] based devices (iPhone/iPad). See also [[Compiling ScummVM/macOS]]. | ||
= Using Xcode = | == Using Xcode == | ||
You can compile ScummVM with the official tools from Apple. | You can compile ScummVM with the official tools from Apple. For more information, see the [https://docs.scummvm.org/en/latest/other_platforms/ios.html iOS page] in the [https://docs.scummvm.org/ user documentation]. | ||
== Using the command line == | |||
For jailbroken devices, it is also possible to compile the project from command line. You'll need a working toolchain, and some tools, like '''ldid''', to fake the code signature. | For jailbroken devices, it is also possible to compile the project from command line. You'll need a working toolchain, and some tools, like '''ldid''', to fake the code signature. | ||
Line 155: | Line 88: | ||
tar xjf iPhoneOS8.1.sdk.tbz2 | tar xjf iPhoneOS8.1.sdk.tbz2 | ||
rm iPhoneOS8.1.sdk.tbz2 | rm iPhoneOS8.1.sdk.tbz2 | ||
</ | </syntaxhighlight> | ||
Now, in order to compile ScummVM, execute the following commands: | Now, in order to compile ScummVM, execute the following commands: | ||
Line 164: | Line 97: | ||
./configure --host=ios7 --disable-mt32emu --enable-release | ./configure --host=ios7 --disable-mt32emu --enable-release | ||
make ios7bundle | make ios7bundle | ||
</ | </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 132: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
export TARGET=arm-apple-darwin9 | export TARGET=arm-apple-darwin9 | ||
</ | </syntaxhighlight> | ||
* For ''ios7'' use: | * For ''ios7'' use: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
export TARGET=arm-apple-darwin11 | export TARGET=arm-apple-darwin11 | ||
</ | </syntaxhighlight> | ||
==== Setting up the Environment ==== | ==== Setting up the Environment ==== | ||
Line 212: | Line 145: | ||
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" | ||
</ | </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 158: | ||
<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 | ||
</ | </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 166: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
make iphone | make iphone | ||
</ | </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 172: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
make ios7bundle | make ios7bundle | ||
</ | </syntaxhighlight> | ||
for the ''ios7'' backend. Or | for the ''ios7'' backend. Or | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
make iphonebundle | make iphonebundle | ||
</ | </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! |