Open main menu

Difference between revisions of "Compiling ScummVM/iPhone"

3,168 bytes removed ,  04:27, 16 January 2021
Removes information now contained in the new docs, and adds a link to the new docs.
m (Text replacement - "</source>" to "</syntaxhighlight>")
(Removes information now contained in the new docs, and adds a link to the new docs.)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page explains how to compile your own version of [[ScummVM]] using the [[iPhone]] or [[iOS7]] backend.
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. This is the recommended way to compile ScummVM, and the only one which makes it possible to run ScummVM on a non-jailbroken iPhone or iPad devices!
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].  
 
== Requirements ==
You will need:
* a macOS computer
* Xcode (you can get it for free from the Mac App Store)
* A developer account. You can create one for free using your Apple ID (the same one used for iCloud or the Mac App Store) on the [https://developer.apple.com/membercenter/ Apple Developer Member Center].
* iOS libraries used by ScummVM. There is a link to a convenient package below in the build instruction.
 
''Note:'' with a free developer account iOS App that you build will only be valid for 7 days and you will thus need to recompile and reinstall them each week.
 
== Creating the Xcode project ==
Clone the ScummVM repository from GitHub to get the source code:
<syntaxhighlight lang="bash">
git clone https://github.com/scummvm/scummvm.git
</syntaxhighlight>
 
Generate the create_project tool:
<syntaxhighlight lang="bash">
cd scummvm/devtools/create_project/xcode
xcodebuild
</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'
 
Create a build directory, extract the [https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip iOS libraries package] and generate the Xcode project
<syntaxhighlight lang="bash">
cd ../../../..
mkdir build
cd build
</syntaxhighlight>
 
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">
unzip ~/Downloads/ScummVM-iOS-libraries.zip
</syntaxhighlight>
 
Generate Xcode project and open it:
<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
</syntaxhighlight>
 
At this point your build directory should contain:
* a generated '''engines''' directory
* a generated '''scummvm.xcodeproj''' project
* an '''include''' directory
* a '''lib''' directory
 
You are now ready to compile ScummVM. First open the project in Xcode:
<syntaxhighlight lang="bash">
open scummvm.xcodeproj
</syntaxhighlight>
''Note:'' you can also double-click on the ''scummvm.xcodeproj'' file in the Finder to open it with Xcode.
 
== Compile and Deploy ==
In Xcode you need to configure the scummvm project:
* Connect your iPhone or iPad to your Mac.
* Select your iOS device (iPhone or iPad) at the top of the window (in the title bar).
* In the project ''General'' settings you need to specify a unique ''Bundle Identifier'' (for example ''org.yourname.scummvm'').
* You need to configure the ``Signing`` settings. Add an account by using your Apple ID if needed and then select it.
 
Then click on the Play button in the top left of the window to start the build. The App will be automatically installed on your device at the end of the build.
 
 
'''TODO:''' Add a bit more details.
 
 
There are some outdated instructions on [http://blog.pmlabs-apps.com/scummvm-on-ios-without-jailbreak/ this blog] that may still be useful as it is illustrated and has more details.
 
= Using the command line =


== 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.


442

edits