dnmfarrell / berrybrew Goto Github PK
View Code? Open in Web Editor NEWThe Windows Strawberry Perl version manager - written in C#
License: Other
The Windows Strawberry Perl version manager - written in C#
License: Other
Download progress indicator needed for better user experience.
Hello,
i have installed perl 5.32.1_64 with berrybrey. And it works fine :-)
I have one question about the perl site directory. In the path C:\berrybrew\5.32.1_64\perl there is no site directory.
If i extract the perl zip file (strawberry-perl-5.32.1.1-64bit-portable.zip) there is the site directory with bin and lib sub directory (both are empty).
If the missing site directory ok or is this a problem?
Regards, Henry
Currently, bb install 5.36.1 5.32.1 5.30.3 5.28.2 5.26.3
seems to be working just as bb install 5.36.1
.
It would be more powerful if install
can take multiple arguments to install multiple Perl versions at once.
And so is remove
.
strawberryperl.com now provides a structured JSON description of the available Perls: http://strawberryperl.com/releases.json
This ticket is to convert berrybrew to use it,
cc @stevieb9
PS C:\WINDOWS\system32> berrybrew.exe install 5.30.0_64
Downloading http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit-portable.zip to C:\berrybrew\temp\strawberry-perl-5.30.0.1-64bit-portable.zip
Confirming checksum ...
Checksum OK
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies. The system cannot find the file specified.
at BerryBrew.Berrybrew.Extract(StrawberryPerl perl, String archivePath)
at BerryBrew.Berrybrew.Install(String version)
at berrybrew.Bbconsole.Main(String[] args)
berrybrew 1.34 perl 5.32.1
cpan install Paws
hangs without returning to prompt
Files are not installed in @inc and dependent scripts fail
...
cp lib/Paws/Config/GetComplianceDetailsByResource.pm blib\lib\Paws\Config\GetComplianceDetailsByResource.pm
cp lib/Paws/MediaConvert/DeletePresetResponse.pm blib\lib\Paws\MediaConvert\DeletePresetResponse.pm
cp lib/Paws/CloudHSMv2/CreateCluster.pm blib\lib\Paws\CloudHSMv2\CreateCluster.pm
cp lib/Paws/ApiGatewayV2/DeleteRoute.pm blib\lib\Paws\ApiGatewayV2\DeleteRoute.pm
cp lib/Paws/ImageBuilder/ImageTestsConfiguration.pm blib\lib\Paws\ImageBuilder\ImageTestsConfiguration.pm
cp lib/Paws/ElasticBeanstalk/UpdateEnvironment.pm blib\lib\Paws\ElasticBeanstalk\UpdateEnvironment.pm
cp lib/Paws/SageMaker/OutputDataConfig.pm blib\lib\Paws\SageMaker\OutputDataConfig.pm
cp lib/Paws/ES/AutoTuneOptionsStatus.pm blib\lib\Paws\ES\AutoTuneOptionsStatus.pm
cp lib/Paws/MediaConvert/Xavc4kIntraCbgProfileSettings.pm blib\lib\Paws\MediaConvert\Xavc4kIntraCbgProfileSettings.pm
cp lib/Paws/MediaLive/BatchStartResponse.pm blib\lib\Paws\MediaLive\BatchStartResponse.pm
cp lib/Paws/AppSync/StartSchemaCreation.pm blib\lib\Paws\AppSync\StartSchemaCreation.pm
cp lib/Paws/FraudDetector/CreateModelVersionResult.pm blib\lib\Paws\FraudDetector\CreateModelVersionResult.pm
cp lib/Paws/MediaLive/ListMultiplexProgramsResponse.pm blib\lib\Paws\MediaLive\ListMultiplexProgramsResponse.pm
cp lib/Paws/WAFRegional/PutPermissionPolicy.pm blib\lib\Paws\WAFRegional\PutPermissionPolicy.pm
cp lib/Paws/MediaConvert/EsamSignalProcessingNotification.pm blib\lib\Paws\MediaConvert\EsamSignalProcessingNotification.pm
cp lib/Paws/LicenseManager/TagResourceResponse.pm blib\lib\Paws\LicenseManager\TagResourceResponse.pm
cp lib/Paws/EC2/CreateTransitGatewayRoute.pm blib\lib\Paws\EC2\CreateTransitGatewayRoute.pm
cp lib/Paws/Backup/ListTags.pm blib\lib\Paws\Backup\ListTags.pm
cp lib/Paws/ServiceCatalog/ServiceActionDetail.pm blib\lib\Paws\ServiceCatalog\ServiceActionDetail.pm
cp lib/Paws/Organizations/DescribeHandshakeResponse.pm blib\lib\Paws\Organizations\DescribeHandshakeResponse.pm
cp lib/Paws/DS/DirectoryConnectSettings.pm blib\lib\Paws\DS\DirectoryConnectSettings.pm
cp lib/Paws/SDB/ListDomains.pm blib\lib\Paws\SDB\ListDomains.pm
cp lib/Paws/SESv2/PutConfigurationSetReputationOptions.pm blib\lib\Paws\SESv2\PutConfigurationSetReputationOptions.pm
cp lib/Paws/AppMesh/AccessLog.pm blib\lib\Paws\AppMesh\AccessLog.pm
cp lib/Paws/RDS/StartDBClusterResult.pm blib\lib\Paws\RDS\StartDBClusterResult.pm
cp lib/Paws/Route53/GetHealthCheckLastFailureReason.pm blib\lib\Paws\Route53\GetHealthCheckLastFailureReason.pm
cp lib/Paws/CostExplorer/GetRightsizingRecommendation.pm blib\lib\Paws\CostExplorer\GetRightsizingRecommendation.pm
cp lib/Paws/CognitoIdp/AdminSetUserMFAPreferenceResponse.pm blib\lib\Paws\CognitoIdp\AdminSetUserMFAPreferenceResponse.pm
cp lib/Paws/IoTSiteWise/CreateAssetModel.pm blib\lib\Paws\IoTSiteWise\CreateAssetModel.pm
JLMARTIN/Paws-0.44.tar.gz
C:\berrybrew\5.32.1_64\perl\bin\perl.exe ./Build -- OK
Terminating on signal SIGINT(2)
Terminate batch job (Y/N)?
Exception handling for missing ICSharpCode.SharpZipLib library.
Windows 10, berrybrew version 1.34, perl version 5.32.1.
When I run bb off
from the command prompt, I get an exception and the berrybrew perl is not disabled :
> bb version
1.34
> perl --version
This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread
> where perl
C:\berrybrew\5.32.1_64\perl\bin\perl.exe
C:\Strawberry\perl\bin\perl.exe
>bb list
5.32.1_64 *
5.20.3_64
> bb off
Unhandled Exception: System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at BerryBrew.Berrybrew.PathSet(List`1 path)
at BerryBrew.Berrybrew.PathRemovePerl(Boolean process)
at BerryBrew.Berrybrew.Off()
at berrybrew.Bbconsole.Main(String[] args)
> where perl
C:\berrybrew\5.32.1_64\perl\bin\perl.exe
C:\Strawberry\perl\bin\perl.exe
When using berrybrew config, in addition to adding the current perl to the path environment variable, set the file association to allow running scripts without prepending perl
You can manipulate the registry as shown in this MSDN article or Stackoverflow article to set file associations
Hey just noticed you didn't include perl/site/bin in the local user path along with the other two bin locations
Hey just gave this a shot and really like it so far. I think it would be really useful to have the ability to install copies of the same version of perl with custom names for various projects that don't or shouldn't share site libs but use the same version of perl. Thanks!
IRR currently berrybrew runs perl process and proxies output.
But this may be tricky, have side-effects with buffering and pty.
It probably should work like other version managers do: configure environment and run perl directly, replacing the berrybrew process with the perl one.
Buffering problem may be illustrated with simple sample:
use v5.10;
say 'Enter your name';
my $name = <>;
say "Hello $name";
Running this with pty enabled (probably even without it) causes printing nothing before unrelying perl process ends. So you just type name, and then get:
entered_name
Enter your name
Hello entered_name
Also see Camelcade/Perl5-IDEA#2438 (comment)
Just downloaded Berrybrew and did berrybrew config
. It came back with this:
C:\dev\berrybrew-3-10-2015\bin>berrybrew config
This is berrybrew, version 0.07
Would you like to add berrybrew to your user PATH? y/n [n] y
Error adding berrybrew to the user PATH
I tried again in an admin CMD window, but got the same result. I'm using the current latest Berrybrew, Windows 8/Japanese.
Circumvent the need to open a new shell to have access to updated PATH variable.
My dzil setup stopped working, and it turned out to be because Strawberry portable overrides the HOME environment variable, replacing it with HOMEDIR and HOMEPATH (I found this by looking at File::HomeDir::Windows and Portable::HomeDir). So my home was changed to C:\berrybrew\5.20.1_64\data and dzil could no longer find my config located in C:\Users\Nate.
This isn't really a bug, just an inconvenience of using a portable distribution like an installed distribution. My fix for this was to comment out most of the apply
method in vendor\lib\Portable\HomeDir.pm, but it might be nice to have an install option like "don't override HOME" or something.
I had started a berrybrew install ...
operation earlier, and I accidentally closed the CMD before it finished. Silly me. Now when I run the same command to try to install the same version of Perl as earlier, I get this:
C:\dev\berrybrew-3-10-2015\bin>berrybrew.exe install 5.20.1_64
Confirming checksum ...
Error checksum of downloaded archive does not match expected output
expected: 844e7c2d741bda915ece0688bf3a00ab12577460
got: 62d5ee01d994685b0877b9cb75ce3c89c8f1b7cd
The checksum will of course be wrong because I didn't let the download finish. So now I need to restart the download somehow. I would simply delete the old download and call berrybrew install ...
again, but there is no message about the location of the bad download.
Thanks for this tool. It should simplify things considerably.
Strawberry perl has additional variants available for download, primarily the "64bit PortableZIP edition + extra PDL related libs".
Would it be possible to add this as an install option?
Thanks,
Shawn.
A simple question: I just tried to install berrybrew
on Windows 10 using the executable berrybrewInstaller.exe
. How do I open the UI after installation ? There is no icon in the system tray that I can click on. If I type berry
in the search box in the task bar it just shows berrybrewinstaller.exe
The URL and checksum look like they have been swapped in commit 8592178
Regards,
Shawn.
C:\Users\shawn>berrybrew install 5.22.0_64_PDL
Downloading 9024ce63c2fe404e7488db827171a9262c5a4830 to C:\berrybrew\temp\strawberry-perl-5.22.0.1-64bit-PDL.zip
Unhandled Exception: System.Net.WebException: Could not find file 'C:\Users\shawn\9024ce63c2fe404e7488db827171a9262c5a4830'. ---> System.Net.WebException: Could not find file 'C:\Users\shawn\9024ce63c2fe404e7488db827171a9262c5a4830'. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\shawn\9024ce63c2fe404e7488db827171a9262c5a4830'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
--- End of inner exception stack trace ---
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at Berrybrew.Berrybrew.Fetch(StrawberryPerl perl)
at Berrybrew.Berrybrew.Main(String[] args)
When the berrybrew associate set command is run, the handler sets to:
perl.PerlPath + "\\perl.exe \"%1\" \"%*\""
Which looks like:
berrybrewPerl=C:\berrybrew\5.30.3_64\perl\bin\perl.exe "%1" "%*"
The problem is, quoting the %*
causes it to treat all arguments passed as one. If no arguments are passed, @ARGV
contains an empty string, instead of being empty. This breaks Perl utility scripts used from the command line.
It should be:
perl.PerlPath + "\\perl.exe \"%1\" %*"
to get:
berrybrewPerl=C:\berrybrew\5.30.3_64\perl\bin\perl.exe "%1" %*
Test Script:
use strict;
use warnings;
use Data::Dumper;
$Data::Dumper::Varname = 'arguments';
print Dumper \@ARGV;
Output with current handler:
C:\Perl64>test.pl
$arguments1 = [
''
];
C:\Perl64>test.pl foo bar baz
$arguments1 = [
' foo bar baz'
];
After changing the handler:
C:\Perl64>ftype berrybrewPerl=C:\berrybrew\5.30.3_64\perl\bin\perl.exe "%1" %*
berrybrewPerl=C:\berrybrew\5.30.3_64\perl\bin\perl.exe "%1" %*
C:\Perl64>test.pl
$arguments1 = [];
C:\Perl64>test.pl foo bar baz
$arguments1 = [
'foo',
'bar',
'baz'
];
Grumbles about not being 64-bit. Worked fine on my local PC.
Any ideas? Feel free to close immediately if it's a silly Windows question!
D:\Tools\Dev\Perl\berrybrew\
berrybrewInstaller.exe
v1.41C:\Program Files (x86)\berrybrew\
D:\Tools\Dev\Perl\berrybrew\
D:\Tools\Dev\Perl\berrybrew\
should have two subdirectories: temp
and instance
D:\Tools\Dev\Perl\berrybrew\instance\5.38.0_64\
D:\Tools\Dev\Perl\berrybrew\
has only one subdirectory: temp
C:\berrybrew\instance\5.38.0_64\
berrybrew options
outputs:
Option configuration:
debug: false
storage_dir: C:\berrybrew
instance_dir: C:\berrybrew\instance
temp_dir: D:\Tools\Dev\Perl\berrybrew\temp
strawberry_url: https://strawberryperl.com
download_url: https://strawberryperl.com/releases.json
windows_homedir: false
custom_exec: false
run_mode: prod
file_assoc: berrybrewPerl
file_assoc_old:
shell: cmd
warn_orphans: false
Another useful addition would be to cache the downloads, in the same way that perlbrew retains the sources in the dists directory. That way one could reinstall versions faster if they need to be removed for some reason. It would also speed up any multiple aliased versions if issue #1 is implemented.
Thanks,
Shawn.
If berrybrew is upgraded and the new version does not have currently used perl in the available list it is hidden from list. It would be nice if the list would include all installed perls although they wouldn't be available for download anymore. It should be possible to switch back to them as well.
I have a few issues to take care of this week of my fork, but my goal is to cover the core issues here as well and get the projects merged within the next week.
Hey, having issues with exec with custom cloned perls, where exec is just not doing anything it seems. To reproduce:
$ berrybrew install 5.30.0_64
$ berrybrew clone 5.30.0_64_custom
$ berrybrew exec --with 5.30.0_64 perl -e "print qq{hello\n}"
hello
$ berrybrew exec --with 5.30.0_64_custom perl -e "print qq{hello\n}"
Dont know whats going on, but dont get an output from the custom perl at all, although doing berrybrew use on it does work.
Doesnt work when using as multiple --with arguments either:
$ berrybrew exec --with 5.30.0_64,5.30.0_64,5.30.0_64_custom perl -e 'print qq{hello\n}'
perl-5.30.0_64
==============
hello
perl-5.30.0_64
==============
hello
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.