qimgv icon indicating copy to clipboard operation
qimgv copied to clipboard

Is there a MacOS version?

Open LampPrinter opened this issue 2 years ago • 7 comments

Like the title says. Cannot seem to find a good and fast image viewer on MacOS.

LampPrinter avatar Dec 13 '22 01:12 LampPrinter

Successfully built on macOS Monterey with homebrew.

The one unresolved issue is with the keyboard shortcuts for quick image copy/move. The shortcuts are not customisable and the key "1", "2" ... are not correctly detected (with my AZERTY keyboard). However, the mouse drag&drop works for the quick copy/move feature.

If anyone knows where is located the code which handles the keyboard event in the copy / quick move panels, let me know. I will (anybody is welcomed) take a look at this issue.

  1. install Xcode command-line tools The quickest way is to issue the command gcc in a terminal and accept the proposed installation of the Xcode command tools (clang compiler, git,....)
  2. Install homebrew (for the required tools and libraries) See homepage of the project for the installation command. The command should be:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
  1. Install required dependencies for qimgv
brew install cmake qt@5 exiv2 mpv opencv
  1. Following documentation of qimgv:
git clone https://github.com/easymodo/qimgv.git 
cd qimgv && mkdir -p build && cd build ```
cmake -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" -DEXIV2=OFF -DVIDEO_SUPPORT=OFF ..
make 

Note: Exiv2 (image metadata information) is removed, since I did not need it and failed to enforce c++11 standard for a successful compilation.

  1. Install the application
cp -r qimgv/qimgv.app  /Applications/

6/ At last, the source directory qimgv/ can be deleted.

loikun avatar Dec 22 '22 02:12 loikun

and the key "1", "2" ... are not correctly detected

Its probably due to QKeyEvent::nativeScanCode() not working on macOS. I'll do a workaround

https://github.com/easymodo/qimgv/blob/8ad0a1173cd3c6b96a5549405de71d1ea57c09ac/qimgv/gui/overlays/copyoverlay.cpp#L169

easymodo avatar Dec 22 '22 07:12 easymodo

Actually I was also able to compile it. @loikun For exiv2 you have to go to "/opt/homebrew/Cellar/exiv2/0.27.5_1/include/exiv2" and replace all "std::auto_ptr" with "std::unique_ptr" Then it builds fine.

But pinch to resize gesture is not working still. Any solution @easymodo ?

LampPrinter avatar Dec 22 '22 07:12 LampPrinter

But pinch to resize gesture is not working still.

I just didn't implement it (because linux drivers are kinda shitty). Gonna try it on macbook. Just looked at docs, it shouldnt be too hard

easymodo avatar Dec 22 '22 08:12 easymodo

i got

CMake Error at /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /opt/homebrew/Cellar/cmake/3.25.2/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  CMakeLists.txt:61 (find_package)

taprobane99 avatar Feb 24 '23 23:02 taprobane99

try : brew install pkgconfig ?

loikun avatar Feb 25 '23 04:02 loikun