Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mac Build #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,56 @@ 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

- name: Build
run: |
## Install Dependencies
sudo apt update -y
sudo apt install -y docker golang git
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

## 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 $(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
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
Expand All @@ -41,4 +73,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 }}
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
```


Expand Down
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading