https://wiki.panotools.org/api.php?action=feedcontributions&user=Tonyguards&feedformat=atomPanoTools.org Wiki - User contributions [en]2024-03-29T02:33:47ZUser contributionsMediaWiki 1.35.3https://wiki.panotools.org/index.php?title=Install_Panotools-Script_on_Windows&diff=14526Install Panotools-Script on Windows2012-12-18T06:54:12Z<p>Tonyguards: </p>
<hr />
<div>'''Panotools::Script''' is a framework for scripting various panorama<br />
operations using the command-line tools shipped with [[hugin]], it has some<br />
[http://search.cpan.org/dist/Panotools-Script/ Documentation on CPAN].<br />
<br />
== Simplified Method ==<br />
=== Install Panotools::Script ===<br />
#Install required software:<br />
#* Install Strawberry Perl from http://strawberryperl.com/.<br />
#* Install ImageMagick (Win32 dynamic at 16 bits-per-pixel) from http://www.imagemagick.org/script/binary-releases.php.<br />
#Install Perl scripts:<br />
#* Open: Start Menu -> Strawberry Perl -> Tools -> CPAN Client<br />
#* Run the following commands:<br />
#*:<pre><br />
#*:notest install Panotools::Script Image::Magick<br />
#*:exit<br />
#*:</pre><br />
<br />
The latest version of '''Panotools::Script''' should now be installed. These packages will work fine on the computer on which they were built, but .exe tools may be desired in order to run on computers without Perl installed.<br />
<br />
=== Build .exe Tools (Optional) ===<br />
#Install required Perl scripts:<br />
#* Open: Start Menu -> Strawberry Perl -> Tools -> CPAN Client<br />
#* Run the following commands:<br />
#*:<pre><br />
#*:notest install PAR::Packer<br />
#*:exit<br />
#*:</pre><br />
#Build .exe tools:<br />
#* Open: Start Menu -> Strawberry Perl -> Perl (Command Line)<br />
#* Change directory to install directory:<br />
#*:<pre><br />
#*:cd <STRAWBERRY-PERL-HOME>\perl\site\bin<br />
#*:</pre><br />
#* Build desired .exe tools (replace <PACKAGE> with name of package):<br />
#*:<pre><br />
#*:pp -o <PACKAGE>.exe <PACKAGE><br />
#*:</pre><br />
<br />
== Perl ==<br />
<br />
'''Panotools::Script''' is a ''Perl module'', so for Windows you need to<br />
[http://www.activestate.com/store/activeperl/download/ download and install ActiveState Perl]<br />
first, I got the MSI installer for ActivePerl-5.8.8.822.<br />
<br />
For some reason, the installer doesn't set the PATH correctly for manually<br />
built modules, so go to '''Explorer''' -> '''My Computer''' -> '''right-click'''<br />
-> '''Properties''' -> '''Advanced''' -> '''Environment Variables''' -><br />
'''System variables'''. Scroll to '''Path''', click '''edit''', and add this path<br />
to the front of the existing list of paths:<br />
<br />
C:\Perl\site\bin; <br />
<br />
=== Image::ExifTool, Image::Size and Module::Build ===<br />
<br />
You need three extra ''modules'' that are not installed by default. So in the Activestate<br />
part of the ''Start menu'', run the Perl Package Manager (PPM). This can be used to<br />
install pre-built add-on modules, in this case you want to install ''Image-ExifTool'', ''Image-Size''<br />
and ''Module-Build''. Reboot after installing Module-Build, remember this ''is'' windows.<br />
<br />
== ImageMagick ==<br />
<br />
[[ImageMagick]] is a general purpose command-line image manipulation suite,<br />
'''Panotools::Script''' uses it for various purposes such as resizing and playing<br />
with alpha channels. I downloaded the ''Win32 dynamic at 16 bits-per-pixel'' version<br />
[http://www.imagemagick.org/script/binary-releases.php#windows from the ImageMagick site].<br />
<br />
== hugin ==<br />
<br />
Install [[hugin]] from the<br />
[http://sourceforge.net/project/showfiles.php?group_id=77506 sourceforge download area]<br />
if you haven't already. You need to fix the PATH again, add the hugin installation<br />
location the same as you did for ''Perl'' above:<br />
<br />
C:\Program Files\hugin\bin;<br />
<br />
== autotrace ==<br />
<br />
Autotrace is a tool for converting bitmap images to vector graphics, only<br />
install this if you plan on editing enblend masks in [http://inkscape.org/ Inkscape].<br />
<br />
[http://autotrace.sourceforge.net/index.html#download Download autotrace from here].<br />
You need to manually extract and install this one, put the folder containing<br />
the various DLLs and EXE files somewhere like '''C:\Program Files\autotrace''' and<br />
add this to your PATH as you did for Perl and hugin.<br />
<br />
== Panotools::Script ==<br />
<br />
[http://search.cpan.org/dist/Panotools-Script/ Download the latest source-code for Panotools::Script].<br />
This is a ''gzipped tar archive'', so you will need something like<br />
[http://www.7-zip.org/ 7-zip] to extract it.<br />
<br />
=== Download nmake ===<br />
<br />
''make'' is required to build and install Perl modules, [http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe download nmake from Microsoft]<br />
and double-click it to extract. Copy NMAKE.EXE and NMAKE.ERR to the directory where you extracted the<br />
'''Panotools::Script''' sources.<br />
<br />
=== Test and install ===<br />
<br />
Open a ''command window'': Click '''Start''' -> '''Run...''' -> '''cmd''' -> '''OK'''.<br />
<br />
Change to the directory where you extracted the sources:<br />
<br />
cd Desktop\Panotools-Script-0.09<br />
<br />
Then run the tests:<br />
<br />
perl Makefile.PL<br />
nmake test<br />
<br />
The tests will produce lots of output and warnings, but at the end it should<br />
report 100% success. Finally install everything:<br />
<br />
nmake install<br />
<br />
== Creating .exe tools ==<br />
<br />
This step isn't necessary if you have perl installed, but may be useful to make the tools<br />
usable on systems without perl. The right tool for this is PAR::Packer, I couldn't get it<br />
to work with this version of perl (please update this HOWTO if you know), so I installed<br />
''App-Packer'' using Perl Package Manager (PPM).<br />
<br />
If you are lucky then you can just create the .exe files with the ''make_exe.pl'' script:<br />
<br />
perl bin\make_exe.pl<br />
<br />
I wasn't so lucky and had an error from a standard perl module ''bytes_heavy.pl'', which<br />
I fixed by pasting this code into ''C:\Perl\lib\bytes_heavy.pl''<br />
<br />
<source lang="pl"><br />
sub import {<br />
return unless $Have_Bytes;<br />
shift;<br />
unshift @_, 'bytes';<br />
goto &bytes::import;<br />
}<br />
</source><br />
<br />
Finally, you should be able to run the resulting .exe files on other<br />
Windows systems, though you will also need the copy the ''perl58.dll''<br />
file to the same destination.<br />
<br />
== Infrastructure to build the .exe tools - the new way ==<br />
<br />
this is highly experimental. it has been tested on PAR::Packer 0.980 released May 14, 2008. Works for 0.982 / July 29, 2008 as well.<br />
<br />
# Install MinGW - MSVC 2008 EE is not supported<br />
#* Download MinGW-5.1.4.exe from http://www.mingw.org/<br />
#* Follow default install, but add g++ to the mix, i.e. just click "Next" as often as needed, but on the screen where you can tick boxes to choose what to install, check the box with g++ (and leave anything else as is. It will be installed in C:\MinGW<br />
#* Run the now installed C:\MinGW\MinGW-5.1.4.exe to ensure you get the latest updates.<br />
# Install ActiveState Perl 5.10.0 build 1002 (other versions may also work, this is the one that worked for me)<br />
# start the Perl Package Manager (PPM), search and install the following packages<br />
#* Getopt-ArgvFile (>=1.07)<br />
#* Module-ScanDeps (>=0.78)<br />
#* PAR-Dist (>=0.22)<br />
#* Parse-Binary (>=0.10)<br />
# Download dmake from http://search.cpan.org/dist/dmake/<br />
# Extract dmake to C:\MinGW so that you have a folder called C:\MinGW\dmake <br />
# Make yourself an environment batch file, call it perl.bat, with the following content:<br />
#:<pre><br />
#:set MINGW_PATH=C:\MinGW<br />
#:set PERL_PATH=C:\Perl<br />
#:set PATH=%MINGW_PATH%\bin;%MINGW_PATH%\mingw32\bin;%MINGW_PATH%\dmake;<br />
#:set PATH=%PATH%C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;<br />
#:set LIB=%MINGW_PATH%\lib;<br />
#:set INCLUDE=%MINGW_PATH%\include;<br />
#:set PATH=%PERL_PATH%\site\bin;%PERL_PATH%\bin;%PATH%<br />
#:cmd /K<br />
#:</pre><br />
# install manually Win32-exe, Par and Par-Packer.<br />
#* get them from:<br />
#** [http://search.cpan.org/~smueller/PAR-Packer-0.980/lib/PAR/Packer.pm PAR-packer]<br />
#** [http://search.cpan.org/~smueller/Win32-Exe-0.11/lib/Win32/Exe.pm Win-Exe]<br />
#** [http://search.cpan.org/~smueller/PAR-1.002/lib/PAR.pm PAR]<br />
#* extract them to a temporary folder<br />
#* doubleclick on perl.bat to start a CLI<br />
#* in the CLI, run the following commands<br />
#*:<pre><br />
#*: > perl Makefile.PL<br />
#*: > dmake<br />
#*: > dmake test<br />
#*: > dmake install<br />
#*:</pre><br />
# test your installation<br />
#* create a file test.pl with the following content:<br />
#*:<pre><br />
#*: #!/usr/bin/perl<br />
#*: print "hello world!\n";<br />
#*:</pre><br />
#* in the CLI, check it works<br />
#*:<pre><br />
#*: perl test.pl<br />
#*:</pre><br />
#* compile it<br />
#*:<pre><br />
#*: pp -o test.exe test.pl<br />
#*:</pre><br />
#* test it<br />
#*:<pre><br />
#*: test.exe<br />
#*:</pre><br />
#<strong>contribute back!</strong> If you have come so far, it is because volunteers have helped you. Those volunteers need your help in turn.<br />
#* Subscribe to the PAR::Packer [http://lists.cpan.org/showlist.cgi?name=par mailing list]. <br />
#* From time to time there will be a request like [http://www.nntp.perl.org/group/perl.par/2008/07/msg3649.html this] one.<br />
#* when you see the request, download the latest packages and repeat the above step 7.<br />
#* when processing the PAR-packer temporary folder, after dmake test, issue a<br />
#*:<pre><br />
#*: dmake par<br />
#*:</pre><br />
#* In the temporary folder there should now be a file named '''PAR-Packer-0.980-MSWin32-x86-multi-thread-5.10.0.par''' or something similar. Upload that file somewhere and announce it to the mailing list.<br />
#* if you want to intall the latest PAR-Packer, continue with dmake install.<br />
#* Click [http://adrian-fh98.web.unair.ac.id here] for info.<br />
<br />
The perl58.dll is no longer required.<br />
<br />
<small><br />
[[User:Yuval|Yuval]] 23:09, 15 May 2008 (CEST) with help from Mark Dootson and the PAR::Packer community<br />
</small><br />
<br />
[[Category:Tutorial:Nice to know]]</div>Tonyguards