develooper Front page | perl.par | Postings from July 2022

Antwort: [rt.cpan.org #143646] Problem using Win32::TieRegistry inscript packed with pp on Windows

Thread Previous
From:
Torsten.Werner via RT
Date:
July 4, 2022 17:07
Subject:
Antwort: [rt.cpan.org #143646] Problem using Win32::TieRegistry inscript packed with pp on Windows
Message ID:
rt-5.0.2-30212-1656943499-744.143646-15-0@rt.cpan.org
Mon Jul 04 10:04:59 2022: Request 143646 was acted upon.
Transaction: Correspondence added by Torsten.Werner@assyst.de
       Queue: PAR-Packer
     Subject: Antwort: [rt.cpan.org #143646] Problem using Win32::TieRegistry in script packed with pp on Windows
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: Torsten.Werner@assyst.de
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=143646 >


Hi Roderich,
You ask for the installation method. Tests are included and successfully 
finished.
We use a small script to prepare our perl environment. For Par::Packer we 
need a different icon. I replace pp.ico with my own one just before I 
compile the module. 
This results in the following process:

                        require Win32::Unicode;
                        require CPANPLUS;
                        my $cb = CPANPLUS::Backend->new;
                        my $conf = $cb->configure_object;
                        my $module = $cb->module_tree('pp');
                        my $file=$module->fetch();
                        my $path=$module->extract();
                        Win32::Unicode::chdirW($path);
                        my 
$source=sprintf("%s\\Resources\\assyst.ico",$Cwd);
                        my 
$target=sprintf("%s\\myldr\\winres\\pp.ico",$path);
                        unless(Win32::Unicode::unlinkW($target)) {
                                print STDERR "Error deleting '$target': 
$^E\n";
                                exit 1;
                        };
                        unless (Win32::Unicode::copyW($source,$target)) {
                                print STDERR "Error copying '$source' -> 
'$target': $^E\n";
                                exit 1;
                        }
                        print "$target replaced\n";

                        my $icon=sprintf("%s\\lib\\PAR\\pp.ico",$path);
                        unless (Win32::Unicode::copyW($source,$icon)) {
                                print STDERR "Error copying '$source' -> 
'$icon': $^E\n";
                                exit 1;
                        }
                        print "$icon as patch flag created. It is not used 
for builds, it is a simple flag\n";

                        foreach $target (qw(init prepare create test 
install)) {
                                my $result=$module->install(target => 
$target, force => 1);
                                print "Result of $target: 
",Dumper($result);
                                return 0 unless $result;
                        }
                        return 1;


I repeated the process to get the actual version of Par::Packer. Now I 
made the tests with PAR-Packer-1.055.tar.gz. The result is the same. 
I append the output of build process, it is too much to copy & paste. 
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\winres\pp.ico 
replaced
C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\lib\PAR\pp.ico 
as patch flag created. It is not used for builds, it is a simple flag
==> MISSING Signature file! <==
Result of init: $VAR1 = 1;
==> MISSING Signature file! <==
Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe 
-MCPANPLUS::Internals::Utils::Autoflush 
C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefile.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 = 1;
==> MISSING Signature file! <==
Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe 
-MCPANPLUS::Internals::Utils::Autoflush 
C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefile.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 
'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 
'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr'
gmake[1]: Entering directory 
'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 
'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" 
"-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 
'blib\lib', 'blib\arch')" t/*.t
t/00-pod.t ............... skipped: Set environment variable 
PERL_TEST_POD=1 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 = 
C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\par-546f727374656e\cache-aeff5e174cffb8156f9ff1f687ffcee6ddab915f
# running C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\packed.exe a 
second time
# running C:\Users\Torsten\AppData\Local\Temp\qHvIDJUobe\packed.exe a 
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 
PAR_TMPDIR=C:\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 
C:/Strawberry_5_32_1_1_64/perl/lib/Exporter.pm
# found core module File::Glob in 
C:/Strawberry_5_32_1_1_64/perl/lib/File/Glob.pm
# found core module List::Util in 
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=18, Tests=243, 142 wallclock secs ( 0.08 usr +  0.05 sys =  0.12 
CPU)
Result: PASS
Result of create: $VAR1 = 1;
==> MISSING Signature file! <==
Running [C:\Strawberry_5_32_1_1_64\perl\bin\perl.exe 
-MCPANPLUS::Internals::Utils::Autoflush 
C:\Users\Torsten\.cpanplus\5.32.1\build\5njnceijCr\PAR-Packer-1.055\Makefile.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 
'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 
'C:/Users/Torsten/.cpanplus/5.32.1/build/5njnceijCr/PAR-Packer-1.055/myldr'
gmake[1]: Entering directory 
'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 
'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" 
"-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 
'blib\lib', 'blib\arch')" t/*.t
t/00-pod.t ............... skipped: Set environment variable 
PERL_TEST_POD=1 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 = 
C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\par-546f727374656e\cache-fc98a90db3bfdc84c662ef9ad165876f365ad512
# running C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\packed.exe a 
second time
# running C:\Users\Torsten\AppData\Local\Temp\S8WSn6UiBk\packed.exe a 
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 
PAR_TMPDIR=C:\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 
C:/Strawberry_5_32_1_1_64/perl/lib/Exporter.pm
# found core module File::Glob in 
C:/Strawberry_5_32_1_1_64/perl/lib/File/Glob.pm
# found core module List::Util in 
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=18, Tests=243, 141 wallclock secs ( 0.11 usr +  0.12 sys =  0.23 
CPU)
Result: PASS
Result of install: $VAR1 = 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:    torsten.werner@assyst.de

Assyst GmbH  |  Max-Planck-Str. 3  |  85609 Aschheim-Dornach
Registration / Eintragung beim Amtsgericht München: HRB 180174
Managing Director / Geschäftsführer: Hans Peter Hiemer, Dr. Andreas Seidl
www.assyst.de 

----------------------------------------------------------------------




Von:    "Roderich Schupp via RT" <bug-PAR-Packer@rt.cpan.org>
An:     Torsten.Werner@assyst.de, 
Datum:  04.07.2022 15:10
Betreff:        [rt.cpan.org #143646] Problem using Win32::TieRegistry in 
script packed with pp on Windows



<URL: https://rt.cpan.org/Ticket/Display.html?id=143646 >

Hi, 

note that we prefer the GitHub bug tracker nowadays (see the yellow 
section at the top of the page).
Anyway:

> pp 0.992 

What's the version of your PAR::Packer? Did you build it yourself? Did you 
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




Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About