jhnc / findimagedupes

Finds visually similar or duplicate images
GNU General Public License v3.0
104 stars 8 forks source link

how to install findimagedupes on macOS? #8

Open nevertoday opened 2 years ago

nevertoday commented 2 years ago

I have tried multiple installation schemes, but it cannot be installed on mac, how can I install it correctly?

jhnc commented 2 years ago

Unfortunately, I have no access to Apple products so am unable to advise on the procedure required. Perhaps another user of the program will be able to answer your question here, for future reference.

nevertoday commented 2 years ago

It doesn't matter, I have achieved my purpose by other means. Thank you

tenzap commented 1 year ago

In case it may help, that's what I use on github runners: It uses homebrew on the github runner, but it works also when using macports

          # Some command below use GNU sed
          brew install gnu-sed

          # Dependencies for findimagedupes
          # Graphics::Magick is provided by graphicsmagick
          brew install graphicsmagick

          # Install PerlMagick from GraphicsMagick to have Graphics::Magick
          wget https://netcologne.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.40/GraphicsMagick-1.3.40.tar.xz
          tar -xf GraphicsMagick-1.3.40.tar.xz
          cd GraphicsMagick-1.3.40
          # Configure with the same configure arguments as homebrew, but with "--with-perl=yes"
          ./configure \
            --prefix=/usr/local \
            --disable-dependency-tracking \
            --disable-openmp \
            --disable-static \
            --enable-shared \
            --with-modules \
            --with-quantum-depth=16 \
            --without-lzma \
            --without-x \
            --without-gslib \
            --with-gs-font-dir=/usr/local/share/ghostscript/fonts \
            --without-wmf \
            --with-jxl \
            --with-perl=yes
          cd PerlMagick
          perl Makefile.PL
          make
          sudo make install

          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "File::MimeInfo")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "File::MimeInfo::Magic")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Inline")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Inline::C")'

          wget https://raw.githubusercontent.com/jhnc/findimagedupes/2.20.1/findimagedupes
          chmod +x findimagedupes
          gsed -i 's#usr/bin/perl#usr/bin/env perl#' findimagedupes
          gsed -i 's#'\''/usr/local/lib/findimagedupes'\''#$ENV{"HOME"}#' findimagedupes
          sudo mv findimagedupes /usr/local/bin

          findimagedupes --help || echo