From 2e6300cce2697758d639060e98e76c0dc70f4bb3 Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Mon, 20 Feb 2023 18:50:40 -0800 Subject: [PATCH] add changes from attempt #1 --- .github/workflows/beta.yml | 45 ----------------------------- .github/workflows/nightly.yml | 45 ----------------------------- .github/workflows/pr.yml | 45 ----------------------------- .github/workflows/stable.yml | 45 ----------------------------- .gitignore | 2 +- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++ README.md | 16 ++--------- 7 files changed, 57 insertions(+), 195 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 08d47507..88919c15 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -25,45 +25,6 @@ jobs: with: submodules: recursive - # - name: Cache rust cargo - # id: cache-rust-cargo - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-cargo - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust minimuxer - # id: cache-rust-minimuxer - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-minimuxer - # with: - # path: ./Dependencies/minimuxer/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust em_proxy - # id: cache-rust-em_proxy - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-em_proxy - # with: - # path: ./Dependencies/em_proxy/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - name: Install dependencies run: brew install ldid @@ -74,12 +35,6 @@ jobs: override: true target: aarch64-apple-ios - # - name: Create emotional damage - # run: cd Dependencies/em_proxy && cargo build --release --target aarch64-apple-ios - - # - name: Build minimuxer - # run: cd Dependencies/minimuxer && cargo build --release --target aarch64-apple-ios - - name: Add beta suffix to version run: sed -e '/MARKETING_VERSION = .*/s/$/-beta.${{ github.run_number }}/' -i '' Build.xcconfig diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 2f8d62ba..b2fe9fa6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,45 +24,6 @@ jobs: with: submodules: recursive - # - name: Cache rust cargo - # id: cache-rust-cargo - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-cargo - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust minimuxer - # id: cache-rust-minimuxer - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-minimuxer - # with: - # path: ./Dependencies/minimuxer/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust em_proxy - # id: cache-rust-em_proxy - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-em_proxy - # with: - # path: ./Dependencies/em_proxy/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - name: Install dependencies run: brew install ldid @@ -73,12 +34,6 @@ jobs: override: true target: aarch64-apple-ios - # - name: Create emotional damage - # run: cd Dependencies/em_proxy && cargo build --release --target aarch64-apple-ios - - # - name: Build minimuxer - # run: cd Dependencies/minimuxer && cargo build --release --target aarch64-apple-ios - - name: Add nightly suffix to version run: sed -e '/MARKETING_VERSION = .*/s/$/-nightly.${{ github.run_number }}/' -i '' Build.xcconfig diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 74f32311..b06c0a40 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,45 +19,6 @@ jobs: with: submodules: recursive - # - name: Cache rust cargo - # id: cache-rust-cargo - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-cargo - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust minimuxer - # id: cache-rust-minimuxer - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-minimuxer - # with: - # path: ./Dependencies/minimuxer/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust em_proxy - # id: cache-rust-em_proxy - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-em_proxy - # with: - # path: ./Dependencies/em_proxy/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - name: Install dependencies run: brew install ldid @@ -68,12 +29,6 @@ jobs: override: true target: aarch64-apple-ios - # - name: Create emotional damage - # run: cd Dependencies/em_proxy && cargo build --release --target aarch64-apple-ios - - # - name: Build minimuxer - # run: cd Dependencies/minimuxer && cargo build --release --target aarch64-apple-ios - - name: Add PR suffix to version run: sed -e '/MARKETING_VERSION = .*/s/$/-pr.${{ github.event.pull_request.number }}/' -i '' Build.xcconfig diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index a49bfa42..e6d1bb12 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -21,45 +21,6 @@ jobs: with: submodules: recursive - # - name: Cache rust cargo - # id: cache-rust-cargo - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-cargo - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust minimuxer - # id: cache-rust-minimuxer - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-minimuxer - # with: - # path: ./Dependencies/minimuxer/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - # - name: Cache rust em_proxy - # id: cache-rust-em_proxy - # uses: actions/cache@v3 - # env: - # cache-name: cache-rust-em_proxy - # with: - # path: ./Dependencies/em_proxy/target - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - name: Install dependencies run: brew install ldid @@ -70,12 +31,6 @@ jobs: override: true target: aarch64-apple-ios - # - name: Create emotional damage - # run: cd Dependencies/em_proxy && cargo build --release --target aarch64-apple-ios - - # - name: Build minimuxer - # run: cd Dependencies/minimuxer && cargo build --release --target aarch64-apple-ios - - name: Setup Xcode uses: maxim-lobanov/setup-xcode@v1.4.1 with: diff --git a/.gitignore b/.gitignore index 6165c5d4..5292f2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,7 @@ xcuserdata Payload/ SideStore.ipa -Dependencies/.*-prebuilt-fetch* +Dependencies/.*-prebuilt-fetch-* Dependencies/minimuxer/* Dependencies/em_proxy/* !Dependencies/**/.gitkeep diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2b2a58c5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributing to SideStore + +Thank you for your interest in contributing to SideStore! SideStore is a community driven project, and it's made possible by people like you. + +There are many ways to contribute to SideStore, so if you aren't a developer, there are still many other ways you can help out: + +- [Writing documentation](https://github.com/SideStore/SideStore-Docs) +- [Submitting detailed bug reports and suggesting new features](https://github.com/SideStore/SideStore/issues/new/choose) +- Helping out with support + - [Discord](https://discord.gg/RgpFBX3Q3k) + - [GitHub Discussions](https://github.com/SideStore/SideStore/discussions) + +However, this guide will focus on the development side of things. For now, we will only have setup information here, but you can [join our Discord](https://discord.gg/RgpFBX3Q3k) if you need help +after setup. + +## Requirements + +This guide assumes you: + +- are on a Mac +- have Xcode installed +- have basic command line knowledge (know how to run commands, cd into a directory) +- have basic Git knowledge ([GitHub Desktop](https://desktop.github.com) is a great tool for beginners, and greatly simplifies working with Git) +- have basic Swift/iOS development knowledge + +## Setup + +1. Fork the SideStore repo on GitHub. +2. Clone the fork: `git clone https://github.com//SideStore.git --recurse-submodules` + + If you are using GitHub Desktop, refer to + [this guide](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-and-forking-repositories-from-github-desktop). + +3. Copy `CodeSigning.xcconfig.sample` to `CodeSigning.xcconfig` and fill in the values. +4. **(Development only)** Change the value for `ALTDeviceID` in the Info.plist to your device's UDID. Normally, SideServer embeds the device's UDID in SideStore's Info.plist during installation. When + running through Xcode you'll need to set the value yourself or else SideStore won't resign (or even install) apps for the proper device. You can achieve this by changing a few things to be able to + build and use SideStore. +5. Finally, open `AltStore.xcodeproj` in Xcode. + +Next, make and test your changes. Then, commit and push your changes using git and make a pull request. + +## Prebuilt binary information + +minimuxer (and soon em_proxy) uses prebuilt static library binaries built by GitHub Actions to speed up builds and remove the need for Rust to be installed when working on SideStore. +[`Dependencies/fetch-prebuilt.sh`](./Dependencies/fetch-prebuilt.sh) will be run before each build by Xcode, and it will check if the downloaded binaries are up-to-date once every 6 hours. If you want +to force it to check for new binaries, run `bash ./Dependencies/fetch-prebuilt.sh force`. + +## Building an IPA for distribution + +It is recommended to follow the build steps GitHub Actions uses: [`.github/workflows/stable.yml`](./.github/workflows/stable.yml) (in particular, the `Build SideStore`, `Fakesign app` and `Convert to IPA` build steps) + +## Developing minimuxer alongside SideStore + +Please see [minimuxer's README](https://github.com/SideStore/minimuxer) for development instructions. diff --git a/README.md b/README.md index 06da08e6..f2ea9d21 100644 --- a/README.md +++ b/README.md @@ -35,21 +35,9 @@ SideStore is a just regular, sandboxed iOS application. The AltStore app target We're hoping to eventually eliminate our dependency on it, as it increases the amount of unnecessary Objective-C in the project. -## Compilation Instructions -SideStore is fairly straightforward to compile and run if you're already an iOS or macOS developer. Here are some basic instructions to get you started: +## Contributing/Compilation Instructions -1. Clone the repository - ``` - git clone https://github.com/SideStore/SideStore.git --recurse-submodules - ``` -2. After installing Rustup, run `rustup target add aarch64-apple-ios` -12. Within the Dependencies/em_proxy and Dependencies/minimuxer directories, run `cargo build --release --target aarch64-apple-ios` -2. Open `AltStore.xcodeproj` and select the AltStore project in the project navigator. On the `Signing & Capabilities` tab, change the team from to your own account. -3. **(Development only)** Change the value for `ALTDeviceID` in the Info.plist to your device's UDID. Normally, SideServer embeds the device's UDID in SideStore's Info.plist during installation. When running through Xcode you'll need to set the value yourself or else SideStore won't resign (or even install) apps for the proper device. You can achieve this by changing a few things to be able to build and use SideStore. -5. Copy `CodeSigning.xcconfig.sample` to `CodeSigning.xcconfig` -6. Fill out all of the properties in `CodeSigning.xcconfig` to match your account. -7. In `Shared/Extensions/Bundle+AltStore.swift`, replace "group.com.rileytestut.AltStore" with your own App Group ID. -8. Build + run app! 🎉 +Please see [CONTRIBUTING.md](./CONTRIBUTING.md) ## Licensing