From 01745b352231ad363e0c9b0e6c6653a622b6469f Mon Sep 17 00:00:00 2001 From: Peter Jonas Date: Mon, 30 Jul 2018 03:00:58 +0100 Subject: [PATCH 1/2] musescore 2.3.1: add shim for command line usage MuseScore looks for the Qt library in a location relative to the executable. If we symlink to the executable then MuseScore will look in a location relative to the symlink and Qt won't be found. The shim solves this by running MuseScore inside the .app bundle. --- Casks/musescore.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Casks/musescore.rb b/Casks/musescore.rb index 9cbb92cf3665..6f9c4ae82502 100644 --- a/Casks/musescore.rb +++ b/Casks/musescore.rb @@ -10,4 +10,15 @@ depends_on macos: '>= :lion' app "MuseScore #{version.major}.app" + # shim script (https://github.com/caskroom/homebrew-cask/issues/18809) + shimscript = "#{staged_path}/musescore.wrapper.sh" + binary shimscript, target: 'musescore' + binary shimscript, target: 'mscore' + + preflight do + IO.write shimscript, <<~EOS + #!/bin/sh + exec '#{appdir}/MuseScore #{version.major}.app/Contents/MacOS/mscore' "$@" + EOS + end end From 681ca62295ab43ae66a107b5e1110e75bd899f1a Mon Sep 17 00:00:00 2001 From: commitay Date: Fri, 3 Aug 2018 10:28:22 +1000 Subject: [PATCH 2/2] Update musescore.rb --- Casks/musescore.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Casks/musescore.rb b/Casks/musescore.rb index 6f9c4ae82502..1a5644173283 100644 --- a/Casks/musescore.rb +++ b/Casks/musescore.rb @@ -11,8 +11,7 @@ app "MuseScore #{version.major}.app" # shim script (https://github.com/caskroom/homebrew-cask/issues/18809) - shimscript = "#{staged_path}/musescore.wrapper.sh" - binary shimscript, target: 'musescore' + shimscript = "#{staged_path}/mscore.wrapper.sh" binary shimscript, target: 'mscore' preflight do