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

[REQ] Add Homebrew support for macOS #553

Open
Alorse opened this issue Oct 6, 2024 · 2 comments
Open

[REQ] Add Homebrew support for macOS #553

Alorse opened this issue Oct 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Alorse
Copy link

Alorse commented Oct 6, 2024

Hello,

I'm reaching out to request adding Homebrew support for macOS to GalaxyBudsClient. Currently, some macOS users encounter issues due to the app being flagged as unverified, even when using the "Open Anyway" option. Integrating Homebrew support would streamline installation and alleviate these verification concerns.

Thank you for considering this enhancement!

Is your feature request related to a problem? Please describe.
Yes, macOS users are encountering issues with the GalaxyBudsClient being flagged as unverified, which requires them to manually override security settings. (For all apps, not just this one)

Describe the solution you'd like
I would like to request the addition of Homebrew support for GalaxyBudsClient on macOS. This would provide a verified installation method and avoid the need for users to bypass security warnings.

Describe alternatives you've considered
Currently, users can manually bypass security settings by choosing "Open Anyway" but having Homebrew support would automate the installation process and ensure a verified package.

Additional context
The integration of Homebrew support would enhance user experience on macOS by simplifying the installation process and ensuring smoother updates.

@Alorse Alorse added the enhancement New feature or request label Oct 6, 2024
@MarceloCFerraz
Copy link

Another way around this would be to build the code locally, which I do every time. Although a bit clunky and time-consuming for someone doing it for the first time, it works well.

@MarceloCFerraz
Copy link

MarceloCFerraz commented Jan 11, 2025

Here's a quick breakdown of what you need to build it from your own Mac device:

Installing Build Dependencies

Make sure you have Homebrew installed (which I believe you already have). You'll also want:

  • .NET 8 SDK (super important to pick the SDK here),
  • XCode and
  • coreutils (more a precaution than a must): brew install coreutils

After downloading and installing Xcode, I suggest opening it at least once to make sure Command Line Tools are enabled:

Click XCode > Settings

image

Then open Locations

image

Finally, make sure Command Line Tools is not blank. If it is, set something here:

image

Downloading the repository

You can do this in two ways:

  1. Clone the repository with Git - which I won't cover how to do, as it'll take non-devs too far off the track
  2. Download a .zip with the source code:

image

If you downloaded a zip, make sure you extract it. For the rest of the guide, I'll assume the code was cloned/extracted to the Downloads folder. If you extracted it elsewhere, please make sure you update relevant pieces to where your code is sitting.

Building the project

The trickiest part, but if you have all the dependencies set, you should have a smooth way through this too.

To make it easier, create a file named build.sh on the root of the project you've downloaded. I'll give you a script to do the rest of the heavy lifting. The path to the script should look like this: /Users/{YOUR_USERNAME_GOES_HERE}/Downloads/GalaxyBudsClient/build.sh

Now open build.sh with your favorite text editor and paste the code snippet below on it. Replace all {YOUR_USERNAME_GOES_HERE} with your actual username and save the file before we continue. Here's the script:

#!/usr/bin/env bash

# Clean old binaries, if any
rm -rf ~/Library/Developer/Xcode/DerivedData/* && \
    rm -rf ./GalaxyBudsClient.Platform.OSX/Native/Build && \
    xcodebuild clean -project GalaxyBudsClient.Platform.OSX/Native/NativeInterop.xcodeproj

# Pulling native Xcode project dependencies
xcodebuild -project GalaxyBudsClient.Platform.OSX/Native/NativeInterop.xcodeproj -resolvePackageDependencies

# building the native XCode project
xcodebuild -project GalaxyBudsClient.Platform.OSX/Native/NativeInterop.xcodeproj \
    -scheme NativeInterop \
    -destination platform=macOS,arch=arm64 ARCHS=arm64 ONLY_ACTIVE_ARCH=NO CONFIGURATION_BUILD_DIR=/Users/{YOUR_USERNAME_GOES_HERE}/Downloads/GalaxyBudsClient/GalaxyBudsClient.Platform.OSX/Native/Build/Release CONFIGURATION_TEMP_DIR=/Users/{YOUR_USERNAME_GOES_HERE}/Downloads/GalaxyBudsClient/GalaxyBudsClient.Platform.OSX/Native/Build/Intermediates.noindex \
    build

# Getting the necessary workloads for this project
sudo dotnet workload restore
sudo dotnet workload update

# restoring .NET dependencies
dotnet restore -r osx-arm64 --configfile GalaxyBudsClient/nuget.config GalaxyBudsClient/GalaxyBudsClient.csproj

# building the Application
dotnet publish -o bin_osx -c Release --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj

Almost there. Now open your terminal on the project folder (/User/{YOUR-NAME}/Downloads/GalaxyBudsClient/) and run chmod +x build.sh && ./build.sh to start the script.

You should see a bunch of text on your terminal. Wait until you see this:

image

If the terminal gives you back control but you're not seeing this message, something probably went wrong. Assuming the build finished with no errors, you should have the App sitting at /User/{YOUR-NAME}/Downloads/GalaxyBudsClient/GalaxyBudsClient/bin/Release/net8.0-macos, just copy it to your Applications and you're done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants