RE: [EXTERNAL] Re: cross platform question for PAR::Packer

2017-09-13 Thread Hou, Ying
Thanks for the clarification.

Ying

From: Roderich Schupp [mailto:roderich.sch...@gmail.com]
Sent: Wednesday, September 13, 2017 2:41 PM
To: Hou, Ying
Cc: par@perl.org
Subject: [EXTERNAL] Re: cross platform question for PAR::Packer


On Wed, Sep 13, 2017 at 7:50 PM, Hou, Ying 
<ying@va.gov<mailto:ying@va.gov>> wrote:
Thanks for your great help and I was able to install PAR::Packer which generate 
a standalone binary on Windows.
Since the binary is generated on Windows, it can only run on Windows where no 
Perl was installed.
Although it says “Cross platform”, it doesn’t mean the binary generated on 
Windows can be run on Linux/Unix.
Is it correct?


Yes.  Forget the "cross platform" stuff - it probably refers to the fact that a 
.par archive may contain XS Perl modules for different architectures or 
operating systems. But there's no support to build such a "fat" archive and the 
executables created by pp are architecture or OS specific in any case.

So in short: if you want to generate binaries for Windows and Linux, you must 
build them twice. Which also means that you first must have all the modules 
that your script needs in both worlds as well as PAR::Packer itself.

Cheers, Roderich


Re: cross platform question for PAR::Packer

2017-09-13 Thread Roderich Schupp
On Wed, Sep 13, 2017 at 7:50 PM, Hou, Ying  wrote:

> Thanks for your great help and I was able to install PAR::Packer which
> generate a standalone binary on Windows.
>
> Since the binary is generated on Windows, it can only run on Windows where
> no Perl was installed.
>
> Although it says “Cross platform”, it doesn’t mean the binary generated on
> Windows can be run on Linux/Unix.
>
> Is it correct?
>
>
>
Yes.  Forget the "cross platform" stuff - it probably refers to the fact
that a .par archive may contain XS Perl modules for different architectures
or operating systems. But there's no support to build such a "fat" archive
and the executables created by pp are architecture or OS specific in any
case.

So in short: if you want to generate binaries for Windows and Linux, you
must build them twice. Which also means that you first must have all the
modules that your script needs in both worlds as well as PAR::Packer
itself.

Cheers, Roderich