How to generate exe for your PERL script?

The way I am using is PAR Packer.

 

1.      Downloadmodule PAR Packer:

http://search.cpan.org/~rschupp/PAR-Packer-1.024/lib/PAR/Packer.pm

2.      InstallPAR Packer:

2.1 Unzipthe *.tar

2.2 Go tothe directory and run “perl Makefile,pl”, if you are using active perl, you mayget some error about you don’t have GCC compiler, you need to install migGW asmentioned in step3

3.      Downloadand Install MinGW: from website: http://www.mingw.org/

The version I used is: http://tdm-gcc.tdragon.net/download

3.1 Payattention if you already add the value path ” C:\MinGW\64\bin” in your systemVariables

3.2 Run gcc –v to see if it issuccessfully installed:

C:\Rebecca\script\perl>gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=C:/MinGW/64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.2/

Target: x86_64-w64-mingw32

Configured with: ../../../src/gcc-4.9.2/configure--build=x86_64-w64-mingw32

Thread model: posix

gcc version 4.9.2 (tdm64-1)

 

4.      Run perl Makefile.pl, you may get the followingerrors:

C:\Users\rebecca\Desktop\PAR-Packer-1.024>perlMakefile.pl

 

It looks like you don't have either nmake.exe ordmake.exe on your PATH,

so you will not be able to execute the commands froma Makefile.  You can

install dmake.exe with the Perl Package Manager byrunning:

 

ppm install dmake

                you need to install dmake assuggested, you can run “ppm install dmake”, but you may get the followingerrors:

C:\Rebecca\script\perl>ppm install dmake

Downloading ActiveState Package Repositorypacklist...redirect

Downloading ActiveState Package Repository packlist...failed401 Unauthorized

Syncing site PPM database with .packlists...done

Syncing perl PPM database with .packlists...done

Downloading dmake-4.11.20080107...redirect

Downloading dmake-4.11.20080107...failed 401 Unauthorized

ppm install failed: 401 Unauthorized

                Itis because the Active Perl you are using now is not business version, itdoesn’t support to install automatically online. You need to install itmanually by following step5

5.      Installdmake: http://search.cpan.org/dist/dmake/

According to the instruction in README.TXT:

So, to install it, just copy dmake.exe and the startupsubdirectory to some location on your path.

6.      Checkif you already have dmake successfully installed:

C:\Rebecca\script\perl>dmake -V

dmake - Version 4.12.2.2 (Windows / MS Visual C++)

Copyright (c) 1990,...,1997 by WTI Corp.

 

Default Configuration:

        MAXLINELENGTH := 32766

       MAXPROCESSLIMIT := 64

        .IMPORT.IGNORE: DMAKEROOT

        .MAKEFILES :makefile.mk makefile

        .SOURCE    : .NULL

        DMAKEROOT *=$(ABSMAKECMD:d)startup

        MAKESTARTUP :=$(DMAKEROOT)\startup.mk

 

Please read the NEWS file for the latest release notes.

7.      Go toPAR Packer directory:

perl Makefile.pl

dmake

dmake install

8.      Generatethe exe:

C:\Rebecca\script\perl>pp -o hello.exe hello.pl

 

9.      Done

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值