Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
slvrstn opened this issue Apr 4, 2024 · 2 comments · Fixed by #2722
Closed

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

slvrstn opened this issue Apr 4, 2024 · 2 comments · Fixed by #2722
Labels
bug help wanted Needs a volunteer to investigate/implement the issue macOS Relates to macOS

Comments

@slvrstn
Copy link

slvrstn commented Apr 4, 2024

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

@slvrstn slvrstn added the bug label Apr 4, 2024
@hluk hluk added macOS Relates to macOS help wanted Needs a volunteer to investigate/implement the issue labels May 15, 2024
@hluk
Copy link
Owner

hluk commented May 15, 2024

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:

"$qt_bin/macdeployqt" "$app_bundle_path" -dmg -verbose=2 -always-overwrite -no-plugins \

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

CopyQ/src/CMakeLists.txt

Lines 108 to 119 in 955dec6

set(MACOSX_BUNDLE_BUNDLE_NAME "${COPYQ_EXECUTABLE_NAME}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "io.github.hluk.CopyQ")
set(MACOSX_BUNDLE_INFO_STRING "Advanced clipboard manager with editing and scripting features")
set(MACOSX_BUNDLE_ICON_FILE "icon.icns")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${copyq_version}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${copyq_version}")
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/images/icon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(copyq_COMPILE ${copyq_COMPILE} "${CMAKE_CURRENT_SOURCE_DIR}/images/icon.icns")
add_executable(${COPYQ_EXECUTABLE_NAME} MACOSX_BUNDLE ${copyq_COMPILE})

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.

hluk added a commit that referenced this issue May 15, 2024
hluk added a commit that referenced this issue May 15, 2024
hluk added a commit that referenced this issue May 15, 2024
@hluk
Copy link
Owner

hluk commented May 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Needs a volunteer to investigate/implement the issue macOS Relates to macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants