Forum Discussion

jajamax_127538's avatar
jajamax_127538
Icon for Nimbostratus rankNimbostratus
Jan 20, 2004

Perl to .exe

I need to provide one of my scripts to a group that needs not have access to root user and password. I've tried using perl2exe put it doesn't seem to pick up the Crypt::SSLeay module. Anyone know how I can create an .exe from a .pl? The script I'm trying to work with is the LocalNode.pl...

4 Replies

  • Which platform are you developing on? Also, which version of perl2exe are you using? I haven't had any experience converting our sample code to standalone executables so if you pass along your specifics, I'll see if I can get things working. Crypt::SSLeay uses a shared library and relies on openssl's shared library. There may be a problem with the migration of the reliant shared objects.

     

     

    -Joe
  • I'm running activestate perl 5.8 on an xp box using the latest version of perl2exe. The problem seems to be in the ssleay.dll. The error message is"501 Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) at C:\Perl\2varsA.exe line 113" 2VarsA is the locallbnode.pl renamed.
  • Now for the final piece...

    Try adding the following lines to your script.

     
     perl2exe_bundle "c:\perl\bin\ssleay32.dll"; 
     perl2exe_bundle "c:\perl\bin\libeay32.dll"; 
     

    Replace "c:\perl\bin" with the location of your perl binaries directory. The perl2exe_bundle directive, causes the modules to be included in the compiled executable and extracted at runtime. The manual documents this.

    Let me know if this works out for you.

    -Joe
  • A quick update. I've got sample code compiled and running on my dev machine. I had to add the following lines to the top of the script.

     

     

    use Crypt::SSLeay; 
     use SOAP::Transport::HTTP; 
     use LWP::UserAgent; 
     use URI::https; 
     use Carp::Heavy; 
     use LWP::Protocol::https; 
     use LWP::Authen::Basic; 
     

     

     

    In the perl2exe manual(http://www.indigostar.com/pxman.htm), I found a runtime flag that helped out. When you run the executable, if you add '-p2x_test' before any other arguments, missing module information is presented. I still get a warning at compile time, but the executable is created and works.

     

     

    The error you presented for "... (Crypt::SSLeay not installed)" is something I'll look into. You might have to use the perl2exe_bundle filename directive discussed in their manual to bundle additional dll's needed when deploying to other machines. I'll try to verify this for you.

     

     

    -Joe