hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.24k stars 430 forks source link

No /opt/homebrew/bin/copyq after brew install 8.0.0 #2661

Closed slvrstn closed 1 month ago

slvrstn commented 3 months ago

Describe the bug Command line not configured as /opt/homebrew/bin/copyq after installation

Here is the output from the install

==> Upgrading 1 outdated package:
copyq 7.1.0 -> 8.0.0
==> Upgrading copyq
==> Caveats
copyq is not signed and requires Accessibility access,
so you will need to re-grant Accessibility access every time the app is updated.

Enable or re-enable it in:
  System Preferences → Security & Privacy → Privacy → Accessibility
To re-enable, untick and retick copyq.app.

==> Downloading https://github.com/hluk/CopyQ/releases/download/v8.0.0/CopyQ-macos-12-m1.dmg.zip
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/344809/cc2ae3e4-69ee-44a9-b512-078811a9dfbf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA
##################################################################################################################################################################################################### 100.0%
==> Backing App 'CopyQ.app' up to '/opt/homebrew/Caskroom/copyq/7.1.0/CopyQ.app'
==> Removing App '/Applications/CopyQ.app'
==> Unlinking Binary '/opt/homebrew/bin/copyq'
==> Moving App 'CopyQ.app' to '/Applications/CopyQ.app'
==> Purging files for version 7.1.0 of Cask copyq
🍺  copyq was successfully upgraded!

Note that the binary is unlinked in one of the last steps and is never relinked.

Expected behavior /opt/homebrew/bin/copyq should be linked, likely to /Applications/CopyQ.app/Contents/MacOS/CopyQ

Version, OS and Environment # /Applications/CopyQ.app/Contents/MacOS/CopyQ version CopyQ Clipboard Manager 8.0.0-g73afa309-v8.0.0 Qt: 6.6.2 KNotifications: 5.249.0 Compiler: GCC Arch: arm64-little_endian-lp64 OS: macOS 14.4

hluk commented 1 month ago

No idea how to fix the macOS bundle. I'm not very familiar with the bundling process and packaging on macOS. Currently it is very messy. Currently, macdeployqt handles the bundling:

https://github.com/hluk/CopyQ/blob/955dec6d45f5d8fc29c6222dc2329355bf203f59/utils/github/bundle-macos.sh#L13

Also, it is possible that some attributes set by CMake are missing:

https://github.com/hluk/CopyQ/blob/955dec6d45f5d8fc29c6222dc2329355bf203f59/src/CMakeLists.txt#L108-L119

Thought CMake does no longer handle the bundling itself since the fix in 3c4fe45924f01dab4536f2b119c5efa7c8e226dc. I can try to revert the fix to see if it works with recent Qt.

hluk commented 1 month ago

Thought CMake does no longer handle the bundling itself since the fix in 3c4fe45. I can try to revert the fix to see if it works with recent Qt.

Reverting the workaround fix seems to have worked (#2722).

@slvrstn Can you help verify is the bundles are OK? The newly built bundles are here: https://github.com/hluk/CopyQ/actions/runs/9091723035?pr=2722#artifacts