Antwort: [rt.cpan.org #143646] Problem using Win32::TieRegistry in script packed with pp on Windows
"Torsten.Werner via RT" <[email protected]> Mon, 04 Jul 2022 10:04:59 -0400
| Newsgroups | gmane.comp.lang.perl.par |
|---|---|
| Message-ID | <[email protected]> |
Mon Jul 04 10:04:59 2022: Request 143646 was acted upon. Transaction: Correspondence added by [email protected] Queue: PAR-Packer Subject: Antwort: [rt.cpan.org #143646] Problem using Win32::TieRegist= ry in script packed with pp on Windows Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: [email protected] Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=3D143646 > Hi Roderich, You ask for the installation method. Tests are included and successfully=20 finished. We use a small script to prepare our perl environment. For Par::Packer we=20 need a different icon. I replace pp.ico with my own one just before I=20 compile the module.=20 This results in the following process: require Win32::Unicode; require CPANPLUS; my $cb =3D CPANPLUS::Backend->new; my $conf =3D $cb->configure_object; my $module =3D $cb->module_tree('pp'); my $file=3D$module->fetch(); my $path=3D$module->extract(); Win32::Unicode::chdirW($path); my=20 $source=3Dsprintf("%s\\Resources\\assyst.ico",$Cwd); my=20 $target=3Dsprintf("%s\\myldr\\winres\\pp.ico",$path); unless(Win32::Unicode::unlinkW($target)) { print STDERR "Error deleting '$target':=20 $^E\n"; exit 1; }; unless (Win32::Unicode::copyW($source,$target)) { print STDERR "Error copying '$source' ->=20 '$target': $^E\n"; exit 1; } print "$target replaced\n"; my $icon=3Dsprintf("%s\\lib\\PAR\\pp.ico",$path); unless (Win32::Unicode::copyW($source,$icon)) { print STDERR "Error copying '$source' ->=20 '$icon': $^E\n"; exit 1; } print "$icon as patch flag created. It is not used= =20 for builds, it is a simple flag\n"; foreach $target (qw(init prepare create test=20 install)) { my $result=3D$module->install(target =3D>=20 $target, force =3D> 1); print "Result of $target:=20 ",Dumper($result); return 0 unless $result; } return 1; I repeated the process to get the actual version of Par::Packer. Now I=20 made the tests with PAR-Packer-1.055.tar.gz. The result is the same.=20 I append the output of build process, it is too much to copy & paste.=20 Tests are made and successfully finished. Here the output of unzip -l regtest.exe Archive: regtest.exe Length Date Time Name --------- ---------- ----- ---- 0 2022-07-04 15:56 lib/ 0 2022-07-04 15:56 script/ 831 2022-07-04 15:56 MANIFEST 219 2022-07-04 15:56 META.yml 25400 2022-07-04 15:56 lib/Carp.pm 3334 2022-07-04 15:56 lib/Config.pm 421 2021-01-24 16:01 lib/Config_git.pl 39917 2021-12-13 16:26 lib/Config_heavy.pl 10845 2022-07-04 15:56 lib/DynaLoader.pm 2380 2022-07-04 15:56 lib/Exporter.pm 6426 2022-07-04 15:56 lib/Exporter/Heavy.pm 1620 2022-07-04 15:56 lib/File/Glob.pm 2048 2022-07-04 15:56 lib/Tie/Hash.pm 48640 2022-07-04 15:56 lib/Win32/TieRegistry.pm 8683 2022-07-04 15:56 lib/Win32API/Registry.pm 3737 2015-02-14 13:13 lib/Win32API/Registry/cRegistry.pc 4084 2022-07-04 15:56 lib/XSLoader.pm 30208 2021-01-24 16:03 lib/auto/File/Glob/Glob.xs.dll 158208 2021-01-24 16:45 lib/auto/Win32API/Registry/Registry.xs.dll 1616 2022-07-04 15:56 lib/strict.pm 1157 2022-07-04 15:56 lib/vars.pm 26266 2022-07-04 15:56 lib/warnings.pm 497 2022-07-04 15:56 lib/warnings/register.pm 690 2022-07-04 15:56 script/main.pl 714 2022-07-04 15:56 script/regtest.pl --------- ------- 377941 25 files Here the whole output of installation: Install PAR::Packer C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\myldr\w= inres\pp.ico=20 replaced C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\lib\PAR= \pp.ico=20 as patch flag created. It is not used for builds, it is a simple flag =3D=3D> MISSING Signature file! <=3D=3D Result of init: $VAR1 =3D 1; =3D=3D> MISSING Signature file! <=3D=3D Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe=20 -MCPANPLUS::Internals::Utils::Autoflush=20 C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefil= e.PL]... Checking if your kit is complete... Looks good Subroutine MY::postamble redefined at ./Makefile.PL line 232. # using "objdump" recursively to find DLLs needed by par.exe Generating a gmake-style Makefile Writing Makefile for PAR::Packer Writing MYMETA.yml and MYMETA.json Result of prepare: $VAR1 =3D 1; =3D=3D> MISSING Signature file! <=3D=3D Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe=20 -MCPANPLUS::Internals::Utils::Autoflush=20 C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefil= e.PL]... Subroutine MY::postamble redefined at ./Makefile.PL line 232. # using "objdump" recursively to find DLLs needed by par.exe Generating a gmake-style Makefile Writing Makefile for PAR::Packer Writing MYMETA.yml and MYMETA.json Running [C:\STRAWB~1\c\bin\gmake.EXE test]... gmake[1]: Entering directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' Makefile:868: warning: overriding recipe for target '.c.o' Makefile:340: warning: ignoring old recipe for target '.c.o' gmake[1]: Leaving directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' gmake[1]: Entering directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' Makefile:868: warning: overriding recipe for target '.c.o' Makefile:340: warning: ignoring old recipe for target '.c.o' No tests defined for myldr extension. gmake[1]: Leaving directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' "C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe" "-MExtUtils::Command::MM"=20 "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,=20 'blib\lib', 'blib\arch')" t/*.t t/00-pod.t ............... skipped: Set environment variable=20 PERL_TEST_POD=3D1 to test POD t/10-parl-generation.t ... ok C:\Users\Torsten\AppData\Local\Temp\VVvEketgtF syntax OK t/20-pp.t ................ ok # Please wait t/30-current_exec.t ...... ok t/40-packer_cd_option.t .. ok t/80-doublecolon.t ....... ok t/85-crt-glob.t .......... ok t/85-myfile.t ............ ok t/90-gh41.t .............. skipped: Test temporarily disabled # PAR_TEMP =3D=20 C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\par-546f727374656e\cache-aef= f5e174cffb8156f9ff1f687ffcee6ddab915f # running C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\packed.exe a=20 second time # running C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\packed.exe a=20 third time t/90-rt101800.t .......... ok t/90-rt103861.t .......... ok t/90-rt104560.t .......... ok t/90-rt104635.t .......... ok t/90-rt122949.t .......... ok # running C:\Users\Torsten\AppData\Local\Temp\waisc9RkSm\packed.exe with=20 PAR_TMPDIR=3DC:\Users\Torsten\AppData\Local\Temp\waisc9RkSm\t m p ... t/90-rt127064.t .......... ok t/90-rt129312.t .......... ok # found core module Carp in C:/Strawberry_5_32_1_1_64/perl/lib/Carp.pm # found core module Exporter in=20 C:/Strawberry_5_32_1_1_64/perl/lib/Exporter.pm # found core module File::Glob in=20 C:/Strawberry_5_32_1_1_64/perl/lib/File/Glob.pm # found core module List::Util in=20 C:/Strawberry_5_32_1_1_64/perl/lib/List/Util.pm t/90-rt130685.t .......... ok t/90-rt59710.t ........... ok All tests successful. Files=3D18, Tests=3D243, 142 wallclock secs ( 0.08 usr + 0.05 sys =3D 0.1= 2=20 CPU) Result: PASS Result of create: $VAR1 =3D 1; =3D=3D> MISSING Signature file! <=3D=3D Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe=20 -MCPANPLUS::Internals::Utils::Autoflush=20 C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefil= e.PL]... Subroutine MY::postamble redefined at ./Makefile.PL line 232. # using "objdump" recursively to find DLLs needed by par.exe Generating a gmake-style Makefile Writing Makefile for PAR::Packer Writing MYMETA.yml and MYMETA.json Running [C:\STRAWB~1\c\bin\gmake.EXE test]... gmake[1]: Entering directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' Makefile:872: warning: overriding recipe for target '.c.o' Makefile:344: warning: ignoring old recipe for target '.c.o' gmake[1]: Leaving directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' gmake[1]: Entering directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' Makefile:872: warning: overriding recipe for target '.c.o' Makefile:344: warning: ignoring old recipe for target '.c.o' No tests defined for myldr extension. gmake[1]: Leaving directory=20 'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr' "C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe" "-MExtUtils::Command::MM"=20 "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,=20 'blib\lib', 'blib\arch')" t/*.t t/00-pod.t ............... skipped: Set environment variable=20 PERL_TEST_POD=3D1 to test POD t/10-parl-generation.t ... ok C:\Users\Torsten\AppData\Local\Temp\EmNPQlDiV0 syntax OK t/20-pp.t ................ ok # Please wait t/30-current_exec.t ...... ok t/40-packer_cd_option.t .. ok t/80-doublecolon.t ....... ok t/85-crt-glob.t .......... ok t/85-myfile.t ............ ok t/90-gh41.t .............. skipped: Test temporarily disabled # PAR_TEMP =3D=20 C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\par-546f727374656e\cache-fc9= 8a90db3bfdc84c662ef9ad165876f365ad512 # running C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\packed.exe a=20 second time # running C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\packed.exe a=20 third time t/90-rt101800.t .......... ok t/90-rt103861.t .......... ok t/90-rt104560.t .......... ok t/90-rt104635.t .......... ok t/90-rt122949.t .......... ok # running C:\Users\Torsten\AppData\Local\Temp\mWXvWldCha\packed.exe with=20 PAR_TMPDIR=3DC:\Users\Torsten\AppData\Local\Temp\mWXvWldCha\t m p ... t/90-rt127064.t .......... ok t/90-rt129312.t .......... ok # found core module Carp in C:/Strawberry_5_32_1_1_64/perl/lib/Carp.pm # found core module Exporter in=20 C:/Strawberry_5_32_1_1_64/perl/lib/Exporter.pm # found core module File::Glob in=20 C:/Strawberry_5_32_1_1_64/perl/lib/File/Glob.pm # found core module List::Util in=20 C:/Strawberry_5_32_1_1_64/perl/lib/List/Util.pm t/90-rt130685.t .......... ok t/90-rt59710.t ........... ok All tests successful. Files=3D18, Tests=3D243, 141 wallclock secs ( 0.11 usr + 0.12 sys =3D 0.2= 3=20 CPU) Result: PASS Result of install: $VAR1 =3D 1; Module found: yes, Patch found: yes Result of installing PAR::Packer: 1 Bye Torsten ---------------------------------------------------------------------- Dr. Ing. Torsten Werner | Product Manager plan.assyst E-Mail: [email protected] Assyst GmbH | Max-Planck-Str. 3 | 85609 Aschheim-Dornach Registration / Eintragung beim Amtsgericht M=C3=BCnchen: HRB 180174 Managing Director / Gesch=C3=A4ftsf=C3=BChrer: Hans Peter Hiemer, Dr. Andre= as Seidl www.assyst.de=20 ---------------------------------------------------------------------- Von: "Roderich Schupp via RT" <[email protected]> An: [email protected],=20 Datum: 04.07.2022 15:10 Betreff: [rt.cpan.org #143646] Problem using Win32::TieRegistry in=20 script packed with pp on Windows <URL: https://rt.cpan.org/Ticket/Display.html?id=3D143646 > Hi,=20 note that we prefer the GitHub bug tracker nowadays (see the yellow=20 section at the top of the page). Anyway: > pp 0.992=20 What's the version of your PAR::Packer? Did you build it yourself? Did you= =20 run "make test" and it passed? Can you post the output of (yes regtest.exe is also a zip file): unzip -l regtest.exe Cheers, Roderich