Skip to content

Commit

Permalink
Fix download on Windows
Browse files Browse the repository at this point in the history
PAR doesn't know about DLL dependencies. One needs to explicitly tell it
which DLLs to include in the build. Without those DLLs HTTP::Tinyish
skipped LWP and HTTP::Tiny because those DLLs were missing for SSL support.
It then chose the Curl backend. That contained a bug, which messed up the
downloaded content by converting CRLF -> LF. That is now fixed in
miyagawa/HTTP-Tinyish#24

We need to explicitly use PAR::Packer 1.057 and not the latest version,
because of another bug that causes Dynaloader to fail to find the included
DLLs and thus the user observing the same failure mode. See
rschupp/PAR-Packer#86
  • Loading branch information
patrickbkr committed Mar 12, 2024
1 parent 597b21a commit dd41aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,5 @@
38
- On some MacOSes the `sysctl` executable is not in path. Try more places
to find it. This should fix `download` on such OSes.
- Fix `download` on Windows (when the user doesn't happen to have
Strawberry Perl installed.)
4 changes: 2 additions & 2 deletions release-stuff/build-windows.ps1
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cp resources/Config.pm.tmpl lib/App/Rakubrew/Config.pm
perl -pi -E 's/<\%distro_format\%>/win/' lib/App/Rakubrew/Config.pm
CheckLastExitCode

cpanm -n PAR::Packer
cpanm -n PAR::Packer@1.057
CheckLastExitCode

cpanm --installdeps -n .
Expand All @@ -59,7 +59,7 @@ CheckLastExitCode
cpanm --installdeps -n --cpanfile cpanfile.win .
CheckLastExitCode

pp -I lib -M App::Rakubrew:: -M HTTP::Tinyish:: -M IO::Socket::SSL -o rakubrew.exe script/rakubrew
pp -I lib -M App::Rakubrew:: -M HTTP::Tinyish:: -M IO::Socket::SSL -l C:\Strawberry\c\bin\libcrypto-1_1-x64__.dll -l C:\Strawberry\c\bin\libssl-1_1-x64__.dll -l C:\Strawberry\c\bin\zlib1__.dll -o rakubrew.exe script/rakubrew
CheckLastExitCode

# Reset our modified Config.pm again.
Expand Down

0 comments on commit dd41aee

Please sign in to comment.