From 0ba2b9d439fdc8600852ed5b678dc1a4fca7500d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20B=C3=B6ker?= Date: Tue, 12 Mar 2024 21:12:12 +0100 Subject: [PATCH] Fix `download` on Windows 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 https://github.com/miyagawa/HTTP-Tinyish/pull/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 https://github.com/rschupp/PAR-Packer/issues/86 --- Changes | 2 ++ release-stuff/build-windows.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 release-stuff/build-windows.ps1 diff --git a/Changes b/Changes index 6155d75..779cb1a 100644 --- a/Changes +++ b/Changes @@ -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.) diff --git a/release-stuff/build-windows.ps1 b/release-stuff/build-windows.ps1 old mode 100644 new mode 100755 index eee3175..976d71e --- a/release-stuff/build-windows.ps1 +++ b/release-stuff/build-windows.ps1 @@ -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 . @@ -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.