ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:05 AM

Title: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-06 14:56:37-07]

Hello
How can i compile Exiftool under Windows with ActivePerl ?
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-06 15:37:07-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-07 08:00:27-07]

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 :-(
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-07 08:12:14-07]

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 :-(
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-07 11:15:36-07]

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:

Code:
#------------------------------------------------------------------------------
# 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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-07 11:33:02-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-07 13:24:00-07]

Thank you Phil.
I installed PAR and i'm trying to 'compile'.
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-07 14:14:44-07]

Thank you Phil.
I installed PAR and i'm trying to 'compile'.
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-07 14:30:17-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-07 19:34:18-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-07 21:54:12-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-08 05:22:52-07]

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 "
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-08 05:30:54-07]

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 "
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-08 05:37:32-07]

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 "
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-08 11:27:45-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-08 13:05:21-07]

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)
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-08 13:26:37-07]

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
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by jean on 2007-06-09 07:12:52-07]

Hello Phil
In my exe all the .pm seem to be embedded (DICOM.pm, XMP.pm etc)
In your exe they are not
Title: Re: compiling Exitool
Post by: Archive on May 12, 2010, 08:54:05 AM
[Originally posted by exiftool on 2007-06-09 10:41:26-07]

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