DMG Betas
Mac OS X already has Perl installed. Open a Terminal application (in the Utilities folder of your Applications folder) and run perl -v to find out which version. ActiveState Perl has binary distributions of Perl for Mac OS X. This is the simplest way to install the latest version of Perl. Download ActivePerl. Now, this is a Mac, so Perl is already installed and it's already in the path, so all I have to put here for the command is Perl and the name of the file that we're going to run, which is a meta name, because it's just going to run whatever script is open in the editor, so I put in '%F'. The own Mac OS X Perl seams to be installed here: bash-3.2$ ls /Library/Perl/ 5.10 5.12 Updates bash-3.2$ ls /System/Library/Perl/ 5.10 5.12 Extras lib bash-3.2$ There is also a version here: bash-3.2$ ls /opt/local/lib/perl5/ 5.12.4 siteperl vendorperl I thought best is.
As a beta release, Padre is available as a packaged Application for OsX.
See this page for the latest DMG: http://wildperl.com/padreonosx/
This is a beta and we could really use your help. We need more OSX testers, and any help you can give us, even saying it runs fine for you, is important.
Open tickets can be found here: osxbugs, and hop on to IRC as the best way to report any issues and give feedback.
There are several methods of installing Padre from source. As such, they require some familiarity with command-line usage of OsX.
**System Perl vs User Perl:** Padre requires a 32bit version of Perl and wxWidgets 2.8.12. These are not the default on OsX. Additionally, the default 'system' perl on OsX may be altered or changed in the course of software updates from Apple. Consequently, building Padre requires creating a self-contained perl, wxWidgets, and Padre.
**Xcode:** On OsX most of the common development utilities that are referenced by perl (gcc, make, etc) are provided by installing Xcode. The instruction sets below assume that you have installed these or reasonable substitutes on your system, that they are properly in your path, etc.
**Wx Tests:** There will be a point where you are compiling Wx. The tests for Wx involve generating many window primitives. These tests will fail if they are run inside of a gnu-screen or ssh session. (The error message might be a bit strange: stating issues creating the clipboard because of permissions.) Additionally, during the test cycle many of the tests will grab focus on the UI. This will make your system unusable for a short period of time. Let the tests run. If you try to quit out of them, you will cause the tests to fail and it will halt the compile.
Option 1 - Installation with Citrus Perl
Cirtus Perl is a portable distribution of perl that has pre-built Wx binaries and integration. A shortened form of installation instructions is below. Refer to the installation instructions on the download page below if you want full details.
- Download Citrus Perl- Unpack Citrus Perl into your favorite dev location:#!sh
- This has created a 'CitrusPerl' directory that has a fully isolated install of perl, including Wx. You can also use CPAN to add to this perl without polluting your system's install of perl with additional modules. (Also meaning that an apple update will not break your version of perl if you use this.)- Configure Cirtus Perl to work in its new location#!sh
- At this point you can put Citrus Perl in your path. Set it ahead of other entries by putting the line below as the last line in your .bash_profile. That will make any command line invocation of perl or cpan use Citrus Perl and not your system perl. Substitute /Users/joe/dev below with your chosen installation directory.#!sh
- Reload your .bash_profile to use the new path#!sh
- To install Padre, use cpan and run the command install Padre. This will build all required dependencies along the way, so it will take some time.#!sh- Padre should now be in your path and usable on the command line
Option 2 - Installation with Mac Ports
Mac Ports is a project to provide many GNU and Open Source utilities to OsX. It packages and installs them in /opt/local.
- Mac Ports can be downloaded and installed as a package from http://www.macports.org/install.php and configured:
- Remember to follow the instructions to put Mac Ports first in your path so the Ports version of perl will execute when called on the command line:
- Install Perl and Wx (This will include many dependencies and take some time to compile and complete.)
- Install Padre via CPAN
- Padre should now be in your path and usable on the command line
Option 3 - Compiling a Perl with Perl Brew
We are attempting to automate the process using the bin/padre-brew.pl available here.
If you want to build on your own you should note the environment settings and build parameters used on OSX Lion, or refer to the bin/padre-brew.pl source for other OSX levels.
//As stated above, this is not recommended. You are manipulating portions of the system OS which may be changed in the future by Apple and/or you may cause unintended side-effects in your OS.//
Pre-Lion versions of OsX had varying levels of Perl, Wx and sometimes wxPerl installed. Sometimes with a minimum of effort, a functioning wxPerl and Padre could be made to work. (OS X 10.4 has wxPerl 0.22, 10.5 has a more recent version (0.6x for some x))
Generally, you do not use the system 'perl' executable, but build a 'wxPerl' executable (see this thread regarding wxPerl invocation).
Reading up on installation using pkgsrc may also help.
Checking what versions you currently have
If you have trouble you can check which version of wxWidgets you have:
and on Mac:
We use Wx 0.87 and wxWidgets 2.8.8 so you probably should have those (or newer) too.
Installation from CPAN
The most straightforward method is to install everything from source. This will ignore any existing wxWidgets installation.
- $ wxPerl -MCPAN -eshell
- [cpan] $ install Alien::wxWidgets [choose install from source, which is NOT the default]
- Go do something else while it compiles wxWidgets.
- [cpan] $ install Wx
- [cpan] $ install Padre
Padre has a LOT of prerequisites. You're likely to run into some problems with tests failing. IPC::Run3 was a particular problem due to its prerequisites, but a later individual install worked fine. Just make your way through them all, and 'force notest install $module' as needed. Once you've got padre installed you start it by running /usr/local/bin/padre.
Notes on building wxWdigets from source
When installing Alien::wxWidgets it will ask if you want to compile wxWidgets. Do you want to fetch and build wxWidgets from sources?If you don't have any installed or if you have an old version (< 2.8.8) then you should answer yes.It will try to download the source code of wxWidgets which is big and the download often fails.
To get around that you can download the file manually and put it in the extracted directory ofAlien::wxWidgets.
Something like this:
Variation 1 - Taking the lazy way
If you're lazy and enjoy taking risks... the easiest way to install on OSX may be (there will be some test failures - which you'll have to force install, including Padre itself, due to wxPerl issues):
and then replace the /usr/local/bin/padre script with the updated version.
After installing Alien::wxWidget there are new versions of wx-config and wxrc somewhere in your Perl Library Path, (mine went under site_perl/darwin-thread-multi-2level/Alien/wxWidgets/mac_2_8_10_uni/bin), which need to be first in your PATH, otherwise Wx might build against the wrong Library. As an alternative you can set an environment variable WX_CONFIG which has to point to the new wx-config executable. See the Wx docs for more info.
Variation 2 - Using a package manager for the Wx portion
Aside from building from source, you can also install newer versions of Wx on OS X using a package manager:
It is possible to create an Application icon to launch your command-line version of Padre. You can create an Applescript application to do this.
Launch the Applescript Editor from the Utilities folder in the Applications folder.
You will enter a line to launch padre which which uses the full path of your preferred perl and padre.
For Mac ports:
For Citrus Perl: (change /Users/joe/dev/ to your path for Citrus Perl)
Select 'Save As' under the file menu. Select the format of 'Application.' Name it what you'd like and install it where you'd like it to be. (IE: the Applications folder)
Clicking on this icon should now launch Padre.
Links
http://www.perlmonks.org/?node_id=910271 last updated 2016-02-26; Contact us - Code of Conduct and Diversity Statement - IRC
Posted on 2005-06-07 09:42:06-07 by macosx
Is there information for beginners like myself who are trying to get startedwith Apple's Terminal and Perl and ExifTool all at the same time.I am really only interested in one feature at the moment and thatis extracting JPEGs from CANON RAW image files.I have tried to follow the directions but I have been unsuccessful and it's gettingquite painful. I would appreciate tutoringas my real work is photography and not computer programming.
-John
Posted on 2005-06-07 13:03:40-07 by exiftool in response to 592
It is really simple. Here are the steps:
1) Using your favourite browser (ie. Safari), download the latest version of exiftoolfrom http://owl.phy.queensu.ca/~phil/exiftool/ to your desktop.
2) Open a terminal window (by running 'Terminal' from the /Applications/Utilities folder).
3) In the terminal window, type the following:
(Note: Replace '5.25' with the version number you actually downloaded.)
4) Assuming your Canon RAW file is on the desktop and named 'Canon.CRW',type the following to extract the JPEG image:
Or if your Camera produced .CR2 format RAW files, you need to extract the PreviewImage instead:
You should now have a file called 'Canon_JFR.JPG' on your desktop.This is the JPEG extracted from the CRW or CR2 file.
5) If you want to transfer the EXIF information from the originalRAW file to the extracted JPEG, type the following:
(or use Canon.CR2 if the file was CR2 format)
That's about it. If you want, you can follow the instructions in theREADME file to do a standard installation. Then you won't have to specifythe exiftool directory on the command line.Note that some MacOS systems don't have the required Perl header files to dothe 'perl Makefile.PL' step. Instead, you can just copy 'exiftool'and the 'lib' directory to anywhere in your PATH(type 'printenv PATH' in the terminal window to show your PATH directories).
Let me know if you have any troubles.
Posted on 2005-09-22 23:30:19-07 by dayo in response to 593
Hello.
I am pretty much in the same situation as the original poster in that as a recent Mac adopter,I don't know very much about terminal etc so your response is very welcome.Some additional questions.
1. In the example you gave (Point 4) was is the step if the file not on the desktop.How to you specify the path to it.
2. The main reason I am interested in this tool is that I want to create Exif datafor TIFF files from a scanner. Is this possible?
3. If it is, can I write into the exposure fields such as shutter speed, Aperture etc.I have scans using a Minolta Scan Dual III and have all the exposure data for eachshot as I used a Minolta Dynax 7 that allows me to output text files with this data.
4. I have checked and know that the file properties section of my scannedfiles do not have fields for aperture etc. Is it possible to create these fields in aTIFF files that doesn't have one? Perhaps transfer from one image that has then to these ones?
5. I noticed that some other post had something about lenses from the Minolta Dynax 7D.I am a hybrid shooter as in addition to the Dynax 7, I own a Minolta Dynax 7D and a Dimage A2.Are the raw files from these units supported?
Sorry for the number of queries and thanks for your assistance.
Posted on 2005-09-23 00:59:51-07 by exiftool in response to 1028
I'll answer your questions as best I can:
1) You can prefix any filename by the path where it is located.Directory names are separated by '/'. A complication is that on the Mac it iscommon to have spaces and sometimes other funny characters in directory and file names.This complicates things a bit on the command line because if this happensyou have to either put quotes around the whole name or put a ' before each space character.
So for instance, if the image was in my '/Users/phil/Pictures' directory, and assumingexiftool is in the current directory, I could type the following to extract the previewinto a directory called 'Previews' in the root directory of my boot disk:
Hints: The '~' character used above is a short form for your home directory name,which is '/Users/phil' in my case. Also, it makes typing a lot fasterif you know about 'tab completion': It is usually not necessary to typean entire directory name -- once you have typed a few characters,press the 'tab' key and the rest of the name will be completedunless there is another directory beginning with the same sequence of characters.
2) Yes, you can add EXIF information to any TIFF file (as well as a number of other file types).
3) You can write all the information you mention, plus a lot more.
4) You can either create this information from scratch, or copy it from another image.Whichever is easiest for you.
5) ExifTool should work on MRW images from any Minolta camera.I have tested it personally with raw files from the 7D and A2.
I hope this helps.
Posted on 2005-09-23 10:03:06-07 by dayo in response to 1029
Thanks a million for the quick reply. I'll give it a bash.I'll go get a book and educate myself on using Terminal.
Funny that I am quite competent with the DOS Prompt in Windows and often write complexbatch files but if I thought I could migrate my knowledge intuitively to Terminal,I couldn't have been more mistaken. I'll correct this oversight.
Looking at some of the other posts with references to excel etc.I suppose it is possible to write a series of tags to be loaded into an externalfile and have the program loop through a series of files and update them.However, I need to learn the basics first.
Thanks again, the hints were particularly useful
Posted on 2006-12-19 17:47:19-08 by pedroparamo in response to 593
I realize this is an old post but I'm just starting to install and use exiftool.How do I copy the 'exiftool' and the 'lib' directory to my PATH?
Pedro
Posted on 2006-12-19 18:51:49-08 by exiftool in response to 3839
There are a few ways, and the exact steps depend on the shell you are using.(The default shell is tcsh for OS X 10.3 and earlier, but it changedto bash for OS X 10.4. Which do you use?)
Here are the steps:
1a) If you are using tcsh (the OS X 10.3 default), add the following line to the '.cshrc'file in your home directory. (If '.cshrc' doesn't exist, use '.tcshrc' instead,otherwise create one of these and add the line.)
1b) If you are using bash (the OS X 10.4 default), instead add thefollowing line to the '.bashrc' file in your home directory:
2) Start a new terminal window, and in that window type:
This will create the /usr/local/bin directory and expand the exiftoolfiles in that directory. (You should change the '#.##' to the actualversion number that you downloaded. This command assumes that youhave downloaded it to your Desktop.)
After doing this, you should be able to run exiftool in a terminal windowby just typing 'exiftool'. (Of course, you will have to add optionsand file names on the command line to do what you want after that.)
- Phil
Posted on 2006-12-20 15:46:49-08 by pedroparamo in response to 3846
Thanks. I've got that part done, but when I try to run something like:exiftool -h -refine test/JPEGS/60537-01.JPGI get the error message -bash: exiftool: command not found.
Do I need to be in my local/bin directory when I run exiftool,or my home directory, or does it matter? Pedro
Posted on 2006-12-20 16:55:15-08 by exiftool in response to 3853
If you set your PATH properly, then typing 'exiftool' alone should be good.Here is a bash terminal session showing you how things should be set up:
Try these commands and paste your terminal session if you are still having problems.
- Phil
Posted on 2006-12-20 19:27:48-08 by pedroparamo in response to 3854
I don't think things are set up correctly. My home directory is as follows:
My local/bin directory is:
I'm just guessing but don't I need an exiftool file (folder?)in my local/bin directory somewhere?? I'm assuming that you wanted me torun the commands you sent replacing 'phil' with the name of my homedirectory -- which is 'home' -- here's my terminal session:
Posted on 2006-12-20 20:59:17-08 by exiftool in response to 3859
Hi Pedro,
Thanks. I'm sorry, it's my fault. Expanding the distribution in the /usr/local/bin directory created a subdirector called Image-ExifTool-6.66. The exiftool files have to be moved to the parent directory. ie)
Also, there was some confusion about my terminal session.Everything before the '$' was just part of the prompt, not a command.So my idea there didn't work too well. I wanted you to type the following:
But I think we know now that the 'ls' command wouldn't find exiftool sinceit was in the Image-ExifTool-6.66 sub-directory. Sorry about that.
- Phil
Posted on 2006-12-27 15:50:20-08 by pedroparamo in response to 3860
Hi Phil, I think I've got everything straight, but I can't seem to get exiftool to work.I want to get the exif info of a file in a folder on my desktop 'test/60512F-01.CR2'.When I run (from the terminal window, in the home directory)exiftool -h -test/60512F-01.CR2I get the following error -bash: exiftool: command not foundDoes it matter which directory I am in when I run exiftool?
Thanks. Pedro
Posted on 2006-12-27 17:21:24-08 by exiftool in response to 3907
Hi Pedro,
You need to either type the exiftool directory each time, ie)
~/Desktop/Image-ExifTool-6.66/exiftool -h ~/Desktop/test/60512F-01.CR2
or add the exiftool directory to your PATH. Since you are using bash, it can be done like this:
echo 'export PATH=${PATH}:/Users/USERNAME/Desktop/Image-ExifTool-6.66' >> ~/.bashrc
where 'USERNAME' is your user name. (Just cut and paste the above line as a command in your terminal window, substituting USERNAME appropriately.) Then you must open a new Terminal window for the new PATH to take effect.
Note that both of these examples assume that exiftool is in a directory called 'Image-ExifTool-6.66'. If it is somewhere else just change this to the proper directory name.
(Also, in these examples I have used '~', which is a shorthand for your home directory '/Users/USERNAME' that can be used in commands and filenames.)
Linux For Mac Os X
- Phil
Posted on 2006-12-27 20:02:04-08 by pedroparamo in response to 3911
Phil, Now I'm a bit confused and I'm not sure where my exiftool is located.My home directory looks like this:
ExifTool-6.66 is located in my /usr/local/bin:
Does this look correct? I added the exiftool directory to my PATH as per your instructions.Should I now be able to run exiftool from my home directory by just typing commands?Or do I need to type exiftool -h ~/Desktop/test/60512F-01.CR2 Thanks for your patience.
Pedro
Posted on 2006-12-27 22:33:00-08 by exiftool in response to 3914
Hi Pedro,
If you have the directory '/usr/local/bin/Image-ExifTool-6.66' in your PATH,then you're good to go with command lines that begin with just 'exiftool'. So typing
exiftool -h ~/Desktop/test/60512F-01.CR2
should do the job. FYI: You can verify your PATH by typing
printenv PATH
but it sounds like you should be good to go.
- Phil
Posted on 2006-12-27 23:57:58-08 by exiftool in response to 3920
Here are a couple more command-line tricks that may be useful to you:
In OS X, you can use the 'open FILE' command at the command line,and it will do the same thing as if you had double-clicked on the file. For example, typing this:
Creates an output HTML file called 'out.html' from informationin the specified image, then opens 'out.html' in your default browser (probably Safari).
Another tip is that you can use the TAB key to avoid a lot of typing.This tip applies to any system, including OS X, Unix and Windows.The TAB will complete any unambiguous partial command or file name,so usually it is only necessary to type the first few characters of each word.For instance, in the above example, what I would actually type is more like this:
where '[TAB]' represents a press of the TAB key.
I sort of take all this stuff for granted now, but I thought it might be useful to mention because you may not know about these tricks yet.
- Phil
Perl Download Mac Os X
Posted on 2007-01-03 16:47:32-08 by pedroparamo in response to 3921
Thanks Phil. Unfortunately I still can't get ExifTool to work.I think that it's either in the wrong place and/orI did not add it to my PATH correctly. My PATH is:
In my home directory--the initial directory which I am in whenI open a terminal session contains the following:
I'm not sure what the exiftool file in my home directory is for?If I change to my /usr/local/bin there is a folder called Image-ExifTool-6.66:
The Image-ExifTool-6.66 folder contains the following:
What is my ExifTool directory? (To clarify, my USERNAME is the loginname I use to login to my computer, right?)
I tried adding the exiftool directory to my path using the directory/Users/Peter/Desktop/Image-ExifTool-6.66 And that did not work.I also tried using the directory /Users/Peter/sbin/Image-ExifTool-6.66But that didn't work either.Can you tell what the problem is?
Php For Mac Os X
Thanks again for all your help and patience. Pedro
Posted on 2007-01-03 17:14:37-08 by exiftool in response to 3961
Hi Pedro,
Here are some answers for your questions:
1) The exiftool file in your home directory is extraneous and can be deleted.
Using Perl Mac Os X
2) Your USERNAME is the name you log in with, but my example was assuming that you had ExifTool in your Desktop directory (/Users/USERNAME/Desktop). But instead, your ExifTool directory is actually /usr/local/bin/Image-ExifTool-6.66
To set your PATH to include this directory, cut and paste the following in a Terminal window:
then open a new terminal window. Your PATH (given by 'printenv PATH') should then be:
So the last entry in your path is '/usr/local/bin/Image-ExifTool-6.66'.This is the directory that contains 'exiftool' and it's libraries.If this works, then you should be able to run exiftool by just typing 'exiftool'.
If you have any more questions, please email me (phil at owl.phy.queensu.ca).I don't think it would be useful for others to continue this discussion in the forum.
Thanks.
- Phil
(This article is based on a thread on the CPAN::Forum.)
Published on 2005-06-07
Perl Ide Mac Os X
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.