Author Topic: Dual ISO with Mac El-Capitan  (Read 17633 times)

EFwebb

  • New to the forum
  • *
  • Posts: 29
Dual ISO with Mac El-Capitan
« on: November 30, 2015, 09:51:05 PM »
I have read some previous posts on this topic, but it all seemed like a foreign language to me and I am wondering if anyone can help me.  I had dual ISO processing set up on my computer and then made the mistake of updating to El-Capitan and my batch mode dual iso convertor no longer works.  Whenever I try to drag a folder over the cr2hdr icon I get the message sj: draw: comment not found sh: exiftool: command not found sh draw: command not found Error: draw is not a valid PGM.  it seems to me that the program no longer recognizes the directories where the executables are stored.  So I modified my .bash_profile to show that path length and it still does not recognize where the executable is.  I would have tried to do the same thing with exiftool, but to be honest I used the installer to install that and I am not sure what directory it is in.  Has anybody else been able to solve this problem, and if so can you give me some instructions on how to fix this?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7571
Re: Dual ISO with Mac El-Capitan
« Reply #1 on: November 30, 2015, 10:23:07 PM »
One way of dealing with El Capitan is to disable SIP (System integrity protection)

Do this at own risk!

1. Restart the computer, while booting hold down Command-R to boot into recovery mode.
2. Once booted, navigate to the "Utilities > Terminal" in the top menu bar.
3. Enter csrutil disable in the terminal window and hit the return key.
4. Restart the machine and System Integrity Protection will now be disabled.
5. To enable SIP again go back into recovery mode and this time type csrutil enable in the terminal.

Before reenabling SIP (Step 5) You want to place cr2hdr in usr/bin folder. You can go to this folder like this.
1 - Press cmd + shift + g
2 - in the "go to the folder" window write /usr/bin and hit enter
3 - move cr2hdr, dcraw and exiftool to /usr/bin folder
You might wanna do a package install of exiftool to get the lib folder installed. Google exiftool mac and you should be good to go.

now you can reenable SIP (Step 5)

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #2 on: November 30, 2015, 10:51:12 PM »
The El Capitan upgrade puts programs that were installed in /usr/bin and /bin into a quarantine directory. You can move cr2hdr, dcraw, exiftool (and the lib directory that goes with exiftool) to /usr/local/bin and it should work.

Macintosh HD > Library > SystemMigration > History > Migration-UUID > QuarantineRoot

http://www.macissues.com/2015/10/06/how-to-see-software-disabled-by-os-x-10-11-el-capitan/

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7571
Re: Dual ISO with Mac El-Capitan
« Reply #3 on: November 30, 2015, 10:53:01 PM »
That is /usr/local/bin is really there :D. Otherwise you,re in for the SIP treat.

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #4 on: December 01, 2015, 01:06:15 AM »
So I migrated everything from the QuarantineRoot directory to usr/local/bin and it still fails with the same warning.  Do I need to set some path lengths in my .bash_profile or is something else causing the problem?

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #5 on: December 01, 2015, 01:14:39 AM »
It seems to me that the code is working fine but does not know which directory to look for the exif and dcraw executables in.  If this is correct shouldn't I just recreate the exact directory it was in before instead of placing it in usr/local/bin?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7571
Re: Dual ISO with Mac El-Capitan
« Reply #6 on: December 01, 2015, 01:50:40 AM »
If you have exiftool and it,s lib folder and dcraw and cr2hdr in usr/local/bin it should work. ANy of these files you missed?

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #7 on: December 01, 2015, 01:54:46 AM »
Open the terminal and type "which dcraw exiftool" and it should give you the paths. If it returns nothing, type "echo $PATH" and report back.

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #8 on: December 01, 2015, 03:06:43 AM »
I have visually checked by opening the usr/local/bin directory chain and seeing the executables and manually verified by doing a "which" command in terminal.  Both exiftool and draw are in the directory usr/local/bin.  The lib directory required for exiftool is also in the usr/local/bin directory.  The error message

 Input file : B01_4486.CR2
sh: dcraw: command not found sh: exiftool: command not found sh: dcraw: command not found Error: dcraw output is not a valid PGM file Logfile    : B01_4486.txt

THE END

still shows up when I try to drop a .CR2 file in the executable icon.

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #9 on: December 01, 2015, 03:08:32 AM »
I think the executable is hard wired to look in the directory "usr/bin" and is not looking in "usr/local/bin", although I could be wrong.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3411
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Dual ISO with Mac El-Capitan
« Reply #10 on: December 01, 2015, 04:00:02 AM »
@EFwebb-

Have you tried installing @Danne's latest cr2hdr-r (after you finished the SIP part) and let it install the required binaries in there for you automatically?

5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #11 on: December 02, 2015, 01:33:56 AM »
Did you try "echo $PATH" to make sure /usr/local/bin is in your path? Have you tried launching dcraw and/or exiftool from the terminal? (They will give a short help message if you don't supply any arguments)

So you are running cr2hdr by dragging and dropping on the icon? I didn't know you could do that on the Mac version. Try putting cr2hdr in /usr/local/bin and in the terminal type "cr2hdr" then drag and drop your file (dual iso cr2 or dng) into the terminal window. It will put in the path to your file in the terminal so you save on some typing. Then hit return and it should work.

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #12 on: December 02, 2015, 04:13:50 AM »
There is one step missing in the SIP process.  Once I hold down command-R, the computer does not automatically boot into safe mode.  Instead I am given the choice of restore from time machine backup, reinstall OS X, Get help online or Disk Utility.  Which of these should I select?

EFwebb

  • New to the forum
  • *
  • Posts: 29
Re: Dual ISO with Mac El-Capitan
« Reply #13 on: December 02, 2015, 04:33:40 AM »
Never mind, I see how to access the utility menu now.  To answer the other question, yes, my path variable does include /usr/local/bin and the executables in /usr/local/bin work just fine.  However, disabling the SIP and moving the executables and lib directory to /usr/bin and then re-enabling the SIP fixed the problem and I am now able to convert dual iso .cr2 files to .dng files.  Thank you for your assistance, I greatly appreciate it!

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #14 on: December 02, 2015, 06:16:51 PM »
@EFwebb Could you please explain your workflow in a bit more detail?

The reason I'm curious is because I tried dragging and dropping a dual_iso dng on the cr2hdr icon and nothing happens. If I double click on the cr2hdr icon it will open the terminal, give a quick help and close the terminal session. The only way I know how to run cr2hdr on the Mac is from the terminal. In addition, I've got dcraw and exiftool installed in /usr/local/bin and everything is working fine, no need to work around the El Capitan System Integrity Protection system.

Of course if cr2hdr is being launched by another program then maybe cr2hdr cannot find dcraw and exiftool unless they are installed in /usr/bin.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7571
Re: Dual ISO with Mac El-Capitan
« Reply #15 on: December 02, 2015, 07:12:00 PM »
@EFwebb. How are you using cr2hdr? Either you find what is missing or I think you could change the exportpath.

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #16 on: December 03, 2015, 12:43:27 AM »
MLPP works as stand alone. You showed me the path fix yourself :). Same as in  kichetofs lightroom plugin?

Yes, I worded it improperly--edited my last post.

I'm trying to figure out what EFwebb is doing because cr2hdr is working fine for me with dcraw and exiftool in /usr/local/bin. Maybe he made a "droplet" script or whatever you call it so that it launches cr2hdr via drag and drop? It seems that with El Capitan command line programs use the system path but "regular" programs don't.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Dual ISO with Mac El-Capitan
« Reply #17 on: December 03, 2015, 07:43:46 AM »
Could you run ls -l /usr/local/bin and see if you have r-x or rwx, if you don't have x, do that:

Maybe a permission error, try to make bin executable:

Code: [Select]
chmod +x /usr/local/bin/dcraw
Do the same for exiftool

dfort

  • Guest
Re: Dual ISO with Mac El-Capitan
« Reply #18 on: December 03, 2015, 04:14:20 PM »
EFwebb reported that the same binary worked in /usr/bin but not in /usr/local/bin so it doesn't seem to be a permissions issue.

I'm not sure that it is a good idea to have users disable SIP. The only exception might be to create the /usr/local directory.

nickmford

  • New to the forum
  • *
  • Posts: 3
Re: Dual ISO with Mac El-Capitan
« Reply #19 on: January 10, 2016, 07:58:55 AM »
I've been following this thread and done quite a bit of testing, but I haven't reached a solution disabling SIP and making sure I have cr2hdr, dcraw and exiftool (with its /lib) in the usr/local/bin and usr/bin

The earlier errors are gone, but I'm now left with the following

Input file      : /Users/nicholasmarshall/Desktop/M09-1558_C0000/M09-1558_C0000_00176.dng
dyld: Library not loaded: /usr/local/opt/jasper/lib/libjasper.1.dylib
  Referenced from: /usr/local/bin/dcraw
  Reason: image not found
Camera          : Canon EOS 5D Mark III
Camera model    : Canon EOS 5D Mark III
dcraw could not open this file

I've searched for any reference of this error and couldn't find a solution in the threads.  Anyone have any ideas?

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3411
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Dual ISO with Mac El-Capitan
« Reply #20 on: January 10, 2016, 08:07:17 AM »
-deleted- wrong text
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Dual ISO with Mac El-Capitan
« Reply #21 on: January 11, 2016, 04:16:50 PM »
dyld: Library not loaded: /usr/local/opt/jasper/lib/libjasper.1.dylib
  Referenced from: /usr/local/bin/dcraw
This means that dcraw can't load a dependency, which means it's not installed properly. I would recommend reinstalling it. If you're using a good package manager like homebrew (and you should be), then this would be as simple as:
Code: [Select]
brew install dcraw

homebrew already knows how to deal with el-capitan and SIP properly

nickmford

  • New to the forum
  • *
  • Posts: 3
Re: Dual ISO with Mac El-Capitan
« Reply #22 on: January 14, 2016, 08:26:06 PM »
@ dmilligan: Thank You. Worked like a charm after reinstalled dcraw.

bench

  • New to the forum
  • *
  • Posts: 2
Re: Dual ISO with Mac El-Capitan
« Reply #23 on: February 05, 2016, 11:43:58 AM »
After some googling, I found a way to fix this issue without disabling SIP. 8)
https://forums.adobe.com/thread/1969031?start=0&tstart=0
  • Go to plugin folder -> right click cr2hdr plugin-> show package content
  • Use a text editor to open MLProcess.lua
  • Search for "LrTasks.execute", you will find 3 matching results
  • On the line before the first result(around line 437), insert
Code: [Select]
cmd = 'export PATH="'..LrPathUtils.child(_PLUGIN.path, 'bin"')..':${PATH} && '..cmd
  • On the lines before the second(around line 485) and third result(around line 506), insert
Code: [Select]
command = 'export PATH="'..LrPathUtils.child(_PLUGIN.path, 'bin"')..':${PATH} && '..command
    The problem is Lightroom only looks for applications in /usr/bin for its plugins. These changes add the other system paths as well as the plugin folder to the search list.
    Dcraw and exiftool were actually came with the plugin in, so the lightroom plugin may actually runs without installing dcraw and exiftool separately. Otherwise just use homebrew to install them.
    I won't recommend disabling SIP just for this plugin. SIP protects your computer 8)

    Danne

    • Developer
    • Hero Member
    • *****
    • Posts: 7571
    Re: Dual ISO with Mac El-Capitan
    « Reply #24 on: February 05, 2016, 12:13:28 PM »
    export path change has already been implemented to the lightroom plugin. Same goes for MLP. Old versions floating around it seems.