Any interest in a Homebrew formula for sunshine #71
-
Describe the BugMight you be interested in a contributed Homebrew formula for Mac that builds sunshine? I haven't had the chance to additionally add a Homebrew service config to the formula and don't think I'll have the chance to circle back to this near term, so wanted to offer up in case useful in the meanwhile. Formula attached. Expected BehaviorNo response Additional ContextNo response Host Operating SystemmacOS Operating System Version12.5.1 Architecturex86_64 Sunshine Version0.14.1 GPU TypeAMD GPU ModelRadeon Pro Vega 64 16 GB GPU Driver/Mesa Version01.01.114 Capture Method (Linux Only)No response Relevant log outputNo response |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 96 replies
-
It would be nice to add this to Homebrew. We have some packaging issues to address with macOS as well. |
Beta Was this translation helpful? Give feedback.
-
I would submit myself, but alas might not be the right person to go through the Homebrew committers' review process, hence hopefully someone else would be interested in doing so. |
Beta Was this translation helpful? Give feedback.
-
The macports one (macports/macports-ports#15143) was an eye opening experience, hopefully the Homebrew one will be less chaotic. I'll need to redo that one at some point since I closed it. |
Beta Was this translation helpful? Give feedback.
-
pasting the attachment here for easier viewing: class Sunshine < Formula
desc "Gamestream host/server for Moonlight"
homepage "https://app.lizardbyte.dev"
url "https://github.com/LizardByte/Sunshine.git",
tag: "v0.14.1",
revision: "6000b85b1a4ec574d93fbc7545f5bf48f3d5aaa7"
license all_of: ["GPL-3.0", "BSD-3-Clause", "MIT"]
head "https://github.com/LizardByte/Sunshine.git"
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "ffmpeg"
depends_on "[email protected]"
depends_on "opus"
def install
args = %W[
-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets
-DSUNSHINE_CONFIG_DIR=local/sunshine/config
]
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
cd "build" do
system "make", "-j"
system "make", "install"
end
end
test do
# No discernable tests in project, making do with cli output
system "touch", "sunshine.conf"
assert_match "Sunshine version: v0.14.1", shell_output("#{bin}/sunshine sunshine.conf --version").strip
end
end and tweaks required after #330 is merged: class Sunshine < Formula
desc "@PROJECT_DESCRIPTION@"
homepage "@PROJECT_HOMEPAGE_URL@"
url "@GITHUB_CLONE_URL@",
# is tag required? won't be available until after a release is published
# tag: "v0.14.1",
revision: "@GITHUB_COMMIT@"
license all_of: ["GPL-3.0", "BSD-3-Clause", "MIT"]
head "https://github.com/LizardByte/Sunshine.git"
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "ffmpeg"
depends_on "[email protected]"
depends_on "opus"
def install
args = %W[
-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}
-DSUNSHINE_ASSETS_DIR=sunshine/assets
]
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
cd "build" do
system "make", "-j"
system "make", "install"
end
end
test do
# test that version numbers match
assert_match "Sunshine version: v@PROJECT_VERSION@", shell_output("#{bin}/sunshine --version").strip
end
end
|
Beta Was this translation helpful? Give feedback.
-
Thanks! Yes, I saw that port thread and it reminded me of one of my brew
experiences. :)
Per my understanding, the brew folks generally expect a formula revision
for each project release, but provide some assistance to make the process
easier:
- “has a stable, tagged version (i.e. not just a GitHub repository with no versions)” (https://docs.brew.sh/Formula-Cookbook#basic-instructions)
- “Eventually a new version of the software will be released. In this case you should update the url and sha256. …” (https://docs.brew.sh/Formula-Cookbook#updating-formulae)
|
Beta Was this translation helpful? Give feedback.
-
Some of these GitHub actions could be of interest, https://github.com/marketplace?type=actions&query=homebrew+ |
Beta Was this translation helpful? Give feedback.
-
I've just gotten it to install on an older Mac running Big Sur with
saved to
Currently the web interface isn't loading with |
Beta Was this translation helpful? Give feedback.
-
I can install it on my macbook(m1 pro, 13.4) with the formula below: class Sunshine < Formula
desc "Gamestream host/server for Moonlight"
homepage "https://app.lizardbyte.dev"
url "https://github.com/LizardByte/Sunshine.git",
# is tag required? won't be available until after a release is published
tag: "v0.19.1",
revision: "d70d084f9fbb4e0150977a89d94937418a3ccf9c"
license all_of: ["GPL-3.0", "BSD-3-Clause", "MIT"]
head "https://github.com/LizardByte/Sunshine.git"
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "ffmpeg"
depends_on "[email protected]"
depends_on "opus"
def install
args = %W[
-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}
-DSUNSHINE_ASSETS_DIR=sunshine/assets
]
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
cd "build" do
system "make", "-j"
system "make", "install"
end
end
test do
# test that version numbers match
assert_match "Sunshine version: v0.19.1", shell_output("#{bin}/sunshine --version").strip
end
end though there's a problem of I'm not familiar with Homebrew formula but I guess there is a way to actually solve it. |
Beta Was this translation helpful? Give feedback.
-
(posting for visibility, based on the work of others in the longer threads) As of today, the following worked for me on an arm64 machine running macOS Ventura 13.5.1: # Do this once:
brew tap realqhc/homebrew https://github.com/realqhc/homebrew
# For first-time installation:
brew install realqhc/homebrew/sunshine
# Thereafter, to upgrade or uninstall:
brew upgrade sunshine
brew uninstall sunshine Note: When running, sunshine requests certain permissions (Screen Recording, Accessibility, maybe others; not sure). In my experience macOS reported those permissions requests as originating from my terminal emulator (Terminal.app, iTerm2, Alacritty, etc.), not Thank you to everyone who helped create the formula stored in that repo! For posterity, here's a permalink to the formula that worked for me just now: https://github.com/realqhc/homebrew/blob/7acc2666a9a0dd94f19a91071023973cfae43bed/Formula/sunshine.rb Reproducing below, in case the above repo is deleted or made private (in which case the tap would stop working, too): require "language/node"
class Sunshine < Formula
desc "Gamestream host/server for Moonlight"
homepage "https://app.lizardbyte.dev"
url "https://github.com/LizardByte/Sunshine.git",
# is tag required? won't be available until after a release is published
tag: "v0.21.0",
revision: "5bca024899eff8f50e04c1723aeca25fc5e542ca"
license all_of: ["GPL-3.0", "BSD-3-Clause", "MIT"]
head "https://github.com/LizardByte/Sunshine.git"
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "curl"
depends_on "ffmpeg"
depends_on "node"
depends_on "openssl"
depends_on "opus"
def install
system "npm", "install", *Language::Node.local_npm_install_args
system "git", "submodule", "update", "--remote", "--init", "--recursive"
args = %W[
-DCMAKE_BUILD_TYPE=Release
-DOPENSSL_ROOT_DIR=#{Formula["openssl"].opt_prefix}
-DSUNSHINE_ASSETS_DIR=sunshine/assets
]
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
cd "build" do
system "make", "-j"
system "make", "install"
end
end
test do
# test that version numbers match
assert_match "Sunshine version: v0.21.0", shell_output("#{bin}/sunshine --version").strip
end
end Footnotes
|
Beta Was this translation helpful? Give feedback.
-
The cmake solution is somehow not working for now. |
Beta Was this translation helpful? Give feedback.
-
Quick question for macOS version of Sunshine. I have a headless Mac Mini, but have 4k EDID HDMI dongle that supports HDR (it works on my PC), and macOS says HDR is on. I can't seem to get sunshine to show in HDR. Any ideas?
|
Beta Was this translation helpful? Give feedback.
-
We have now released v0.22.1 and the homebrew formula is now available in our own repo. https://github.com/LizardByte/homebrew Thank you to all who helped and thank you everyone for your patience. |
Beta Was this translation helpful? Give feedback.
We have now released v0.22.1 and the homebrew formula is now available in our own repo. https://github.com/LizardByte/homebrew
Thank you to all who helped and thank you everyone for your patience.