Skip to content

Commit

Permalink
Build: Add rcodesign to naev-macos and naev-release.
Browse files Browse the repository at this point in the history
This is useful for signing macos binaries as well as app bundles. This is required for ARM64 and universal builds to work.
  • Loading branch information
ProjectSynchro committed Jan 10, 2024
1 parent ef19465 commit 1909496
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### v1.9.1
- Update OpenBLAS to v0.3.26 in `naev-windows`.
- Add rcodesign to `naev-macos` and `naev-release`.
- This is useful for signing macos binaries as well as app bundles. This is required for ARM64 and universal builds to work.

### v1.9.0
- `naev-macos`: Update SDK, merge aarch64 and x86_64 images.
Expand Down
7 changes: 7 additions & 0 deletions naev-macos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ RUN UNATTENDED=1 osxcross-macports install -arm64 freetype glpk libsdl2 libsdl2_
UNATTENDED=1 osxcross-macports clear-cache && \
mv /usr/lib/osxcross/macports /usr/lib/osxcross/macports.aarch64

# Download and install rcodesign
RUN curl -L -O https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.26.0/apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz && \
mkdir -p /opt/apple-codesign && \
tar --strip-components=1 -xvzf apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz -C /opt/apple-codesign && \
rm apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz

# Build final container
FROM registry.fedoraproject.org/fedora-minimal:latest

WORKDIR /
COPY --from=build /usr/lib/osxcross /usr/lib/osxcross
COPY --from=build /usr/local/bin/dmg /usr/bin
COPY --from=build /opt/apple-codesign/rcodesign /usr/bin
COPY macports-configure.sh /usr/bin

LABEL org.opencontainers.image.authors "Naev Dev Team"
Expand Down
11 changes: 11 additions & 0 deletions naev-release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ ENV PATH "$PATH:/opt/steamcmd"
# Add Butler to PATH
ENV PATH "$PATH:/opt/butler"

# Add Butler to PATH
ENV PATH "$PATH:/opt/butler"

WORKDIR /tmp
# Install utilities
RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install meson ninja-build gcc python3-pyyaml file git tar xz unzip zip \
Expand All @@ -53,13 +56,21 @@ RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install meson ninja-build
unzip butler.zip -d /opt/butler && \
chmod +x /opt/butler && \
rm butler.zip && \
# Download and install rcodesign
curl -L -O https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.26.0/apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz && \
mkdir -p /opt/apple-codesign && \
tar --strip-components=1 -xvzf apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz -C /opt/apple-codesign && \
rm apple-codesign-0.26.0-x86_64-unknown-linux-musl.tar.gz && \
# Verify tool versions and installation locations.
echo "Verifying steamcmd install" && \
command -v steamcmd && \
steamcmd +quit && \
echo "Verifying butler install" && \
command -v butler && \
butler -V && \
echo "Verifying rcodesign install" && \
command -v rcodesign && \
rcodesign -V && \
echo "Verifying github-assets-uploader install" && \
command -v github-assets-uploader && \
github-assets-uploader -version
Expand Down

0 comments on commit 1909496

Please sign in to comment.