When releasing libzim and libkiwix, we use config native_mixed with is a
mix of static and dynamic linking:
- Dependencies are build as static libraries.
- Released projects (libzim/libkiwix) are build as dynamic libraries,
statically linked to dependencies.
This way, we have only one `.so` file which contain all our needed symbols.
However, this logic is "local" to each project.
This mean that libkiwix is linked **statically** to libzim.
So libkiwix.so is containing libzim symbols.
But on "java-libkiwix", we are both linking to libzim.so and libkiwix.so.
If the version of the (dynamically) used libzim.so is not the same that the
version on which we have (statically) linked libkiwix.so, we end with
symbols of two different versions being loaded and conflicting.
So let's rebuild libkiwix with last version of libzim to avoid this conflict.
This reverts commit 05fc3b409c.
This was a temporary commit to make the PR compile with a dev branch of libzim.
Now PR on libzim is merged. We must remove this commit.
- Archive already existing must not stop download of other archives.
- Use copytree instead of rename to use second archive as patch on existing
directory. (No need to remove tmpdir, as it is a temporary directory)
Job `Trigger_Docker` is run in a simple environment not configured.
So tools as `ninja` are not installed. But we don't care as we just want
to trigger a docker build.
But `common` script now start by asking kiwix-build the build dir.
kiwix-build must not fail in this case.
The target_platform option has always be wrongly named.
This is not the platform we are targeted but how we compile.
This was ok at beginning as specifying how we compile somehow define
for what we compile but this is not a one to one mapping.
When we introduced CoreKiwix.xcframework, we made two mistakes:
- We forgot that some devs are on Apple Silicon and did not include arm64 arch for simulator
- We kept the `x86_64-apple-ios` target thinking simulator is a “just” an iOS on x64
This target mistake prevented XCode from finding our lib usable with the Simulator on x64.
Not including an arm64 version obviously prevented Silicon-using devs from using the Simulator.
The included libs changes now from
| Name | Content |
| ---------------------------- | ----------------------------------------------------- |
| `ios-arm64` | All iOS devices are arm64 |
| `ios-x86_64-simulator` | Single x64 binary for Simulator |
| `macos-arm64_x86_64` | Fat binary for macOS with both x64 and arm64 |
To
| Name | Content |
| ---------------------------- | ----------------------------------------------------- |
| `ios-arm64` | All iOS devices are arm64 |
| `ios-arm64_x86_64-simulator` | Fsat binary for iOS Simulator with both x64 and arm64 |
| `macos-arm64_x86_64` | Fat binary for macOS with both x64 and arm64 |
- `iOSx64` Platforn renamed to `iOSx64Simulator` with its target fixed to `x86-apple-ios-simulator` (was `x86_64-apple-ios`)
- Added platformn `iOSArm64Simulator` for Apple Silicon devs to run Simulator
- `AppleXCFramework` dependency gets two changes:
- Depends on all those platforms
- `_make_macos_fat()` turned generic and called both for macOS fat binary and iOS Simulator one