stevieb9 / berrybrew Goto Github PK
View Code? Open in Web Editor NEWPerlbrew for Windows!
License: Other
Perlbrew for Windows!
License: Other
eg: berrybrew exec -h
This will allow us to use the file directly, and not have to translate it into a custom JSON file.
I download berrybrew.zip, but berrybrew.zip contains only data directory.
...we don't need them in these files
as it is, we interfere with the in-use stuff and that's really becoming a problem.
Need to really think this through
The configuration command throws an error when the target folder does not exist. See error log below.
Creating the folder manually makes things work as expected.
Thanks,
Shawn.
C:\git\berrybrew>bin\berrybrew.exe config
This is berrybrew, version
1.04
Would you like to add berrybrew to PATH? y/n [n]
y
berrybrew was successfully added to PATH, start a new terminal to use it.
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\berrybrew'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetDirectories(String path)
at BerryBrew.Berrybrew.PerlFindOrphans()
at BerryBrew.Berrybrew.Finalize()
Save the extracted instance in a storage directory, so on subsequent removal/reinstall of an instance, we can just copy the stored pristine instance dir into the perls directory.
After I have downloaded berrybrew
and run bin\berrybrew config
, I got this message:
WARNING! orphaned perl installations:
bin
data
What does it mean? Before the brerrybrew download, I uninstalled the strawberry perl 5.18.0 my labtop had.
c:\repos\berrybrew>berrybrew install 5.10.1_32
Downloading http://strawberryperl.com/download/5.10.1.5/strawberry-perl-5.10.1.5-portable.zip to
C:\berrybrew\temp\strawberry-perl-5.10.1.5-portable.zip
Unhandled Exception: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at BerryBrew.Berrybrew.Fetch(StrawberryPerl perl)
at BerryBrew.Berrybrew.Install(String version)
at BBConsole.bbconsole.Main(String[] args)`
the prod version gets overwritten
I installed the zip version of berrybrew on my windows 10 machine. I made the mistake of installing it into c:\berrybrew so I moved it to a different location and removed the setting in the path env var. Well now berrybrew will not run. I keep getting this error.
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\berrybrew\data\config.json'.
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, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamReader..ctor(String path)
at BerryBrew.Berrybrew.JsonParse(String type, Boolean raw)
at BerryBrew.Berrybrew..ctor()
at BBConsole.bbconsole.Main(String[] args)
C:\bin\berrybrew>
I've tried deleting everything and reloading, checked the path variable to make sure it was not set with berrybrew and it still insists on looking for c:\berrybrew\data\config.json
Is there some other file in perhaps the AppData dir?
When berrybrew edits the PATH during a 'config' or 'switch', it expands any %VARIABLE%
in the PATH and writes them back hardcoded.
For example, my original PATH had
...;%VARTHATCHANGES%\bin;...
but after running 'config' or 'switch', it became
...;c:\expanded\version\bin;...
However, I sometimes need to change %VARTHATCHANGES%
: with the hardcoded PATH, new instances no longer follow the change in %VARTHATCHANGES%
.
My guess is that the C# Environment.GetEnvironmentVariable()
is evaluating all the sub-variables inside the PATH when it reads it, and I can understand why that would often be a nice feature. But I don't know if there's a way to override that behavior to get at the raw value of the PATH. (I know that the Windows Scripting Host WScript.Shell's WshEnvironment object does not expand the internal variables when reading a PATH, but I don't know if there's a way to tell the C# interface to not do the internal expansion.
Unfortunately, unless this gets fixed, I won't be able to use berrybrew.
Currently, we only allow ver,ver,ver etc, with no space. Need to make the regex more resilient, and add exception handling
Strawberry perl also has a PDL edition. It would be good if that were listed as well for the 5.24.1 and 5.22.3 versions.
(There are currently 5.24.0 and 5.22.2 PDL editions available, so this will be consistent with the previous releases).
Thanks,
Shawn.
berrybrew register instance_name
.
Possibly provide the option to a user if an orphan is found to auto-register it.
leave config behind for backwards compatibility reasons
check other docs to ensure there's no ambiguity
Nitpick: the most recent messages.json
says version 1.04, despite everything else claiming you're at version 1.05. :-)
I get an error trying to call config from a non-admin command prompt. Since manipulating the path probably requires elevated privileges, it probably should always check and warn if not run with correct privileges.
C:\berrybrew\bin>berrybrew.exe config
This is berrybrew, version
1.04
Would you like to add berrybrew to your user PATH? y/n [n]
y
Unhandled Exception: System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
at BerryBrew.Berrybrew.PathSet(List`1 path)
at BerryBrew.Berrybrew.Config()
at BBConsole.bbconsole.Main(String[] args)
Would really prefer it if we could remove Administrator requirement entirely
Attempting to install 5.22.2_32, and encountered the following error:
PS C:berrybrew> berrybrew install 5.22.2_32
Downloading http://strawberryperl.com/download/5.22.2.1/strawberry-perl-5.22.2.1-32bit.zip to C:\berrybrew\installed\temp\strawberry-perl-5.22.2.1-32bit.zip
Confirming checksum ...
Error checksum of downloaded archive
C:\berrybrew\installed\temp\strawberry-perl-5.22.2.1-32bit.zip
does not match expected output
expected: 6c750c56a4eccf3b5f77af56e4cee572c360a1c2
got: 804a0dff0a3e4a9b3ac37c4495894467cccd35ec
Whould you like berrybrew to delete the corrupted download file? y/n [n]
PS C:\berrybrew> berrybrew install 5.22.2_32
Confirming checksum ...
Error checksum of downloaded archive
When I checked the Strawberry Perl website (http://strawberryperl.com/releases.html), I found both checksums. When I examined the links, I found that the URL for 804a0dff0a3e4a9b3ac37c4495894467cccd35ec checksum referred to the file strawberry-perl-5.22.2.1-32bit.zip, while the 6c750c56a4eccf3b5f77af56e4cee572c360a1c2 checksum referred to the file strawberry-perl-5.22.2.1-32bit-portable.zip. Examining data\perls.json, I found that the section for 5.22.2_32 points to the -32bit.zip file, rather than the -32bit-portable.zip file (as all other _32 sections except those for PDL version).
[
{
"name" : "5.22.2_32",
"file" : "strawberry-perl-5.22.2.1-32bit.zip",
"url" : "http://strawberryperl.com/download/5.22.2.1/strawberry-perl-5.22.2.1-32bit.zip",
"ver" : "5.22.2",
"csum" : "6c750c56a4eccf3b5f77af56e4cee572c360a1c2"
},
]
My instance of Berrybrew was installed from a file downloaded from this site using this link as a .zip file on 2016-10-29, with size of 522,925 bytes, and an sha1sum of d27f906e868c7fd7d320f4149d908248e867e53a.
Also, (possibly a simplistic question, but) is it possible to re-attempt an install without having to re-download the file again (for example, if you downloaded it via a different method)?
... and remove the image
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.