From a330a2a3930beb490a1bcb8f92167d62e5393fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Kampschroer?= Date: Thu, 31 Oct 2024 15:36:37 +0100 Subject: [PATCH 1/3] moving binary after build so macOS will recognize it as sunshine without the build. added codesigning to make sure macOS asks for permissions --- packaging/sunshine.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 1b603fc15fb..ba413b937e1 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -112,9 +112,15 @@ def install system "make" system "make", "install" + # Move binary instead of symlinking it + bin.install "sunshine-#{ENV["BUILD_VERSION"]}" => "sunshine" + bin.install "tests/test_sunshine" end + # Codesign the installed binary + system "codesign", "-s", "-", "--force", "--deep", "#{bin}/sunshine" + bin.install "src_assets/linux/misc/postinst" if OS.linux? end From 17ca7ab5c666fdbfda6e7d44f39ec93d54edb6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Kampschroer?= Date: Thu, 31 Oct 2024 19:24:40 +0100 Subject: [PATCH 2/3] made signing and moving the binary conditional to macOS --- packaging/sunshine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index ba413b937e1..974ca681ed4 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -113,13 +113,13 @@ def install system "make", "install" # Move binary instead of symlinking it - bin.install "sunshine-#{ENV["BUILD_VERSION"]}" => "sunshine" + bin.install "sunshine-#{ENV["BUILD_VERSION"]}" => "sunshine" if OS.mac? bin.install "tests/test_sunshine" end # Codesign the installed binary - system "codesign", "-s", "-", "--force", "--deep", "#{bin}/sunshine" + system "codesign", "-s", "-", "--force", "--deep", bin/"sunshine" if OS.mac? bin.install "src_assets/linux/misc/postinst" if OS.linux? end From 726dc569e1716b2cb7d379ff41c9adbee4c50f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Kampschroer?= Date: Fri, 1 Nov 2024 14:58:06 +0100 Subject: [PATCH 3/3] codesign only on intel macs. not moving the binary anymore. --- packaging/sunshine.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 974ca681ed4..72d0e9852f9 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -112,14 +112,11 @@ def install system "make" system "make", "install" - # Move binary instead of symlinking it - bin.install "sunshine-#{ENV["BUILD_VERSION"]}" => "sunshine" if OS.mac? - bin.install "tests/test_sunshine" end - # Codesign the installed binary - system "codesign", "-s", "-", "--force", "--deep", bin/"sunshine" if OS.mac? + # codesign the binary on intel macs + system "codesign", "-s", "-", "--force", "--deep", bin/"sunshine" if OS.mac? && Hardware::CPU.intel? bin.install "src_assets/linux/misc/postinst" if OS.linux? end