-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Use scummvm-ios7-libs-v3 #4856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use scummvm-ios7-libs-v3 #4856
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to create_project break the macOS build. So this needs to be fixed.
At this point I have no plan to switch to xcframeworks for macOS as the main way for developers to get their libs is through homebrew or macports. Also for the i386 and x86_64 targets I use old Xcode versions that contain the SDKs I target, and those do not support xcframeworks. So for macOS it still needs to use the static libraries.
I think that it could actually be a good idea for iOS to have a switch in create_project (for example --use-ios-static-libs so that those with older Xcode versions can still use the v2 package.
Another change that will be needed is to update the configure/make way to build scummvm so that it works with the xcframework when building for ios. From what I can see it should work with the new v3 package, but would need to add <libname>.xcframeworks/ios-arm64-armv7-armv7s/Headers/to the header path and <libname>.xcframeworks/ios-arm64-armv7-armv7s/ to the link path.
Actually, maybe the --use-ios-static-libs in create_project could also use the v3 package in the same way so that even old Xcode version can use the updated package?
|
I forgot to confirm that the change work well for me for iOS development on a M1 mac (both simulator and real device). |
fa933be to
f89d856
Compare
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.
This updates the instructions for building the ios7 and tvos backends using scummvm-ios7-libs-v3, utilizing the Apple XCFramework format for the pre-compiled libraries. Using scummvm-ios7-libs-v3 also enables use of the following features: - faad - gif - mikmod - mpeg2 - theoradec - vpx
c83ff3e to
6cbf7d0
Compare
Update ios7 runner to fetch the scummvm-ios-libs-v3 package which includes precompiled libraries for iOS and tvOS as XCFrameworks.
6cbf7d0 to
a514548
Compare
|
@criezy Updated according to comments. Ready to merge if everything looks ok! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only made a minor suggestion for the documentation, but it otherwise looks good now.
| mkdir build | ||
| Copy the contents of the ``scummvm-ios7-libs-v2`` folder you extracted earlier into the ``build`` directory, using either the Finder, or the command line as follows: | ||
| Move the contents of the ``scummvm-ios7-libs-v3`` folder you extracted earlier into the ``build`` directory, using either the Finder, or the command line as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Move the contents of the ``scummvm-ios7-libs-v3`` folder you extracted earlier into the ``build`` directory, using either the Finder, or the command line as follows: | |
| Move the ``frameworks`` folder you extracted earlier from the ``scummvm-ios7-libs-v3.zip`` file into the ``build`` directory, using either the Finder, or the command line as follows: |
The scummvm-ios7-libs-v3 packages the pre-built static libraries into xcframeworks, allowing to have arm64 libraries for both iPhoneOS and iPhoneSimulator.
The new scummvm-ios7-libs-v3 contains some new libraries compared to the v2-libs:
Update the instructions using the scummvm-ios7-libs-v3.
The scummvm-ios7-libs-v3 can be downloaded at https://github.com/larsamannen/scummvm-ios7-libs-v3/blob/main/scummvm-ios7-libs-v3.zip