From 7a48bd05c52c505df094d730adc08ca31c66ac6f Mon Sep 17 00:00:00 2001 From: Justin Timperio Date: Tue, 31 Dec 2024 04:34:04 -0800 Subject: [PATCH 1/4] Fix Mac Build --- .github/workflows/release.yml | 19 ++++++++++++++++++- README.md | 11 ++++++----- server/server.go | 1 + 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1240a35..ae2ad90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,17 +19,32 @@ jobs: - name: Build run: | + ## Install Dependencies sudo apt update -y - sudo apt install -y docker golang git + sudo apt install -y docker golang git zip gzip tar go install github.com/fyne-io/fyne-cross@latest + ## Check out the macos SDK from git + git clone -n --depth=1 --filter=tree:0 https://github.com/alexey-lysiuk/macos-sdk.git + cd macos-sdk + git sparse-checkout set --no-cone /MacOSX12.3.sdk + git checkout + cd .. + + ## Build the App ~/go/bin/fyne-cross linux -arch=amd64,arm64 -app-id="OnionSoup" ~/go/bin/fyne-cross windows -arch=amd64,arm64 -app-id="Onion.Soup" + ~/go/bin/fyne-cross darwin -arch=amd64,arm64 -app-id="Onion.Soup" --macosx-sdk-path /home/runner/work/onionsoup/onionsoup/macos-sdk/MacOSX12.3.sdk + ## Pack Up Each Release mv fyne-cross/dist/linux-amd64/onionsoup.tar.xz fyne-cross/onionsoup_linux_amd64.tar.xz mv fyne-cross/dist/linux-arm64/onionsoup.tar.xz fyne-cross/onionsoup_linux_arm64.tar.xz mv fyne-cross/dist/windows-amd64/onionsoup.exe.zip fyne-cross/onionsoup_windows_amd64.exe.zip mv fyne-cross/dist/windows-arm64/onionsoup.exe.zip fyne-cross/onionsoup_windows_arm64.exe.zip + tar -czf onionsoup_mac_amd64.tar.gz -C fyne-cross/dist/darwin-amd64/onionsoup.app onionsoup.app + tar -czf onionsoup_mac_arm64.tar.gz -C fyne-cross/dist/darwin-arm64/onionsoup.app onionsoup.app + mv onionsoup_mac_amd64.tar.gz fyne-cross/onionsoup_mac_amd64.tar.gz + mv onionsoup_mac_arm64.tar.gz fyne-cross/onionsoup_mac_arm64.tar.gz - name: Release uses: softprops/action-gh-release@v2 @@ -41,4 +56,6 @@ jobs: fyne-cross/onionsoup_linux_arm64.tar.xz fyne-cross/onionsoup_windows_amd64.exe.zip fyne-cross/onionsoup_windows_arm64.exe.zip + fyne-cross/onionsoup_mac_amd64.tar.gz + fyne-cross/onionsoup_mac_arm64.tar.gz token: ${{ secrets.GH_TOKEN }} diff --git a/README.md b/README.md index 1b0b114..86ee442 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,13 @@ This example highlights how 2 parties (Alice and Bob), can bootstrap a conversat ### Windows 1. Download the prebuilt `exe.zip` from the Release page and extract it. -2. Download and install the tor expert bundle from [here](https://www.torproject.org/download/tor/) and start the daemon service with `c:\Tor\tor.exe –-service install` -3. Open OnionSoup! +2. Download and extract the tor expert bundle from [here](https://www.torproject.org/download/tor/) +3. Add the path of the extracted `tor` exe to your `path` variable in the `Environment Variables` menu. +4. Open OnionSoup! ### Mac -*Mac Builds are currently not working, please see [this issue](https://github.com/JustinTimperio/onionsoup/issues/1)* +1. Download the prebuilt `tar.gz` from the Release page and extract it to your Applications folder. +2. Open OnionSoup! ## Building from Source @@ -60,9 +62,8 @@ To bundle the assets into the program run: ``` ### Mac -*Mac Builds are currently not working, please see [this issue](https://github.com/JustinTimperio/onionsoup/issues/1)* ```bash -~/go/bin/fyne-cross darwin -arch=amd64,arm64 -app-id="Onion.Soup" --macosx-sdk-path /full-path/macos-sdk/MacOSX15.2.sdk +~/go/bin/fyne-cross darwin -app-id="Onion.Soup" --macosx-sdk-path /path/to/macos-sdk/MacOSX12.3.sdk ``` diff --git a/server/server.go b/server/server.go index 2419dad..c924b1c 100644 --- a/server/server.go +++ b/server/server.go @@ -32,6 +32,7 @@ func NewRouteHandler() (*RouteHandler, error) { t, err := tor.Start(nil, &tor.StartConf{ DataDir: path.Join(os.TempDir(), "tor", randomString(10)), + RetainTempDataDir: false, }) if err != nil { return nil, err From 9da3289b796c5ec65c20bdb985317cc6baf061c2 Mon Sep 17 00:00:00 2001 From: Justin Timperio Date: Tue, 31 Dec 2024 05:19:10 -0800 Subject: [PATCH 2/4] Change git pull --- .github/workflows/release.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae2ad90..6779db0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,16 +25,12 @@ jobs: go install github.com/fyne-io/fyne-cross@latest ## Check out the macos SDK from git - git clone -n --depth=1 --filter=tree:0 https://github.com/alexey-lysiuk/macos-sdk.git - cd macos-sdk - git sparse-checkout set --no-cone /MacOSX12.3.sdk - git checkout - cd .. + git clone https://github.com/alexey-lysiuk/macos-sdk.git ## Build the App ~/go/bin/fyne-cross linux -arch=amd64,arm64 -app-id="OnionSoup" ~/go/bin/fyne-cross windows -arch=amd64,arm64 -app-id="Onion.Soup" - ~/go/bin/fyne-cross darwin -arch=amd64,arm64 -app-id="Onion.Soup" --macosx-sdk-path /home/runner/work/onionsoup/onionsoup/macos-sdk/MacOSX12.3.sdk + ~/go/bin/fyne-cross darwin -arch=amd64,arm64 -app-id="Onion.Soup" --macosx-sdk-path $(pwd)/macos-sdk/MacOSX12.3.sdk ## Pack Up Each Release mv fyne-cross/dist/linux-amd64/onionsoup.tar.xz fyne-cross/onionsoup_linux_amd64.tar.xz From c874a0a15ad9baa412d8358c61cbbf729643a5e4 Mon Sep 17 00:00:00 2001 From: Justin Timperio Date: Tue, 31 Dec 2024 11:06:26 -0800 Subject: [PATCH 3/4] Try newer version of go and ubuntu --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6779db0..7e15f36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,13 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: + - name: Setup Go 1.23 + uses: actions/setup-go@v5 + with: + go-version: "1.23" + - name: Checkout uses: actions/checkout@v4 @@ -21,7 +26,7 @@ jobs: run: | ## Install Dependencies sudo apt update -y - sudo apt install -y docker golang git zip gzip tar + sudo apt install -y docker git zip gzip tar go install github.com/fyne-io/fyne-cross@latest ## Check out the macos SDK from git From 7c6c4681ecf3da9b49ef9c13ad4154d6a8b659dd Mon Sep 17 00:00:00 2001 From: Justin Timperio Date: Tue, 31 Dec 2024 11:28:37 -0800 Subject: [PATCH 4/4] Install docker manually --- .github/workflows/release.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e15f36..6541a33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,25 @@ jobs: run: | ## Install Dependencies sudo apt update -y - sudo apt install -y docker git zip gzip tar + sudo apt install -y git zip gzip tar apt-transport-https curl go install github.com/fyne-io/fyne-cross@latest + # Add Docker's official GPG key: + sudo apt install -y ca-certificates curl + sudo install -m 0755 -d /etc/apt/keyrings + sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc + sudo chmod a+r /etc/apt/keyrings/docker.asc + + # Add Docker to Apt sources: + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update -y + + # Install Docker + sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + ## Check out the macos SDK from git git clone https://github.com/alexey-lysiuk/macos-sdk.git