Thread

Posted on Wed Jun 6 17:56:37 2007 by jean
compiling Exitool
Hello How can i compile Exiftool under Windows with ActivePerl ?
Direct Responses: 5333 | Write a response
Posted on Wed Jun 6 18:37:07 2007 by exiftool in response to 5331
Re: compiling Exitool
You do not need to compile ExifTool to run it. If you have ActivePerl, all you need to do is extract the files from the full distribution. After doing this you can run exiftool directly or copy 'exiftool' and the 'lib' directory to another directory to run it from there.

Even the standalone version is not compiled -- it is just packaged with Perl and the necessary libraries.

- Phil
Direct Responses: 5343 | 5344 | Write a response
Posted on Thu Jun 7 11:00:27 2007 by jean in response to 5333
Re: compiling Exitool
Thanks for clarifying this, Phil. I know that i can use Exiftool without compiling it. I want to make two or three small adds to some perl files then create an exe and copy this exe to a PC without ActivePerl. I tried to compile the .pm but i'm not a Perl specialist :-(
Write a response
Posted on Thu Jun 7 11:12:14 2007 by jean in response to 5333
Re: compiling Exitool
Thanks for clarifying this, Phil. I know that i can use Exiftool without compiling it. I want to make two or three small adds to some perl files then create an exe and copy this exe to a PC without ActivePerl. I tried to compile the .pm but i'm not a Perl specialist :-(
Direct Responses: 5346 | Write a response
Posted on Thu Jun 7 14:15:36 2007 by exiftool in response to 5344
Re: compiling Exitool
Ah, OK. I use PAR with the following arguments file to build the executable for Windows. This produces an executable package as I said, and doesn't actually compile anything:

#------------------------------------------------------------------------------ # File: pp_build_exe.args # # Description: Arguments for building stand-along Windows executable # # Revisions: 2006-11-22 - P. Harvey Created # # Requires: The PAR (Perl Archive) module must be installed # # Checklist: 1) Build tag lookup: "./build_tag_lookup". # 2) Set exiftool version number in "-T" line below. # 3) Add any new modules to the list below. # 4) Make sure "windows_exiftool" is up to date. # 5) Back up "exiftool" and "cp windows_exiftool exiftool". # 6) In a "cmd.exe" window, type "pp @pp_build_exe.args". # 7) Change back to Unix shell and restore original "exiftool". # 8) Rename "exiftool.exe" to "exiftool(-k).exe". # 9) Create a .zip archive: "zip exiftool-#.##.zip exiftool\(-k\).exe". # 10) Copy zip archive to web servers. # 11) Update zip file version in link and text of html/index.html. #------------------------------------------------------------------------------ -T exiftool-6.91 -o exiftool.exe -I lib -M Image::ExifTool::AFCP -M Image::ExifTool::AIFF -M Image::ExifTool::APE -M Image::ExifTool::APP12 -M Image::ExifTool::ASF -M Image::ExifTool::BMP -M Image::ExifTool::BuildTagLookup -M Image::ExifTool::Canon -M Image::ExifTool::CanonCustom -M Image::ExifTool::CanonRaw -M Image::ExifTool::CanonVRD -M Image::ExifTool::Casio -M Image::ExifTool::DICOM -M Image::ExifTool::DNG -M Image::ExifTool::Exif -M Image::ExifTool::Fixup -M Image::ExifTool::FLAC -M Image::ExifTool::Flash -M Image::ExifTool::FlashPix -M Image::ExifTool::FotoStation -M Image::ExifTool::FujiFilm -M Image::ExifTool::GeoTiff -M Image::ExifTool::GIF -M Image::ExifTool::GPS -M Image::ExifTool::HP -M Image::ExifTool::HTML -M Image::ExifTool::HtmlDump -M Image::ExifTool::ICC_Profile -M Image::ExifTool::ID3 -M Image::ExifTool::IPTC -M Image::ExifTool::JPEG -M Image::ExifTool::Jpeg2000 -M Image::ExifTool::JVC -M Image::ExifTool::Kodak -M Image::ExifTool::KyoceraRaw -M Image::ExifTool::Leaf -M Image::ExifTool::MakerNotes -M Image::ExifTool::MIE -M Image::ExifTool::MIFF -M Image::ExifTool::Minolta -M Image::ExifTool::MinoltaRaw -M Image::ExifTool::MNG -M Image::ExifTool::MPC -M Image::ExifTool::MPEG -M Image::ExifTool::Nikon -M Image::ExifTool::NikonCapture -M Image::ExifTool::Olympus -M Image::ExifTool::Panasonic -M Image::ExifTool::PDF -M Image::ExifTool::Pentax -M Image::ExifTool::PhotoMechanic -M Image::ExifTool::Photoshop -M Image::ExifTool::PICT -M Image::ExifTool::PNG -M Image::ExifTool::PostScript -M Image::ExifTool::PPM -M Image::ExifTool::PrintIM -M Image::ExifTool::QuickTime -M Image::ExifTool::Real -M Image::ExifTool::Ricoh -M Image::ExifTool::RIFF -M Image::ExifTool::Sanyo -M Image::ExifTool::Shortcuts -M Image::ExifTool::Sigma -M Image::ExifTool::SigmaRaw -M Image::ExifTool::Sony -M Image::ExifTool::TagLookup -M Image::ExifTool::Unknown -M Image::ExifTool::Vorbis -M Image::ExifTool::XMP -M Image::File::RandomAccess -M Image/ExifTool/Shift.pl -M Image/ExifTool/WriteCanonRaw.pl -M Image/ExifTool/WriteExif.pl -M Image/ExifTool/WriteID3.pl -M Image/ExifTool/WriteIPTC.pl -M Image/ExifTool/WritePhotoshop.pl -M Image/ExifTool/WritePNG.pl -M Image/ExifTool/WritePostScript.pl -M Image/ExifTool/Writer.pl -M Image/ExifTool/WriteXMP.pl exiftool

- Phil
Direct Responses: 5347 | Write a response
Posted on Thu Jun 7 14:33:02 2007 by exiftool in response to 5346
Re: compiling Exitool
I should mention one thing: You may notice in my checklist that I am using a different "exiftool" file for the Windows executable. There are 2 differences between this and the normal version: 1) The help text is displayed using a different technique, and 2) the windows version allows arguments to be embedded in the file name. So these will change if you build a .exe with the regular "exiftool". If you want to use the Windows version of the "exiftool" script, you should be able to find it in your temporary directory after running the Windows executable.

- Phil
Direct Responses: 5349 | 5350 | Write a response
Posted on Thu Jun 7 16:24:00 2007 by jean in response to 5347
Re: compiling Exitool
Thank you Phil. I installed PAR and i'm trying to 'compile'.
Write a response
Posted on Thu Jun 7 17:14:44 2007 by jean in response to 5347
Re: compiling Exitool
Thank you Phil. I installed PAR and i'm trying to 'compile'.
Direct Responses: 5351 | Write a response
Posted on Thu Jun 7 17:30:17 2007 by jean in response to 5350
Re: compiling Exitool
I installed PAR-Packer 0.975 When i use pp, it does the job but creates a file named a.exe (i did not modify pp_build_exe.args) When i launch this a.exe i get the following error message: syntax error at script/pp_build_exe.args line 23, near "-o " arghhhh
Direct Responses: 5354 | Write a response
Posted on Thu Jun 7 22:34:18 2007 by exiftool in response to 5351
Re: compiling Exitool
Sorry, I don't have my Windows system here so I can't tell what version of PAR I am using. But I would guess this could be the problem. Check your pp options to see if -o is valid. If so, look at the argfile -- maybe the linefeeds got changed to the wrong type (or some other format error) when you cut and pasted.

- Phil
Direct Responses: 5356 | Write a response
Posted on Fri Jun 8 00:54:12 2007 by exiftool in response to 5354
Re: compiling Exitool
OK. I'm on my PC now. I'm using PAR 0.94 with pp 0.12.

Use "pp -h" to see the pp options. I would be very surprised if they changed -o, but better make sure. If -o is OK, then the problem must be syntax in the argfile.

- Phil
Direct Responses: 5359 | 5360 | 5361 | Write a response
Posted on Fri Jun 8 08:22:52 2007 by jean in response to 5356
Re: compiling Exitool
Under the DOS shell, in the Perl directory, i entered "pp -h" but no documentation was found. there is a file named packer.pm that seems to describe these options and, yes, the -o always exists but T seems to be used to give the 'Temp cache name' (please note that i am a newbie in Perl) so i removed the line -T, included a linefeed after -o exiftool.exe (to see if the \r\n could create a problem). a file named 'a.exe' is created and the error message, when i launch a.exe is now: syntax error at script/pp_build_exe.args line 25, near "Image::ExifTool::ADCP -M "
Write a response
Posted on Fri Jun 8 08:30:54 2007 by jean in response to 5356
Re: compiling Exitool
Under the DOS shell, in the Perl directory, i entered "pp -h" but no documentation was found. there is a file named packer.pm that seems to describe these options and, yes, the -o always exists but T seems to be used to give the 'Temp cache name' (please note that i am a newbie in Perl) so i removed the line -T, included a linefeed after -o exiftool.exe (to see if the \r\n could create a problem). a file named 'a.exe' is created and the error message, when i launch a.exe is now: syntax error at script/pp_build_exe.args line 25, near "Image::ExifTool::ADCP -M "
Write a response
Posted on Fri Jun 8 08:37:32 2007 by jean in response to 5356
Re: compiling Exitool
Under the DOS shell, in the Perl directory, i entered "pp -h" but no documentation was found. there is a file named packer.pm that seems to describe these options and, yes, the -o always exists but T seems to be used to give the 'Temp cache name' (please note that i am a newbie in Perl) so i removed the line -T, included a linefeed after -o exiftool.exe (to see if the \r\n could create a problem). a file named 'a.exe' is created and the error message, when i launch a.exe is now: syntax error at script/pp_build_exe.args line 25, near "Image::ExifTool::ADCP -M "
Direct Responses: 5365 | Write a response
Posted on Fri Jun 8 14:27:45 2007 by exiftool in response to 5361
Re: compiling Exitool
Yes, -T is for the temporary cache directory name. I use the version number in the cache directory name or else the same cache files will be used if you try to upgrade to a new version.

It sounds like there is a problem with the "@argfile" handling. Your command is "pp @pp_build_exe.args"? This should load the arguments from the file "pp_build_exe.args", but it may not be doing this for your version of pp because it sounds like it is trying to run your argfile as a Perl script. Maybe try entering all of the arguments on the command line instead of using "@pp_build_exe.args" to load them from file.

- Phil
Direct Responses: 5367 | Write a response
Posted on Fri Jun 8 16:05:21 2007 by jean in response to 5365
Re: compiling Exitool
yes, i call pp @pp_build_exe.args i get the following error: Cannot open: No such file or directory at c:/Perl/site/lib/Module/ScanDeps.pm line 496 when i remove the line: -M Image::File::RandomAccess i get exiftool.exe, 3 529 850 bytes, it works fine it seems that something is wrong with the RandomAccess module ? do you know why the .exe is so big ? (yours is 2 851 142 bytes)
Direct Responses: 5368 | Write a response
Posted on Fri Jun 8 16:26:37 2007 by exiftool in response to 5367
Re: compiling Exitool
ScanDeps.pm sounds like something that is supposed to scan a Perl source file for dependencies. I don't have any ideas about why this doesn't work with "-M Image::File::RandomAccess", but this line is likely unnecessary anyway since the automatic dependency scanning should find this one. (Most of the other modules are loaded dynamically, so I don't trust the automatic dependency logic for these. And just for completeness I added -M options for all modules to be safe.)

Take a look at the unpacked files in the temporary directory after running your version to see why it is larger. My guess is that either some included standard library modules are larger, or your version includes library modules that mine doesn't.

- Phil
Direct Responses: 5382 | Write a response
Posted on Sat Jun 9 10:12:52 2007 by jean in response to 5368
Re: compiling Exitool
Hello Phil In my exe all the .pm seem to be embedded (DICOM.pm, XMP.pm etc) In your exe they are not
Direct Responses: 5383 | Write a response
Posted on Sat Jun 9 13:41:26 2007 by exiftool in response to 5382
Re: compiling Exitool
I assure you, they are embedded in my exe. Otherwise it wouldn't work very well. But it seems they are embedded differently somehow. I'm not a PAR expert so I don't know about details like this. I use it, and it works for me, so I haven't found the need to look at it in much detail.

- Phil
Write a response