From cdd2b18d40b403fab2220252a8fadf7efd11d272 Mon Sep 17 00:00:00 2001 From: Martyn Ranyard Date: Thu, 9 Nov 2023 11:25:34 +0100 Subject: [PATCH] This is really too much Signed-off-by: Martyn Ranyard --- tauri-runner/Dockerfile | 11 +++++++++-- tauri-runner/config.toml | 11 +++++++++++ tauri-runner/osxcross_setup.sh | 6 ++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tauri-runner/config.toml create mode 100644 tauri-runner/osxcross_setup.sh diff --git a/tauri-runner/Dockerfile b/tauri-runner/Dockerfile index ff7db22..4e816ae 100644 --- a/tauri-runner/Dockerfile +++ b/tauri-runner/Dockerfile @@ -1,11 +1,18 @@ FROM debian:bullseye-slim RUN apt-get update -RUN apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev nsis lld llvm jq curl wget +# First line is tauri deps, second our templating and icon manipulation ci stuff, third is for apple compile +RUN apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev nsis lld llvm \ + jq curl wget inkscape imagemagick nodejs git \ + clang gcc g++ zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev cmake make tar patch lzma-dev libssl-dev xz-utils bzip2 cpio sed libbz2-dev zlib1g-dev llvm-dev + RUN sh -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh' RUN sh /tmp/rustup.sh -y && sh -c \ '. $HOME/.cargo/env && \ rustup target add x86_64-pc-windows-msvc && \ - cargo install xwin && \ + rustup target add x86_64-apple-darwin && \ + cargo install xwin tauri-cli create-tauri-app && \ xwin --accept-license splat --output ~/.xwin --disable-symlinks' +ADD osxcross_setup.sh /tmp/osxcross_setup.sh +RUN sh /tmp/osxcross_setup.sh ADD config.toml .cargo/config.toml diff --git a/tauri-runner/config.toml b/tauri-runner/config.toml new file mode 100644 index 0000000..09e3393 --- /dev/null +++ b/tauri-runner/config.toml @@ -0,0 +1,11 @@ +[target.x86_64-pc-windows-msvc] +linker = "lld" +rustflags = [ + "-Lnative=/home/username/.xwin/crt/lib/x86_64", + "-Lnative=/home/username/.xwin/sdk/lib/um/x86_64", + "-Lnative=/home/username/.xwin/sdk/lib/ucrt/x86_64" +] + +[target.x86_64-apple-darwin] +linker = "x86_64-apple-darwin14-clang" +ar = "x86_64-apple-darwin14-ar" diff --git a/tauri-runner/osxcross_setup.sh b/tauri-runner/osxcross_setup.sh new file mode 100644 index 0000000..22f97a6 --- /dev/null +++ b/tauri-runner/osxcross_setup.sh @@ -0,0 +1,6 @@ +#/bin/sh +git clone https://github.com/tpoechtrager/osxcross +cd osxcross +wget -nc https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz +mv MacOSX10.10.sdk.tar.xz tarballs/ +UNATTENDED=yes OSX_VERSION_MIN=10.7 ./build.sh