Difference between revisions of "Compiling ScummVM/iPhone"

Jump to navigation Jump to search
4,059 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 - "www.scummvm.org/frs/" to "downloads.scummvm.org/frs/")
(Removes information now contained in the new docs, and adds a link to the new docs.)
 
Line 1: Line 1:
This page explains how to compile your own version of [[ScummVM]] for [[iOS]] based devices (iPhone/iPad). See also [[Compiling ScummVM/macOS]].  
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. The commands below will create it at the same level as the scummvm directory:
<syntaxhighlight lang="bash">
cd ../../../..
mkdir build
cd build
</syntaxhighlight>
 
Download the [https://downloads.scummvm.org/frs/build/scummvm-ios7-libs-v2.zip iOS libraries package] and extract them in the build directory:
<syntaxhighlight lang="bash">
unzip ~/Downloads/scummvm-ios7-libs-v2.zip
</syntaxhighlight>
 
''Note:'' If you unzipped the libs package by double clicking on it instead of using the command line unzip tool, it may have created an additional directory. In that case you need to move the ''include'' and ''lib'' directories out of this additional directory so that they are directly located in the ''build'' directory you created.
 
Generate Xcode project and open it. Assuming you created the ''build'' folder at the same level as the ''scummvm'' directory, the command would be:
<syntaxhighlight lang="bash">
../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-tts --disable-fribidi
</syntaxhighlight>
 
If you created the ''build'' folder somewhere else (for example inside the ''scummvm'' directory) you will need to adapt the path to scummvm in the command above.
 
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 where initially an iOS simulator, such as ''iPhone 11'', would be selected).
* 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.
* You may need to disable bitcode generation in the build settings. This should already be disabled by default when you make a build specifically for your device, but it is enabled by default when you build for a ''Generic iOS Device''.
 
 
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

Navigation menu