perl文件转化为exe文件的方法

来源:互联网 发布:大数据时代机遇 编辑:程序博客网 时间:2024/06/06 10:42

 

1. perlapp:简单、速度快,去下载破解的Active State Perl Dev Kit Pro,安装之后,就可以直接perlapp -f abc.pl生成exe文件了,-f是编译独立文件,使之可以在无perl环境下执行。

2. perlcc:不用下载其他软件,但是编译速度慢,另外需要其他dll文件。

首先运行Microsoft Visual Studio .NET 2003/Common7/Tools/vsvars32.bat设置一下环境变量,然后就可以运行 perlcc -o abc.exe abc.pl

生成exe后,可以用Microsoft Visual Studio .NET 2003/Common7/Tools/Bin/Depends.exe察看一下,那个exe需要什么库

一般编译好的exe需要三个dll:
kernel32.dll这个肯定每台机器都有
msvcr71.dll 这个是vs的库,操作系统如果旧,或装过的软件少,可能没有
perl58.dll 这个就不用说了,哈哈

3.PAR

http://par.perl.org/

[root@ns root]# pp -o rename rename.pl
pp -o sshnuke.exe sshnuke.pl # stand-alone executable!

都可以。
用CPAN很好装,
perl -MCPAN -e shell
cpan> install PAR

win32下或者用activestate的ppm
    C:/> ppm3
    # activestate was out of date compared to this one
    % rep add bribes http://www.bribes.org/perl/ppm
    # move it to first place on list of repositories
    % rep up bribes
    % rep up bribes
    % rep up bribes
    % install PAR

支持自动查找依赖模块.

4. perl2exe(还没用过:)

原创粉丝点击