From b29d5c15b92087a51f105f145da8827bdda2a233 Mon Sep 17 00:00:00 2001 From: Sam Bostock Date: Fri, 20 Jan 2023 14:02:45 -0500 Subject: [PATCH 1/3] [WIP] Add obs-advanced-scene-switcher cask This adds a cask for https://obsproject.com/forum/resources/advanced-scene-switcher.395 It's currently blocked by figuring out how to get the plugin into the correct directory. See code comments. --- Casks/obs-advanced-scene-switcher.rb | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Casks/obs-advanced-scene-switcher.rb diff --git a/Casks/obs-advanced-scene-switcher.rb b/Casks/obs-advanced-scene-switcher.rb new file mode 100644 index 000000000000..89b68e48576e --- /dev/null +++ b/Casks/obs-advanced-scene-switcher.rb @@ -0,0 +1,43 @@ +cask "obs-advanced-scene-switcher" do + arch arm: "arm64", intel: "universal" + + version "1.20.1" + sha256 arm: "54f520a84a885b4611ad2f2f336fedb30880d7d1719c731b2cd9498842094d25", + intel: "dd5022325b7e16ed9ec954c1be67e1c101eb604dce5255da47f7605514b9b904" + + url "https://github.com/WarmUpTill/SceneSwitcher/releases/download/#{version}/advanced-scene-switcher-macos-#{arch}.pkg", + verified: "https://github.com/WarmUpTill/SceneSwitcher" + name "OBS Advanced Scene Switcher" + desc "Automated scene switcher for OBS Studio" + homepage "https://obsproject.com/forum/resources/advanced-scene-switcher.395" + + depends_on cask: "obs" + + # FIXME: pkg puts this plugin in wrong directory... + # Homebrew moves OBS into + # /Applications/OBS.app + # However, it continues to use + # ~/Library/Application\ Support/obs-studio + # Therefore, the plugin should be put in + # ~/Library/Application\ Support/obs-studio/plugins/advanced-scene-switcher.plugin + # but it gets put in the root library instead + # /Library/Application\ Support/obs-studio/plugins/advanced-scene-switcher.plugin + # How to solve this? + # Should Homebrew be passing something to the installer? "install for me, not all users"? + # Is it the package's fault for assuming the app's settings are in the root? + # Is it the OBS cask's fault for leaving the settings in ~/Library instead of moving them? + # Didn't find any "choices" to set... + pkg "advanced-scene-switcher-macos-#{arch}.pkg" + # NOTE: Attempting to fix this with artifact stanza does not work + # ==> Moving Generic Artifact 'advanced-scene-switcher.plugin' to + # '/Users/sambostock/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin' + # ==> Purging files for version 1.20.1 of Cask obs-advanced-scene-switcher + # Error: Permission denied @ rb_file_s_rename - ( + # /Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin, + # /Users/sambostock/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin, + # ) + plugin_path = "/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin" + artifact plugin_path, target: Dir.home + plugin_path + + uninstall pkgutil: "com.warmuptill.advanced-scene-switcher" +end From 6f69f259ab07fa371cbb5107dc91f347cae57233 Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Mon, 6 Mar 2023 04:21:36 +0800 Subject: [PATCH 2/3] Update obs-advanced-scene-switcher.rb --- Casks/obs-advanced-scene-switcher.rb | 36 ++++++---------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/Casks/obs-advanced-scene-switcher.rb b/Casks/obs-advanced-scene-switcher.rb index 89b68e48576e..26e2f23029b1 100644 --- a/Casks/obs-advanced-scene-switcher.rb +++ b/Casks/obs-advanced-scene-switcher.rb @@ -1,43 +1,21 @@ cask "obs-advanced-scene-switcher" do arch arm: "arm64", intel: "universal" - version "1.20.1" - sha256 arm: "54f520a84a885b4611ad2f2f336fedb30880d7d1719c731b2cd9498842094d25", - intel: "dd5022325b7e16ed9ec954c1be67e1c101eb604dce5255da47f7605514b9b904" + version "1.20.5" + sha256 arm: "086227b8c7a4fbbcbe16bc7926bbaeaf43a93777afffe1193114349ab0c7fe5c", + intel: "1ba88b767c436d4ecff1a6ecb84461028724fa4cc6eb57c031d2f4fffcf4050d" url "https://github.com/WarmUpTill/SceneSwitcher/releases/download/#{version}/advanced-scene-switcher-macos-#{arch}.pkg", - verified: "https://github.com/WarmUpTill/SceneSwitcher" + verified: "github.com/WarmUpTill/SceneSwitcher/" name "OBS Advanced Scene Switcher" desc "Automated scene switcher for OBS Studio" homepage "https://obsproject.com/forum/resources/advanced-scene-switcher.395" depends_on cask: "obs" - # FIXME: pkg puts this plugin in wrong directory... - # Homebrew moves OBS into - # /Applications/OBS.app - # However, it continues to use - # ~/Library/Application\ Support/obs-studio - # Therefore, the plugin should be put in - # ~/Library/Application\ Support/obs-studio/plugins/advanced-scene-switcher.plugin - # but it gets put in the root library instead - # /Library/Application\ Support/obs-studio/plugins/advanced-scene-switcher.plugin - # How to solve this? - # Should Homebrew be passing something to the installer? "install for me, not all users"? - # Is it the package's fault for assuming the app's settings are in the root? - # Is it the OBS cask's fault for leaving the settings in ~/Library instead of moving them? - # Didn't find any "choices" to set... pkg "advanced-scene-switcher-macos-#{arch}.pkg" - # NOTE: Attempting to fix this with artifact stanza does not work - # ==> Moving Generic Artifact 'advanced-scene-switcher.plugin' to - # '/Users/sambostock/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin' - # ==> Purging files for version 1.20.1 of Cask obs-advanced-scene-switcher - # Error: Permission denied @ rb_file_s_rename - ( - # /Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin, - # /Users/sambostock/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin, - # ) - plugin_path = "/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin" - artifact plugin_path, target: Dir.home + plugin_path - uninstall pkgutil: "com.warmuptill.advanced-scene-switcher" + uninstall pkgutil: "com.warmuptill.advanced-scene-switcher", + delete: "/Library/Application Support/obs-studio/plugins/advanced-scene-switcher.plugin", + rmdir: "/Library/Application Support/obs-studio/plugins" end From 480348d8fb7d6e307546e966c1c981cf8bcb0860 Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Mon, 6 Mar 2023 04:48:10 +0800 Subject: [PATCH 3/3] Update obs-advanced-scene-switcher.rb --- Casks/obs-advanced-scene-switcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Casks/obs-advanced-scene-switcher.rb b/Casks/obs-advanced-scene-switcher.rb index 26e2f23029b1..0fe8ce0344b2 100644 --- a/Casks/obs-advanced-scene-switcher.rb +++ b/Casks/obs-advanced-scene-switcher.rb @@ -1,5 +1,5 @@ cask "obs-advanced-scene-switcher" do - arch arm: "arm64", intel: "universal" + arch arm: "arm64", intel: "x86_64" version "1.20.5" sha256 arm: "086227b8c7a4fbbcbe16bc7926bbaeaf43a93777afffe1193114349ab0c7fe5c",