C:\TEMP> mkdir tmp
C:\TEMP> echo blah >> tmp\a.txt
C:\TEMP> echo blah blah >> tmp\a.txt
C:\TEMP> echo blah blah blah >> tmp\a.txt
C:\TEMP> pp -o hello.exe -a tmp -e "use File::Spec; BEGIN { if(exists $ENV{PAR_TEMP}) { my $d = File::Spec->catfile($ENV{PAR_TEMP}, 'inc'); chdir
$d or die qq(chdir '$d' failed: $!); }; }; open my $fh, '<', 'tmp/a.txt' or die qq(tmp/a.txt: $!); foreach (<$fh>) { print qq(a: $_); }"
C:\TEMP> cd ..
C:\> TEMP\hello.exe
a: blah
a: blah blah
a: blah blah blah
####
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -I"C:\usr\local\apps\strawberry\perl\lib\CORE" -DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.036\" -s -O2 boot.c
In file included from mktmpdir.h:85:0,
from mktmpdir.c:1,
from boot.c:10:
sha1.c: In function 'sha_transform':
sha1.c:146:2: warning: right shift count >= width of type
T >>= 32;
^
####
cpanm --installdeps pp &rem need to make sure all prereqs are in the non-locallib before starting the locallib installation
start cpanm -L .\locallib --look pp &rem will put the `--look` shell in locallib mode
copy some_other_icon.ico myldr\winres\pp.ico &rem update the icon; won't necessarily show updated icon in Explorer.exe unless you run SHChangeNotify†
cpanm --notest . &rem from same shell, so inherits the locallib from `--look`
exit &rem leaves the `--look` shell
####
setlocal
PATH=c:\path\to\locallib\bin;%PATH% &rem PATH=%~do0locallib\bin;%PATH% &rem ... the second works in a .bat/.cmd
set PERL5LIB=C:\path\to\locallib\lib\perl5 &rem set PERL5LIB=%~dp0locallib\lib\perl5 &rem ... the second works in a .bat/.cmd
pp -x -o out.exe in.pl &rem see longer version, below
####
pp --gui -M ... --link=c:.../strawberry/c/bin/libexpat-1__.dll -x -a myIcoin.ico -o out.exe in.pl
^^^^^^^^^^^^^^ = use -a for embedding icons and other resources
^^ = -x means get dependency from `perl in.pl`; -c means from `perl -c in.pl`
^^^^^^^^ = may need to manually link DLLs; can use procexp when the `perl in.pl` is running to see all the libraries
^^^^^^^^^^^^^ = if `in.pl` uses other modules, modules used by those might not always be incorporated, so use one or more -M to ensure they get included
^^^^^ = do not include a console window in win32 executables