Relinking the LGPL libraries
Bu içerik henüz dilinizde mevcut değil.
The Ren'Py engine inside Ren'Go links FFmpeg and fribidi under the LGPL 2.1. This page tells you how to replace them with your own build and make a new Ren'Go app from it. It is the rebuild instruction that the written offer in the app's Acknowledgements screen refers to.
Written offer
Section titled “Written offer”On request, Ren'Go provides the materials needed to relink the work that links FFmpeg and fribidi against a different version of those libraries. The materials are:
- The object files of the engine frameworks
RenGoEngine7andRenGoEngine8, or the unsigned frameworksRenGoEngine7.frameworkandRenGoEngine8.frameworktogether with the object files of the app that loads them. - The build scripts and the entry source needed to relink:
scripts/ios/fetch_ios_deps.sh,scripts/ios/generate_app.sh, the scripts thatgenerate_app.shcalls,scripts/ios/project.ymlandios/engine/rengo_engine_entry.c. - The exact FFmpeg and fribidi versions that each engine framework links, and their source. The libraries come from the Ren'Py iOS packages listed below. Both engine frameworks (8.5.3 and 7.8.7) link FFmpeg 4.3.1 (source: https://ffmpeg.org/download.html, tarball
ffmpeg-4.3.1.tar.gz) and fribidi 1.0.7 (source: https://github.com/fribidi/fribidi/releases, tarballfribidi-1.0.7.tar.bz2). For the licence texts, see the licences page.
The offer is valid for three years. Send the request to the contact address in the app's Acknowledgements screen: rengo@celikyunusemre.dev. The steps below refer to the materials delivered with the offer, not to any public repository.
What links what
Section titled “What links what”Ren'Go embeds two Ren'Py engines. Each engine is one framework that links its own static libraries (.a archives) and exports only its entry symbols (rengo_engine<N>_start, _lifecycle, _uiwindow and _mouse, where <N> is 7 or 8). The linker hides every other symbol, so a replaced library takes effect only when you rebuild the framework.
| Engine | Ren'Py package | Python | Framework |
|---|---|---|---|
| 8.5.3 | renpy-8.5.3-renios |
3.12 | RenGoEngine8 |
| 7.8.7 | renpy-7.8.7-renios |
2.7 | RenGoEngine7 |
The static libraries come from Ren'Py's public iOS builds. scripts/ios/fetch_ios_deps.sh downloads them from https://www.renpy.org/dl/<version>/renpy-<version>-renios.zip and checks the SHA-256 of each file:
renpy-8.5.3-renios.zip:c4fae153e8276ed0faed5e84ea3e0b7c4bf337f0e3208e9130c6a41748a83b2brenpy-7.8.7-renios.zip:faaabec4ec65efa8803a5a7222f6e40183c5fe8354c1ee4eeb78e978826cee86
The LGPL libraries in each package are:
- FFmpeg:
libavcodec.a,libavformat.a,libavfilter.a,libavresample.a,libswscale.a,libswresample.a,libavutil.a - fribidi:
libfribidi.a
The paths below are paths inside the materials delivered with the offer. Put them in one folder and run the commands from that folder.
-
Run
bash scripts/ios/fetch_ios_deps.sh. It puts each package undervendor/renios-<version>/. -
Run
bash scripts/ios/generate_app.sh. It unpacks the packages and writes the Xcode project tobuild/xcode/RenGo/. The libraries for each engine are inprebuilt7/release/andprebuilt8/release/(device) and inprebuilt7/debug/andprebuilt8/debug/(simulator) in that folder. -
Build your replacement for iOS arm64 from the library source, with the same version and the same configuration as the package. Replace the archive in
prebuilt<N>/release/, for examplelibavcodec.aorlibfribidi.a. Do not rungenerate_app.shagain, because it restores the original archives. -
Rebuild the project with
scripts/ios/project.ymlas the specification. TheRenGoEngine<N>target links the archives with-lavcodecand-lfribidiamong others, and compilesios/engine/rengo_engine_entry.c(the project copies it toRenGoEngineSources/). Run frombuild/xcode/RenGo/:xcodebuild -project RenGo.xcodeproj -scheme RenGo -configuration Release -destination 'generic/platform=iOS' -derivedDataPath dd buildIf you received the object files and the unsigned frameworks instead of the full folder, link your replacement archives with the object files of
RenGoEngine<N>to make a new framework, and put the new framework into the app in place of the old one. -
Sign the app with your own certificate and provisioning profile, then install it on your device. Xcode does this when you set your team in the signing settings of every target. Apple's rules allow a modified app to run only on devices that your own profile covers.
Limits
Section titled “Limits”- The replacement must be binary compatible with the original: the same library version, the same public symbols and the same configure options. FFmpeg must keep the codecs that Ren'Py uses.
- The 7.8.7 and 8.5.3 packages link different library builds. Replace the archive in the folder of the engine that you want to change.