in reply to Re: Re: Importing external dependencies into source
in thread Importing external dependencies into source
In your Perl source code you also have to add in commands to "include" the external dependent modules into your EXE at compile time.perl2exe -tiny /path/to/your/source/code/source.pl
For this example I'm importing GNU find.exe. The extra DLL's are required also by cygwin. If you run it without these DLL's compiled you get an error requesting you import them also. And yes the hash (#) at the beginning of the line is required.#perl2exe_bundle "C:\cygwin\bin\find.exe" #perl2exe_bundle "C:\cygwin\bin\cygwin1.dll" #perl2exe_bundle "C:\cygwin\bin\cygintl-1.dll" my $this_dir = $ENV{TEMP} || $ENV{TMP} || ($^O eq "MSWin32" ? $ENV{WIN +DIR} : '/tmp');
This will compile all the external dependencies into one exe, with a few extra dll's that are created because of the "-tiny" option. This is now fully portable to any other box, and doesn't require perl or cygwin installed. No more dependencies!!open( FIND, "$this_dir\\find . -type d -print0 |" ) or die "can't run find: $!";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Importing external dependencies into source
by iburrell (Chaplain) on Mar 05, 2004 at 18:54 UTC |