This commit assumes that the architecture on which we build
create_project is also the one we will target for the ScummVM
build. This should be the case in most cases.
The iOS simulator x86_64 target doesn't support NEON and since there
is no way to have different preprocessor macros for different archs,
then enable SCUMMVM_NEON only for all non-simulator iOS/tvOS targets.
The IPHONE and IPHONE_IOS7 definitions are already set for all iOS
targets in create_project. The simulator targets were adding them
once again. Remove the duplicates.
Regarding the `configure` script, we now have:
* default: add `-Werror=flag-name` for selected warnings where it's
important to fail early (just `-Werror=return-type` for now)
* --enable-Werror: use `-Werror` for all warnings
* --disable-Werror: don't any `-Werror` flag
For Xcode, `-Werror=return-type` is added to default flags.
For MSVC, equivalent flags have been added to the existing
`globalErrors` list.
Suggested by sluicebox.
Apple will require a valid privacy manifest file bundled for
applications uploaded to App Store Connect.
The privacy manifest describes the privacy practices of an app,
describing the reasons of use of some core APIs that can be
misused to try to identify the device or user, also known as
fingerprinting.
Read more about which APIs that require a privacy manifest here:
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
Add such manifest to ios7 and tvos ports and make sure they are
bundled with the app.
Add the definition of SCUMMVM_NEON in create_project for the iOS
and tvOS targets. Do not add the same definition to corresponding
simulators since they can run on x86_64 hosts, which for obvious
reasons lacks support for NEON.
The GRIM define was incorrectly spelled GRIME which cause no shader
files to be included to the project preventing the game to start.
The freescape shader file freescape_triange.vertex also contained
a spelling error preventing the game to start.
Delete the old graphic handling in the IOS7 backend which is not
used anymore after implementing iOSGraphicsManager.
The Accelerate framework is not used anymore. The OpenGLGraphics
manager handles the different color formats.
The ios7 backend implements the graphic handling in the backend code.
iOS supports OpenGL through the OpenGL Framework since iOS 2.0. It's
marked as deprecated but is still shipped with the SDKs for iPhoneOS
and tvOS and will hopefully be so for some time.
The ios7 backend can therefore utilize the OpenGLGraphicsManager to
handle all graphics.
Implement an iOSGraphicsManager class that can be used in the ios7
backend. The iOSGraphicsManager will require some callback functions
in the ios7 backend. createOpenGLContext() will be called to ask the
backend to create an OpenGL context in which the graphic manager can
draw. The function returns the ID of the renderbuffer which shall be
used when creating the framebuffer object this differ iOS from other
platforms). A custom RenderBufferTarget class is added to address
this.
destroyOpenGLContext() will be called to make sure that the old GLES
context is not reused. notifyContextDestroy() does call the function
OpenGLContext.reset() but that will not destroy the context.
refreshScreen() will be called to ask the backend to present the
drawn graphics on the screen. getSystemHiDPIScreenFactor() is called
to get the screen scaling factor. getScreenWidth() and
getScreenHeight() are called to get the width and height of the
surface to draw on.
This commit adds the class but the ios7 backend doesn't make use of
it quite yet. To use it require the ios7 to be a child class of the
ModularGraphicsBackend. That change requires a lot of changes which
will be targeted in separate commits.
Update docportal and github ci worker to only disable the feature
opengl_classic_game since opengl and opengl_shaders are required to
compile the OpenGLGraphicsManager.
Apple never required bitcode to be enabled and with Xcode 14
bitcode is deprecated.
Set bitcode to disabled for iOS and tvOS projects. Else it will
be default on and give a build error due to the libraries in
scummvm-ios7-libs-v3 doesn't include bitcode.
The introduction of Apple M1 processor, which is based on the arm64
architecture, makes it impossible to use fat static libraries for iOS
and tvOS since building libraries for the simulators targeting the
arm64 architecture conflicts with the iOS and tvOS native arm64
libraries. It's not possible to have two arm64 libraries targeting
different platforms in the same fat library.
Apple resolves this problem with XCFrameworks. Each XCFramework
contain an Info.plist specifying which platforms and architectures it
targets.
The new iOS and tvOS library package, scummvm-ios7-libs-v3, utilize
the XCFramework format and includes pre-compiled libraries for both
iOS and tvOS with corresponding simulator.
Add the option to use XCFramework in create_project by passing the
switch '--use-xcframework'
Implement support to use XCFrameworks for iOS, tvOS and macOS. If not
passing '--use-xcframework' to create_project, legacy behaviour is
applied.
This commit also add support for mikmod for tvOS.