How to generate exe for your PERL script?,generateperl

來源:互聯網
上載者:User

How to generate exe for your PERL script?,generateperl

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.