in reply to Installing Modules in Windows
Hi.
This is a fantastic module, and it is very useful once you manage to get it to work! The only drawback (if you can call it that -- code reuse being a "Good Thing" after all) is that it has about 15 dependant modules which you must install before you get the privilege of actually using it. You don't *need* all of them, but I didn't want to risk not having a feature I might need, and then having to go through the installation headache again. ;-)
Currently, these module dependencies are:
MIME::Base64 Data::Buffer Math::Pari Compress::Zlib Crypt::DES_EDE3 (for 3DES) Crypt::IDEA (for IDEA) Crypt::Blowfish (for Blowfish) Crypt::Twofish (for Twofish) Crypt::Rijndael (for Rijndael) Crypt::CAST5_PP (for CAST5) Digest::MD5 (for MD5) Digest::SHA1 (for SHA-1) Crypt::RIPEMD160 (for RIPE-MD/160) Crypt::RSA (for RSA encryption/decryption and signatures) Crypt::DSA (for DSA signatures)
Normally, this would not be an issue, however it does mostly rely on crypto modules which aren't in the ActiveState ppm3 repository due to Canadian export restrictions on crypto software.
More info here: http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository
Many of the required modules can be found in Randy Kobes' PPM repository at http://theoryx5.uwinnipeg.ca/ppms.
Unfortunately, to get FULL support for all the features of this module, there is currently no alternative but to "Build It Yourself". I already have built some of the modules myself, but I don't really want to make my versions available, since they work for me on a specific version of Perl, but wouldn't necessarily work for anyone else. They weren't built using VC6, so they are very likely to simply crash Perl or just fail to load. YMMV.
To build them yourself, and if you don't have access to a Visual C compiler (which I'm assuming you don't, since why would you be looking for ppms otherwise), you need to do a few things. [Note: this approach worked for me to build the few missing modules I needed for Crypt::OpenPGP. I have found that this method works best when you are using pure XS (i.e. with all the C code distributed with the module), it is unlikely to work at all if the module relies on a shared or static library (.dll).]
perl Makefile.PL nmake nmake test nmake installThis module allows you to build ActiveState modules with MinGW more easily. Once this module is installed, open up C:\Perl\site\lib\Config_m.pm, and change the config line:
make='dmake'into:
make='nmake'ExtUtils::FakeConfig should now be ready for use.
perl -MConfig_m Makefile.PL nmake nmake test nmake installThis should work whether the module is XS or not.
@echo off set PERLDIR=C:\Perl set PPM=%PERLDIR%\bin\ppm3.bat echo * Installing prerequisites for Crypt::OpenPGP... echo * Adding theoryx5 to your list of PPM repositories call %PPM% rep add theoryx5 http://theoryx5.uwinnipeg.ca/ppms call %PPM% rep up 3 call %PPM% rep up 2 echo [Core Features] echo - Data::Buffer (from theoryx5) call %PPM% install Data-Buffer pause echo - MIME::Base64 (from theoryx5) echo Assuming that this is already here. Execute: echo %PPM% install MIME::Base64 echo if this is not the case. pause echo - Math::Pari (from theoryx5) call %PPM% install Math-Pari pause echo - Compress::Zlib (from theoryx5) call %PPM% install Compress-Zlib pause echo - LWP::UserAgent (from ActiveState) echo Assuming that this is already here. Execute: echo %PPM% install LWP echo if this is not the case. pause echo - URI::Escape (from ActiveState) echo Assuming that this is already here. Execute: echo %PPM% install URI-Escape echo if this is not the case. pause echo - Crypt::DSA (from theoryx5) call %PPM% install Crypt-DSA pause echo - Crypt::RSA (from theoryx5) call %PPM% install Crypt-RSA pause echo [PGP2 Compatibility (Minimum)] echo - Crypt::IDEA (from theoryx5) call %PPM% install Crypt-IDEA pause echo - Digest::MD5 (from ActiveState) echo Assuming that this is already here. Execute: echo %PPM% install Digest-MD5 echo if this is not the case. pause echo [PGP5 Compatibility (Minimum)] echo - Crypt::DES_EDE3 (from theoryx5) call %PPM% install Crypt-DES_EDE3 pause echo - Digest::SHA1 (from ActiveState) echo Assuming that this is already here. Execute: echo %PPM% install Digest-SHA1 echo if this is not the case. pause echo [GnuPG Compatibility (Minimum)] echo - Crypt::Rijndael (from theoryx5) call %PPM% install Crypt-Rijndael pause echo - Crypt::CAST5_PP (from local zip) echo Please unzip Crypt-CAST5_PP-1.02.zip into %PERLDIR% pause echo - Crypt::RIPEMD160 (from local zip) echo Please unzip Crypt-RIPEMD160-0.04.zip into %PERLDIR% pause echo [Support for all ciphers] echo - Crypt::IDEA (from theoryx5) echo Installed echo - Crypt::DES_EDE3 (from theoryx5) echo Installed echo - Crypt::CAST5_PP (from local zip) echo Installed echo - Crypt::Blowfish (from theoryx5) call %PPM% install Crypt-Blowfish pause echo - Crypt::Twofish (from local zip) echo Please unzip Crypt-Twofish-2.12.zip into %PERLDIR% pause echo - Crypt::Rijndael (from theoryx5) echo Installed echo [Support for all digests] echo - Digest::MD5 (from ActiveState) echo Installed echo - Digest::SHA1 (from ActiveState) echo Installed echo - Crypt::RIPEMD160 (from local zip) echo Installed echo [FINALLY] echo - Crypt::OpenPGP (from local zip) echo Please unzip Crypt-OpenPGP-1.03.zip into %PERLDIR% pause echo [Installation Completed]
After all this, you should be done! :-) Perhaps some kind soul with Visual C++ 6 (the same version as Perl is built with) would take pity, and build ppm version of the missing modules? Perl folk are a generous lot, so you never know...
Of course, after all this effort, you may like to ask yourself: why not just shell out to gpg.exe? ;-) I'll leave the answer to that to you...
I hope that this helps.
Cheers,
-- Dave :-)
$q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print
|
|---|