diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68b8e3f..29cd942 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -195,6 +195,68 @@ jobs: path: | ${{github.workspace}}/bin/sideloader-macOS-x86_64 + build-macos-arm64: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - uses: dlang-community/setup-dlang@v1 + with: + compiler: ldc-1.33.0 + + - name: Set-up macOS cross-compilation + run: | + mkdir -p $HOME/.ldc/ + curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz + tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME + cat << EOF | tee $HOME/.ldc/ldc2.conf + "arm64-apple-macos": + { + // default switches injected before all explicit command-line switches + switches = [ + "-gcc=clang", + "-linker=lld", + "-Xcc=-target", + "-Xcc=arm64-apple-macos", + "-Xcc=-isysroot", + "-Xcc=$HOME/MacOSX11.0.sdk", + "-defaultlib=phobos2-ldc,druntime-ldc", + ]; + // default switches appended after all explicit command-line switches + post-switches = [ + "-I$HOME/ldc2-1.33.0-osx-arm64/import", + ]; + // default directories to be searched for libraries when linking + lib-dirs = [ + "$HOME/ldc2-1.33.0-osx-arm64/lib", + ]; + }; + EOF + mkdir $HOME/ldc-macos + curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-arm64.tar.xz + tar -xf ./ldc2-1.33.0-osx-arm64.tar.xz -C $HOME + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld + + - name: Write version file + run: echo 'module version_string; enum versionStr = "Sideloader automated build, branch ${{ github.ref_name }}, commit ${{ github.sha }}";' > source/version_string.d + + - name: Build + run: dub build -b release-debug -c cli --compiler=ldc2 --arch arm64-apple-macos + + - name: Rename + run: mv "${{github.workspace}}/bin/sideloader" "${{github.workspace}}/bin/sideloader-macOS-arm64" # TODO make an app bundle + + - uses: actions/upload-artifact@v3 + with: + name: sideloader-macOS-arm64 + path: | + ${{github.workspace}}/bin/sideloader-macOS-arm64 + build-windows-x86_64: runs-on: ubuntu-22.04 diff --git a/README.md b/README.md index 0ca27c0..7f3208c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Sideloader is an application made to install third-party applications on iOS dev You can see it as an open-source replacement of _Cydia Impactor_. Currently only working on Linux (it was the priority since no easy alternatives exists). \ -Windows support is planned (it should not depend on iCloud!). +Windows support is planned (it should not depend on iCloud!). \ +The CLI works too on all systems. I tried to make the code as readable as possible, if you struggle to understand anything I am here to help! @@ -91,11 +92,9 @@ reason. OpenSSL is also required for networking, unfortunately. ### macOS -On Apple Silicon, it does not work at all. +Only the CLI tool is available yet. -On Intel macs, there is only a CLI tool. - -Support is feasible but low-priority as macOS generally has more tools to install and +GUI support is planned but low-priority as macOS already has more tools to install and manage iOS apps. ## Acknowledgements and references diff --git a/cli/frontend.d b/cli/frontend.d index 6cdece1..1685c50 100644 --- a/cli/frontend.d +++ b/cli/frontend.d @@ -62,6 +62,7 @@ shared class CLIFrontend: Frontend { } initializeADI(); + scope app = new Application(appPath); write("Enter your Apple ID: "); stdout.flush(); @@ -94,7 +95,6 @@ shared class CLIFrontend: Frontend { string udid = iDevice.deviceList()[0].udid; log.infoF!"Initiating connection the device (UUID: %s)"(udid); auto device = new iDevice(udid); - scope app = new Application(appPath); sideloadFull(device, appleAccount, app, (progress, action) { log.infoF!"%s (%.2f%%)"(action, progress * 100); }); diff --git a/dub.json b/dub.json index f458ab6..1e4b54d 100644 --- a/dub.json +++ b/dub.json @@ -17,16 +17,16 @@ }, "dynamic-loader": { "repository": "git+https://github.com/Dadoum/dynamicloader.git", - "version": "b62f6f5f1cd5cc71c3ffb3689cd11d4fc80a0556" + "version": "65a8b8b8a6d44d47e63bddc985268592ecf47764" }, "intel-intrinsics": "~>1.11.15", "plist-d": { "repository": "git+https://github.com/Dadoum/libplist-d.git", - "version": "d4b3793d9ff5f64325cd1cedb2ced31b51523ec1" + "version": "30d152e88767611e10048b25777ecb5f9075f87c" }, "provision": { "repository": "git+https://github.com/Dadoum/Provision.git", - "version": "90f5c9df9d987acc795ba5338af50a7f0764034e" + "version": "533dca306b86f9c7801354b78f5187addb58b740" }, "requests": "~>2.1.1", "slf4d": "~>2.4.2" diff --git a/dub.selections.json b/dub.selections.json index 603d639..a8ace5d 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -14,7 +14,7 @@ "dlangui": "0.10.4", "dsfml": "2.1.1", "dxml": "0.4.4", - "dynamic-loader": {"version":"b62f6f5f1cd5cc71c3ffb3689cd11d4fc80a0556","repository":"git+https://github.com/Dadoum/dynamicloader.git"}, + "dynamic-loader": {"version":"65a8b8b8a6d44d47e63bddc985268592ecf47764","repository":"git+https://github.com/Dadoum/dynamicloader.git"}, "glx-d": "1.1.0", "gtk_d": "1.0.3", "icontheme": "1.2.3", @@ -23,8 +23,8 @@ "isfreedesktop": "0.1.1", "memutils": "1.0.9", "plist": "~master", - "plist-d": {"version":"d4b3793d9ff5f64325cd1cedb2ced31b51523ec1","repository":"git+https://github.com/Dadoum/libplist-d.git"}, - "provision": {"version":"90f5c9df9d987acc795ba5338af50a7f0764034e","repository":"git+https://github.com/Dadoum/Provision.git"}, + "plist-d": {"version":"30d152e88767611e10048b25777ecb5f9075f87c","repository":"git+https://github.com/Dadoum/libplist-d.git"}, + "provision": {"version":"533dca306b86f9c7801354b78f5187addb58b740","repository":"git+https://github.com/Dadoum/Provision.git"}, "requests": "2.1.1", "silly": "1.2.0-dev.2", "slf4d": "2.4.3",