Building a "portable" binary for macOS with RAW support?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
atwright147
Posts: 2
Joined: 2018-10-20T12:56:13-07:00
Authentication code: 1152

Building a "portable" binary for macOS with RAW support?

Post by atwright147 »

Hey,

I am trying to build a static ("portable") binary for macOS with RAW support but having a lot of difficulty.

I started off with the following post which works well: http://blog.schdbr.de/imagemagic-osx-st ... ble-build/

I have evolved this to the following: https://gitlab.com/atwright147/npm-imag ... -static.sh

But when I try to build with ufraw I get a lot of errors as you will be able to see in this pastebin: https://pastebin.com/R6CcCsCb

Can any body help me to resolve this please?

Many thanks,


Andy

EDIT:
I posted this quite late last night and it doesn't fully convey what I am trying to achieve. I want to create a portable version of ImageMagick with TIFF, PNG, JPEG etc support AND RAW (CR2, NEF etc) support.

I intent to package this up into an NPM package which will be installable on macOS and Windows (I don't need any help with the NPM side). I will probably build the macOS version on Travis and the Windows version on AppVeyor and get the NPM package to download it for me.

So, questions:

1. Is the "portable" ImageMagick I found on the Windows download page set up for RAW processing (I can see dcraw in the zip)? IF so, where is the script that this is built from?
2. Is there a script or some instruction about how to do this out there anywhere?

PS. I have updated the title of this post to better explain what I am after :)
Last edited by atwright147 on 2018-10-21T06:35:17-07:00, edited 2 times in total.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Building a static binary for macOS?

Post by dlemstra »

Maybe this script can help you: https://github.com/dlemstra/Magick.NET/ ... S/Build.sh. I use it to statically build ImageMagick on macOS.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
atwright147
Posts: 2
Joined: 2018-10-20T12:56:13-07:00
Authentication code: 1152

Re: Building a static binary for macOS?

Post by atwright147 »

Hey,

Thanks for posting that, lots of interesting ideas in there. I cannot see any references to raw setup in there, am I missing anything?

Andy
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Building a "portable" binary for macOS with RAW support?

Post by dlemstra »

Missed that in your original post or did you add that after the edit? No working on adding support for libraw to my build script and I use the following to compile libraw (only tested on Linux yet):

Code: Select all

autoreconf -fiv
export CFLAGS="-O3 -fPIC"
export CXXFLAGS="-O3 -fPIC"
./configure --disable-shared --disable-examples --prefix=/usr/local
make install
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply