Changeset View
Changeset View
Standalone View
Standalone View
contrib/macdeploy/README.md
Show All 11 Lines | |||||
When complete, it will have produced `Bitcoin-ABC.dmg`. | When complete, it will have produced `Bitcoin-ABC.dmg`. | ||||
## SDK Extraction | ## SDK Extraction | ||||
### Step 1: Obtaining `Xcode.app` | ### Step 1: Obtaining `Xcode.app` | ||||
Our current macOS SDK | Our current macOS SDK | ||||
(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be | (`Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`) can be | ||||
extracted from | extracted from | ||||
[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). | [Xcode_12.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip). | ||||
An Apple ID is needed to download this. | An Apple ID is needed to download this. | ||||
After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` | After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` | ||||
archive. This makes the SDK less-trivial to extract on non-macOS machines. One | archive. This makes the SDK less-trivial to extract on non-macOS machines. One | ||||
approach (tested on Debian Buster) is outlined below: | approach (tested on Debian Buster) is outlined below: | ||||
```bash | ```bash | ||||
# Install/clone tools needed for extracting Xcode.app | # Install/clone tools needed for extracting Xcode.app | ||||
apt install cpio | apt install cpio | ||||
# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current | # Unpack Xcode_12.1.xip and place the resulting Xcode.app in your current | ||||
# working directory | # working directory | ||||
python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i | python3 contrib/apple-sdk-tools/extract_xcode.py -f Xcode_12.1.xip | cpio -d -i | ||||
``` | ``` | ||||
On macOS the process is more straightforward: | On macOS the process is more straightforward: | ||||
```bash | ```bash | ||||
xip -x Xcode_11.3.1.xip | xip -x Xcode_12.1.xip | ||||
``` | ``` | ||||
### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` | ### Step 2: Generating `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` | ||||
To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run | To generate `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`, run | ||||
the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the | the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the | ||||
previous stage) as the first argument. | previous stage) as the first argument. | ||||
```bash | ```bash | ||||
# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from | # Generate a Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz from | ||||
# the supplied Xcode.app | # the supplied Xcode.app | ||||
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' | ./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' | ||||
``` | ``` | ||||
## Deterministic macOS DMG Notes | ## Deterministic macOS DMG Notes | ||||
Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple | Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple | ||||
`binutils` (`ld`, `ar`, etc) and DMG authoring tools. | `binutils` (`ld`, `ar`, etc) and DMG authoring tools. | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |