Open fulldecent opened 9 years ago
Instructions for building? I haven't built on OSX. You would need all the GNU build tools and the GIMP lib to build it, since that is what the current build system uses.
If you just want to install it, I think you could find it pre-built for OSX. That is, something you would just drag into your GIMP plugins directory.
If you have built GIMP on OSX, then the same build tools should work for Resynthesizer. If you just installed GIMP, then I suggest you also just install a prebuilt Resynthesizer plugin.
There are many different mac builds for resynthesizer, which are possible different versions and or projects. It might be nice for this project to link to a recommended build.
Installing most of the build dependencies with homebrew wasn't too hard, but I'm not sure how to install the "GIMP development libraries". Do you have to build gimp itself in order to have those installed?
I have not built GIMP or Resynthesizer on Mac. My best guess is: yes, you need to build GIMP.
On Linux, you acquire the package 'libgimp2.0-dev', which contains the include files/headers (.h) and library (libgimp.so or similar). Resynthesizes includes the former and links to the latter. You might can get the equivalents for the Mac without building.
Looks like homebrew doesn't have libgimp2.0-dev
because gimp is installed pre-built. So I'll probably need to build gimp locally in order to build gimp plugins.
@karlkfi Did you actually succeed in building osx binaries?
Its distributed in this version, but its not the multi-threaded version. http://partha.com/
It probably is not important that you use v2 compiled multithreaded. There should be no functional difference between v1 and v2, and the performance from multithreading is usually not huge because of the nature of the algorithm. v2 was created to test multithreading and the result was not great (say a speedup of say 1.5 or less, certainly not proportional to the number of cores.) v2 was also created for architectural reasons, to have a reentrant inner library (no global variables) and that shouldn't matter for most users. I could be wrong, I haven't tested on the Mac, and certainly your experience could be different.
On Linux, you acquire the package 'libgimp2.0-dev', which contains the include files/headers (.h) and library (libgimp.so or similar). Resynthesizes includes the former and links to the latter. You might can get the equivalents for the Mac without building.
Can't it be used on macOS too?
The linux build does not work on MacOSX. You must build it yourself for MacOSX, or acquire it from someone else who has built it for MacOSX. As in the link above to Partha.
I was referring to the libgimp2.0-dev
package, not the whole plugin.
Sorry. Building resynthesizer requires libgimp2.0-dev, a package that include headers for linking to Gimp libraries. Which usually means you must first build Gimp on the platform (MacOSX in this case), since libgimp2.0-dev is not usually distributed in packages of Gimp for users (as opposed to developers.)
I'm using a Mac right now. I just don't develop on it, much. I wish it were easier to cross between platforms.
I took a shot at this. Got it compiled and running on macOS 10.12.6 with GIMP 2.10.10. My best effort at documenting the steps is here (https://gist.github.com/ryan-robeson/5841f712ff23c910bbbfac793c16bfad).
I didn't start with a fresh Homebrew install or take a lot of notes, so there are probably some things missing (primarily dependencies).
Hope this helps.
Thanks. I will try to replicate it, and document it in the repository. No promises.
I used macports, and was able to do
sudo port install gimp
git clone https://github.com/bootchk/resynthesizer
cd resynthesizer
./autogen.sh
./configure
make
sudo make install
Though, I think I had to copy the files from /opt/local/lib/gimp/2.0/plug-ins/ to ~/Library/Application\ Support/gimp/2.10/plug-ins/. It was rather painless, but I also didn't start fresh and am rather used to these things.
Update: After writing the first version of the guide referenced above, I decided to create a Tap for libgimp2.0 (2.10.10).
I just added Resynthesizer as well. So, assuming an existing Homebrew installation, the following should be all it takes to install Resynthesizer (v2.0.3):
# Add `--HEAD` to compile from `master`
brew install ryan-robeson/gimp/resynthesizer
Then in GIMP (initial install only):
Preferences > Folders > Plug-ins
$(brew --prefix)/share/gimp-plugins/resynthesizer
to the list
brew install...
P.S. Bottles are provided so the install should be fast (using --HEAD
disables bottles, so YMMV). I've only tested on Sierra, but I believe more recent versions should work just as well. Feedback is welcome.
Ryan, I just wanted to chime in and say thank you so much for putting this together.
I did run into a hickup, looks like something to do with the libgimp2.0 library version:
Thanks for the feedback @dandroid88. Looks like your crash is related to my Homebrew package. I'm not sure what the etiquette is for moving an issue, but I created ryan-robeson/homebrew-gimp#1 so we can discuss this in its own thread.
Also, if you wouldn't mind editing your comment here and wrapping the crash log in <details>
tags, it'll keep this thread a little more readable. Example:
<details>
<summary>Crash Report</summary>
Process....
</details>
Thanks!
New twist for 2020: 🎉
python@2 was deleted from homebrew/core in commit 028f11f:
python@2: delete (https://github.com/Homebrew/homebrew-core/issues/49796)
EOL 1 January 2020.
We gave it 1 month more to live so that people had time to migrate.
All in all, developers had 11 years to do their migration.
You can use the `brew extract` command and maintain python@2 in your own
tap if necessary:
I recently updated my tap to support GIMP 2.10.18. I also added the python@2 formula. Thanks for the heads up.
Thanks so much for putting this together! I had problems when I tried to use it with GIMP 2.10.12 though, haha.
Hi @finhj, I created an issue over on the repo of my Tap where we can discuss the problems you're having.
Thanks for the heads up on the links. Looks like I may need to provide bottles for those as well.
brew install ryan-robeson/gimp/resynthesizer
Thank you for your effort with resynthesizer.
I am on MacOS Catalina and tried
brew install ryan-robeson/gimp/resynthesizer
as well as
brew install --build-from-source libgimp2.0
as well as
brew install libgimp2.0
And I get with all 3 commands:
==> Downloading https://ghcr.io/v2/homebrew/core/python/2/manifests/2.7.17_1
##O#- #
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "python@2_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/python/2/manifests/2.7.17_1
Thanks for any help.
I think that homebrew has stopped supporting Python2. Thats what the message means. According to what I read on the net.
I think that a GIMP from homebrew is not built, just a .dmg that the gimp.org has built. I don't know whether that includes Python 2 and the library libgimp2.0 suitable for building Resynthesizer.
I have used MacPorts to build GIMP and Resynthesizer recently. Seems to work.
GIMP version 2 uses Python2 until Gimp version 3 is released.
Its a dumpster fire of a mess.
Was hoping to find all instructions with a Mac category