From 984322d78965b40946baece50617b128ff6b5021 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 1 Jul 2023 07:23:51 +0100 Subject: [PATCH] initial commit --- .gitignore | 19 + LICENSE | 21 + README.md | 70 +++ bin/rbenv | 3 + bin/rbenv.bat | 9 + libexec/rbenv---version.bat | 18 + libexec/rbenv-commands.bat | 13 + libexec/rbenv-duplicate.bat | 49 ++ libexec/rbenv-exec.bat | 19 + libexec/rbenv-export.bat | 37 ++ libexec/rbenv-global.bat | 15 + libexec/rbenv-help.bat | 30 ++ libexec/rbenv-install.vbs | 520 ++++++++++++++++++++++ libexec/rbenv-local.bat | 23 + libexec/rbenv-rehash.bat | 13 + libexec/rbenv-shell.bat | 15 + libexec/rbenv-uninstall.vbs | 77 ++++ libexec/rbenv-version.bat | 13 + libexec/rbenv-versions.bat | 11 + libexec/rbenv.vbs | 408 +++++++++++++++++ test/gem_rake_bundler/Gemfile | 8 + test/gem_rake_bundler/Rakefile | 10 + test/gem_rake_bundler/html/index.html | 11 + test/gem_rake_bundler/spec/index_spec.rb | 21 + test/gem_rake_bundler/spec/spec_helper.rb | 25 ++ test/rake.bat | 7 + test/test.bat | 120 +++++ tools/7z/7zdec.exe | Bin 0 -> 42496 bytes tools/7z/readme.txt | 187 ++++++++ 29 files changed, 1772 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 bin/rbenv create mode 100644 bin/rbenv.bat create mode 100644 libexec/rbenv---version.bat create mode 100644 libexec/rbenv-commands.bat create mode 100644 libexec/rbenv-duplicate.bat create mode 100644 libexec/rbenv-exec.bat create mode 100644 libexec/rbenv-export.bat create mode 100644 libexec/rbenv-global.bat create mode 100644 libexec/rbenv-help.bat create mode 100644 libexec/rbenv-install.vbs create mode 100644 libexec/rbenv-local.bat create mode 100644 libexec/rbenv-rehash.bat create mode 100644 libexec/rbenv-shell.bat create mode 100644 libexec/rbenv-uninstall.vbs create mode 100644 libexec/rbenv-version.bat create mode 100644 libexec/rbenv-versions.bat create mode 100644 libexec/rbenv.vbs create mode 100644 test/gem_rake_bundler/Gemfile create mode 100644 test/gem_rake_bundler/Rakefile create mode 100644 test/gem_rake_bundler/html/index.html create mode 100644 test/gem_rake_bundler/spec/index_spec.rb create mode 100644 test/gem_rake_bundler/spec/spec_helper.rb create mode 100644 test/rake.bat create mode 100644 test/test.bat create mode 100644 tools/7z/7zdec.exe create mode 100644 tools/7z/readme.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c01c87 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +/* +!/.gitignore +!/LICENSE +!/README.md + +!/bin/ +/bin/* +!/bin/rbenv.bat +!/bin/rbenv + +!/libexec/ +/libexec/* +!/libexec/*.bat +!/libexec/*.vbs + +!/tools/ +/tools/DevKit/ + +!/test/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5904240 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 NAKAMURA Takeharu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8038a19 --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# rbenv for Windows + +The rbenv is a great tool. I ported it to Windows. +Some commands doesn't implemented, but wouldn't be a problem in basic use. + +## Usage + +Show all implement commands. + +```` + > rbenv commands +```` + +How to use the detailed command, please refer to the [original rbenv](https://github.com/rbenv/rbenv). + + +## Installation + +Installer is [here](https://gist.github.com/7ea63204203883c5884d.git). +Install `rbenv for windows` to your `USERPROFILE` directory. + +1. Clone git repositry + + ```` + > git clone https://github.com/nak1114/rbenv-win.git %USERPROFILE%\.rbenv-win + ```` + +2. Config path + Add the `bin` & `shims` directory to your `PATH` environment variable for access to the rbenv command + + ```` + > for /f "skip=2 delims=" %a in ('reg query HKCU\Environment /v Path') do set orgpath=%a + > setx Path "%USERPROFILE%\.rbenv-win\bin;%USERPROFILE%\.rbenv-win\shims;%orgpath:~22%" + ```` + +3. Restart your shell + + ```` + > exit + ```` + +4. Run the following command after `rbenv` installation , to enable the `ruby`. + + ```` + > rbenv install 2.2.4 + > rbenv global 2.2.4 + > rbenv rehash + ```` + +## License + +The scripts is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +## Development + +Release test is performed in the following procedure. + + ```` + > git clone https://github.com/nak1114/rbenv-win.git + > cd /test + > test.bat + ```` + +This test requires the FireFox. + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/nak1114/rbenv-win. +This project is intended to be a safe, welcoming space for collaboration, +and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. diff --git a/bin/rbenv b/bin/rbenv new file mode 100644 index 0000000..c9ef0d9 --- /dev/null +++ b/bin/rbenv @@ -0,0 +1,3 @@ +#!/bin/sh + +cmd //c call "$(dirname "$0")/rbenv.bat" $* diff --git a/bin/rbenv.bat b/bin/rbenv.bat new file mode 100644 index 0000000..68fa754 --- /dev/null +++ b/bin/rbenv.bat @@ -0,0 +1,9 @@ +@echo off +setlocal +IF EXIST %~dp0..\exec.bat ( + del /F /Q %~dp0..\exec.bat >nul +) +call cscript //nologo %~dp0..\libexec\rbenv.vbs %* +IF EXIST %~dp0..\exec.bat ( + %~dp0..\exec.bat +) diff --git a/libexec/rbenv---version.bat b/libexec/rbenv---version.bat new file mode 100644 index 0000000..f8847aa --- /dev/null +++ b/libexec/rbenv---version.bat @@ -0,0 +1,18 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv --version +echo. +echo Displays the version number of this rbenv release, including the +echo current revision from git, if available. +echo. +echo The format of the git revision is: +echo ^-^-^ +echo where `num_commits` is the number of commits since `version` was +echo tagged. +echo. +EXIT /B +) + +echo rbenv 0.0.5-06 diff --git a/libexec/rbenv-commands.bat b/libexec/rbenv-commands.bat new file mode 100644 index 0000000..dec936d --- /dev/null +++ b/libexec/rbenv-commands.bat @@ -0,0 +1,13 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv commands +echo. +echo List all available rbenv commands +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . + diff --git a/libexec/rbenv-duplicate.bat b/libexec/rbenv-duplicate.bat new file mode 100644 index 0000000..a22893d --- /dev/null +++ b/libexec/rbenv-duplicate.bat @@ -0,0 +1,49 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv duplicate ^ ^ +echo. +echo Duplicate your enviroment. +echo. +echo ex.^) rbenv duplicate 2.3.0 myapp_env +echo. +echo To use when you want to create a sandbox and +echo the environment when building application-specific environment. +EXIT /B +) +set src=%~1 +set dst=%~2 +set src=%src:\=_% +set dst=%dst:\=_% + +IF NOT EXIST %~dp0..\versions\%src%\ ( +echo %src% is not exist +goto illegal +) +IF EXIST %~dp0..\versions\%dst%\ ( +echo %dst% is already exist +goto illegal +) +IF "%dst%" == "" ( +echo new_enviroment "%dst%" is illegal env name +goto illegal +) +IF "%src%" == "" ( +echo available_envirment "%src%" is illegal env name +goto illegal +) +IF "%src%" == "." ( +echo available_envirment "%src%" is illegal env name +goto illegal +) +IF "%src%" == ".." ( +echo available_envirment "%src%" is illegal env name +goto illegal +) + +xcopy "%~dp0..\versions\%src%" "%~dp0..\versions\%dst%\" /E /H /R /K /Y /I /F + +:illegal +set src= +set dst= diff --git a/libexec/rbenv-exec.bat b/libexec/rbenv-exec.bat new file mode 100644 index 0000000..a3f98cb --- /dev/null +++ b/libexec/rbenv-exec.bat @@ -0,0 +1,19 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv exec ^ [arg1 arg2...] +echo. +echo Runs an executable by first preparing PATH so that the selected Ruby +echo version's `bin' directory is at the front. +echo. +echo For example, if the currently selected Ruby version is 1.9.3-p327: +echo rbenv exec bundle install +echo. +echo is equivalent to: +echo PATH="$RBENV_ROOT/versions/1.9.3-p327/bin:$PATH" bundle install +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . diff --git a/libexec/rbenv-export.bat b/libexec/rbenv-export.bat new file mode 100644 index 0000000..020ee99 --- /dev/null +++ b/libexec/rbenv-export.bat @@ -0,0 +1,37 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv duplicate ^ ^ +echo. +echo Export your enviroment. +echo. +echo ex.^) rbenv duplicate 2.3.0 ./vendor/ruby +echo. +echo To use when you want to build application-specific environment. +EXIT /B +) +set src=%~1 +set src=%src:\=_% + +IF NOT EXIST %~dp0..\versions\%src%\ ( +echo %src% is not exist +goto illegal +) +IF "%src%" == "" ( +echo available_envirment "%src%" is illegal env name +goto illegal +) +IF "%src%" == "." ( +echo available_envirment "%src%" is illegal env name +goto illegal +) +IF "%src%" == ".." ( +echo available_envirment "%src%" is illegal env name +goto illegal +) + +xcopy "%~dp0..\versions\%src%" %2 /E /H /R /K /Y /I /F + +:illegal +set src= diff --git a/libexec/rbenv-global.bat b/libexec/rbenv-global.bat new file mode 100644 index 0000000..1cc7d6c --- /dev/null +++ b/libexec/rbenv-global.bat @@ -0,0 +1,15 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv global ^ +echo. +echo Sets the global Ruby version. You can override the global version at +echo any time by setting a directory-specific version with `rbenv local' +echo or by setting the `RBENV_VERSION' environment variable. +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . + diff --git a/libexec/rbenv-help.bat b/libexec/rbenv-help.bat new file mode 100644 index 0000000..700003b --- /dev/null +++ b/libexec/rbenv-help.bat @@ -0,0 +1,30 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv ^ [^] +echo. +echo Some useful rbenv commands are: +echo commands List all available rbenv commands +echo local Set or show the local application-specific Ruby version +echo global Set or show the global Ruby version +echo shell Set or show the shell-specific Ruby version +echo install Install a Ruby version using ruby-build +echo uninstall Uninstall a specific Ruby version +echo rehash Rehash rbenv shims (run this after installing executables) +echo version Show the current Ruby version and its origin +echo versions List all Ruby versions available to rbenv +echo which Display the full path to an executable +echo whence List all Ruby versions that contain the given executable +echo. +echo See `rbenv help ^' for information on a specific command. +echo For full documentation, see: https://github.com/rbenv/rbenv#readme +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . + + + + diff --git a/libexec/rbenv-install.vbs b/libexec/rbenv-install.vbs new file mode 100644 index 0000000..11d96c4 --- /dev/null +++ b/libexec/rbenv-install.vbs @@ -0,0 +1,520 @@ +Option Explicit + +Dim objws +Dim objfs +Set objws = WScript.CreateObject("WScript.Shell") +Set objfs = CreateObject("Scripting.FileSystemObject") + +Dim strCurrent +Dim strRbenvHome +Dim strDirCache +Dim strDirVers +Dim strDirLibs +Dim strVerFile +strCurrent = objfs.GetAbsolutePathName(".") +strRbenvHome = objfs.getParentFolderName(objfs.getParentFolderName(WScript.ScriptFullName)) +strDirCache = strRbenvHome & "\install_cache" +strDirVers = strRbenvHome & "\versions" +strDirLibs = strRbenvHome & "\libexec" +strVerFile = "\.ruby_version" + + +Dim tool7z +Dim strDirDevKit +tool7z = """" & strRbenvHome & "\tools\7z\7zdec.exe"" x " +strDirDevKit = strRbenvHome & "\tools\DevKit" + + +Sub ShowHelp() + Wscript.echo "Usage: rbenv install [-f|-s] " + Wscript.echo " rbenv install [-f|-s] " + Wscript.echo " rbenv install -l|--list" + Wscript.echo "" + Wscript.echo " -l/--list List all available versions" + Wscript.echo " -f/--force Install even if the version appears to be installed already" + Wscript.echo " -s/--skip-existing Skip if the version appears to be installed already" + Wscript.echo "" + Wscript.Quit +End Sub + +Dim listDevKit +listDevKit = Array( _ + Array("i386","http://dl.bintray.com/oneclick/rubyinstaller/","DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe" ),_ + Array("x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe" ),_ + Array("tdm" ,"http://dl.bintray.com/oneclick/rubyinstaller/","DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe" ) _ +) + +Dim listEnv +Dim listEnv_i386 +listEnv = Array(_ + Array("2.7.1-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/","rubyinstaller-2.7.1-1-x86.7z" ,"bundled"),_ + Array("2.7.1-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/","rubyinstaller-2.7.1-1-x86.7z" ,"bundled"),_ + Array("2.7.0-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/","rubyinstaller-2.7.0-1-x86.7z" ,"bundled"),_ + Array("2.7.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/","rubyinstaller-2.7.0-1-x86.7z" ,"bundled"),_ + Array("2.6.6-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/","rubyinstaller-2.6.6-1-x86.7z" ,"bundled"),_ + Array("2.6.6-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/","rubyinstaller-2.6.6-1-x64.7z" ,"bundled"),_ + Array("2.6.4-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/","rubyinstaller-2.6.4-1-x86.7z" ,"bundled"),_ + Array("2.6.4-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/","rubyinstaller-2.6.4-1-x64.7z" ,"bundled"),_ + Array("2.6.0-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.0-1/","rubyinstaller-devkit-2.6.0-1-x86.7z" ,"bundled"),_ + Array("2.6.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.0-1/","rubyinstaller-devkit-2.6.0-1-x64.7z" ,"bundled"),_ + Array("2.5.3-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/","rubyinstaller-devkit-2.5.3-1-x86.7z" ,"bundled"),_ + Array("2.5.3-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/","rubyinstaller-devkit-2.5.3-1-x64.7z" ,"bundled"),_ + Array("2.4.5-i386" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.5-1/","rubyinstaller-devkit-2.4.5-1-x86.7z" ,"bundled"),_ + Array("2.4.5-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.5-1/","rubyinstaller-devkit-2.4.5-1-x64.7z" ,"bundled"),_ + Array("2.3.3-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.3-i386-mingw32.7z" ,"i386"),_ + Array("2.3.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.3.1-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.1-i386-mingw32.7z" ,"i386"),_ + Array("2.3.1-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.1-x64-mingw32.7z" ,"x64" ),_ + Array("2.3.0-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.0-i386-mingw32.7z" ,"i386"),_ + Array("2.3.0-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.0-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.6-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.6-i386-mingw32.7z" ,"i386"),_ + Array("2.2.6-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.6-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.5-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.5-i386-mingw32.7z" ,"i386"),_ + Array("2.2.5-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.5-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.4-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.4-i386-mingw32.7z" ,"i386"),_ + Array("2.2.4-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.4-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.3-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.3-i386-mingw32.7z" ,"i386"),_ + Array("2.2.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.2-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.2-i386-mingw32.7z" ,"i386"),_ + Array("2.2.2-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.2-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.1-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.1-i386-mingw32.7z" ,"i386"),_ + Array("2.2.1-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.1-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.9-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.9-i386-mingw32.7z" ,"i386"),_ + Array("2.1.9-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.9-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.8-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.8-i386-mingw32.7z" ,"i386"),_ + Array("2.1.8-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.8-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.7-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.7-i386-mingw32.7z" ,"i386"),_ + Array("2.1.7-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.7-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.6-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.6-i386-mingw32.7z" ,"i386"),_ + Array("2.1.6-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.6-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.5-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.5-i386-mingw32.7z" ,"i386"),_ + Array("2.1.5-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.5-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.4-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.4-i386-mingw32.7z" ,"i386"),_ + Array("2.1.4-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.4-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.3-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.3-i386-mingw32.7z" ,"i386"),_ + Array("2.1.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p648-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p648-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p648-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p648-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p647-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p647-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p647-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p647-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p645-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p645-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p645-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p645-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p643-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p643-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p643-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p643-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p598-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p598-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p598-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p598-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p594-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p594-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p594-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p594-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p576-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p576-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p576-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p576-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p481-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p481-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p481-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p481-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p451-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p451-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p451-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p451-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p353-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p353-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p353-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p353-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p247-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p247-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p247-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p247-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p195-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p195-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p195-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p195-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p0-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p0-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p0-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p0-x64-mingw32.7z" ,"x64" ),_ + Array("1.9.3-p551-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p551-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p550-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p550-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p545-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p545-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p484-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p484-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p448-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p448-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p429-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p429-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p392-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p392-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p385-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p385-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p374-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p374-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p362-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p362-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p327-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p327-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p286-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p286-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p194-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p194-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p125-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p125-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p0-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p0-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p290-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p290-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p180-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p180-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p136-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p136-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p0-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p0-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p374-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p374-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p371-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p371-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p370-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p370-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p358-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p358-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p357-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p357-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p352-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p352-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p334-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p334-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p330-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p330-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p302-i386" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p302-i386-mingw32.7z" ,"tdm" ) _ +) + +listEnv_i386 = Array( _ + Array("3.1.2" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/","rubyinstaller-3.1.2-1-x86.7z" ,"bundled"),_ + Array("3.1.2-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/","rubyinstaller-3.1.2-1-x64.7z" ,"bundled"),_ + Array("3.1.1" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.1-1/","rubyinstaller-3.1.1-1-x86.7z" ,"bundled"),_ + Array("3.1.1-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.1-1/","rubyinstaller-3.1.1-1-x64.7z" ,"bundled"),_ + Array("3.1.0" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.0-1/","rubyinstaller-3.1.0-1-x86.7z" ,"bundled"),_ + Array("3.1.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.0-1/","rubyinstaller-3.1.0-1-x64.7z" ,"bundled"),_ + Array("3.0.4" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.4-1/","rubyinstaller-3.0.4-1-x86.7z" ,"bundled"),_ + Array("3.0.4-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.4-1/","rubyinstaller-3.0.4-1-x64.7z" ,"bundled"),_ + Array("3.0.3" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.3-1/","rubyinstaller-3.0.3-1-x86.7z" ,"bundled"),_ + Array("3.0.3-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.3-1/","rubyinstaller-3.0.3-1-x64.7z" ,"bundled"),_ + Array("3.0.2" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.2-1/","rubyinstaller-3.0.2-1-x86.7z" ,"bundled"),_ + Array("3.0.2-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.2-1/","rubyinstaller-3.0.2-1-x64.7z" ,"bundled"),_ + Array("3.0.1" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.1-1/","rubyinstaller-3.0.1-1-x86.7z" ,"bundled"),_ + Array("3.0.1-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.1-1/","rubyinstaller-3.0.1-1-x64.7z" ,"bundled"),_ + Array("3.0.0" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.0-1/","rubyinstaller-3.0.0-1-x86.7z" ,"bundled"),_ + Array("3.0.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.0-1/","rubyinstaller-3.0.0-1-x64.7z" ,"bundled"),_ + Array("2.7.6" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.6-1/","rubyinstaller-2.7.6-1-x86.7z" ,"bundled"),_ + Array("2.7.6-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.6-1/","rubyinstaller-2.7.6-1-x64.7z" ,"bundled"),_ + Array("2.7.5" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.5-1/","rubyinstaller-2.7.5-1-x86.7z" ,"bundled"),_ + Array("2.7.5-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.5-1/","rubyinstaller-2.7.5-1-x64.7z" ,"bundled"),_ + Array("2.7.4" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.4-1/","rubyinstaller-2.7.4-1-x86.7z" ,"bundled"),_ + Array("2.7.4-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.4-1/","rubyinstaller-2.7.4-1-x64.7z" ,"bundled"),_ + Array("2.7.3" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.3-1/","rubyinstaller-2.7.3-1-x86.7z" ,"bundled"),_ + Array("2.7.3-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.3-1/","rubyinstaller-2.7.3-1-x64.7z" ,"bundled"),_ + Array("2.7.2" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.2-1/","rubyinstaller-2.7.2-1-x86.7z" ,"bundled"),_ + Array("2.7.2-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.2-1/","rubyinstaller-2.7.2-1-x64.7z" ,"bundled"),_ + Array("2.7.1" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/","rubyinstaller-2.7.1-1-x86.7z" ,"bundled"),_ + Array("2.7.1-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/","rubyinstaller-2.7.1-1-x64.7z" ,"bundled"),_ + Array("2.7.0" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/","rubyinstaller-2.7.0-1-x86.7z" ,"bundled"),_ + Array("2.7.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.0-1/","rubyinstaller-2.7.0-1-x64.7z" ,"bundled"),_ + Array("2.6.10" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.10-1/","rubyinstaller-2.6.10-1-x86.7z" ,"bundled"),_ + Array("2.6.10-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.10-1/","rubyinstaller-2.6.10-1-x64.7z" ,"bundled"),_ + Array("2.6.9" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.9-1/","rubyinstaller-2.6.9-1-x86.7z" ,"bundled"),_ + Array("2.6.9-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.9-1/","rubyinstaller-2.6.9-1-x64.7z" ,"bundled"),_ + Array("2.6.8" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.8-1/","rubyinstaller-2.6.8-1-x86.7z" ,"bundled"),_ + Array("2.6.8-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.8-1/","rubyinstaller-2.6.8-1-x64.7z" ,"bundled"),_ + Array("2.6.7" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.7-1/","rubyinstaller-2.6.7-1-x86.7z" ,"bundled"),_ + Array("2.6.7-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.7-1/","rubyinstaller-2.6.7-1-x64.7z" ,"bundled"),_ + Array("2.6.6" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/","rubyinstaller-2.6.6-1-x86.7z" ,"bundled"),_ + Array("2.6.6-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/","rubyinstaller-2.6.6-1-x64.7z" ,"bundled"),_ + Array("2.6.4" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/","rubyinstaller-2.6.4-1-x86.7z" ,"bundled"),_ + Array("2.6.4-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/","rubyinstaller-2.6.4-1-x64.7z" ,"bundled"),_ + Array("2.6.0" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.0-1/","rubyinstaller-2.6.0-1-x86.7z" ,"bundled"),_ + Array("2.6.0-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.0-1/","rubyinstaller-2.6.0-1-x64.7z" ,"bundled"),_ + Array("2.5.9" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.9-1/","rubyinstaller-2.5.9-1-x86.7z" ,"bundled"),_ + Array("2.5.9-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.9-1/","rubyinstaller-2.5.9-1-x64.7z" ,"bundled"),_ + Array("2.5.3" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/","rubyinstaller-2.5.3-1-x86.7z" ,"bundled"),_ + Array("2.5.3-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/","rubyinstaller-2.5.3-1-x64.7z" ,"bundled"),_ + Array("2.4.5" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.5-1/","rubyinstaller-2.4.5-1-x86.7z" ,"bundled"),_ + Array("2.4.5-x64" ,"https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.5-1/","rubyinstaller-2.4.5-1-x64.7z" ,"bundled"),_ + Array("2.3.3" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.3-i386-mingw32.7z" ,"i386"),_ + Array("2.3.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.3.1" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.1-i386-mingw32.7z" ,"i386"),_ + Array("2.3.1-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.1-x64-mingw32.7z" ,"x64" ),_ + Array("2.3.0" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.0-i386-mingw32.7z" ,"i386"),_ + Array("2.3.0-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.3.0-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.6" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.6-i386-mingw32.7z" ,"i386"),_ + Array("2.2.6-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.6-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.5" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.5-i386-mingw32.7z" ,"i386"),_ + Array("2.2.5-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.5-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.4" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.4-i386-mingw32.7z" ,"i386"),_ + Array("2.2.4-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.4-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.3" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.3-i386-mingw32.7z" ,"i386"),_ + Array("2.2.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.2" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.2-i386-mingw32.7z" ,"i386"),_ + Array("2.2.2-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.2-x64-mingw32.7z" ,"x64" ),_ + Array("2.2.1" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.1-i386-mingw32.7z" ,"i386"),_ + Array("2.2.1-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.2.1-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.9" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.9-i386-mingw32.7z" ,"i386"),_ + Array("2.1.9-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.9-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.8" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.8-i386-mingw32.7z" ,"i386"),_ + Array("2.1.8-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.8-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.7" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.7-i386-mingw32.7z" ,"i386"),_ + Array("2.1.7-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.7-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.6" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.6-i386-mingw32.7z" ,"i386"),_ + Array("2.1.6-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.6-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.5" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.5-i386-mingw32.7z" ,"i386"),_ + Array("2.1.5-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.5-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.4" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.4-i386-mingw32.7z" ,"i386"),_ + Array("2.1.4-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.4-x64-mingw32.7z" ,"x64" ),_ + Array("2.1.3" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.3-i386-mingw32.7z" ,"i386"),_ + Array("2.1.3-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.1.3-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p648" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p648-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p648-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p648-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p647" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p647-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p647-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p647-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p645" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p645-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p645-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p645-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p643" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p643-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p643-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p643-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p598" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p598-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p598-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p598-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p594" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p594-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p594-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p594-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p576" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p576-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p576-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p576-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p481" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p481-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p481-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p481-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p451" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p451-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p451-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p451-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p353" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p353-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p353-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p353-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p247" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p247-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p247-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p247-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p195" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p195-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p195-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p195-x64-mingw32.7z" ,"x64" ),_ + Array("2.0.0-p0" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p0-i386-mingw32.7z" ,"i386"),_ + Array("2.0.0-p0-x64" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-2.0.0-p0-x64-mingw32.7z" ,"x64" ),_ + Array("1.9.3-p551" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p551-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p550" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p550-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p545" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p545-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p484" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p484-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p448" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p448-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p429" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p429-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p392" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p392-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p385" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p385-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p374" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p374-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p362" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p362-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p327" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p327-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p286" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p286-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p194" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p194-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p125" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p125-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.3-p0" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.3-p0-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p290" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p290-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p180" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p180-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p136" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p136-i386-mingw32.7z" ,"tdm" ),_ + Array("1.9.2-p0" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.9.2-p0-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p374" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p374-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p371" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p371-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p370" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p370-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p358" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p358-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p357" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p357-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p352" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p352-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p334" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p334-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p330" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p330-i386-mingw32.7z" ,"tdm" ),_ + Array("1.8.7-p302" ,"http://dl.bintray.com/oneclick/rubyinstaller/","ruby-1.8.7-p302-i386-mingw32.7z" ,"tdm" ) _ +) + +Function DownloadFile(strUrl,strFile) + Dim objHttp + Dim httpProxy + Set objHttp = Wscript.CreateObject("Msxml2.ServerXMLHTTP") + on error resume next + Call objHttp.Open("GET", strUrl, False ) + if Err.Number <> 0 then + Wscript.Echo Err.Description + Wscript.Quit + end if + httpProxy = objws.ExpandEnvironmentStrings("%http_proxy%") + if httpProxy <> "" AND httpProxy <> "%http_proxy%" Then + objHttp.setProxy 2, httpProxy + end if + objHttp.Send + + if Err.Number <> 0 then + Wscript.Echo Err.Description + Wscript.Quit + end if + on error goto 0 + if objHttp.status = 404 then + Wscript.Echo "404:file not found" + Wscript.Quit + end if + + Dim Stream + Set Stream = Wscript.CreateObject("ADODB.Stream") + Stream.Open + Stream.Type = 1 + Stream.Write objHttp.responseBody + Stream.SaveToFile strFile, 2 + Stream.Close +End Function + +Sub extractDevKit(cur) + If Not objfs.FolderExists( strDirDevKit ) Then objfs.CreateFolder(strDirDevKit) + If Not objfs.FolderExists( cur(1) ) Then objfs.CreateFolder(cur(1)) + + If Not objfs.FileExists(cur(2)) Then + objws.Run "%comspec% /c rmdir /s /q " & cur(1), 0 , true + objfs.CreateFolder(cur(1)) + If objfs.FileExists(cur(4)) Then + objfs.CopyFile cur(4), cur(1)&"\", True + Else + download(cur) + End If + End If + + If Not objfs.FileExists(cur(1) & "\dk.rb") Then + Wscript.echo "extract" & cur(0) & " ..." + objws.Run """" & cur(2) & """", 1 , true + End If +End Sub + +Sub writeConfigYML(dev,cur) + Dim ofile + Set ofile = objfs.CreateTextFile(dev(1) & "\config.yml" , True ) + ofile.WriteLine("- " & cur(1)) + ofile.Close() +End Sub + +Sub patchDevKit(dev,cur) + Wscript.echo "patch " & dev(0) & " to " & cur(0) + writeConfigYML dev,cur + objws.CurrentDirectory = dev(1) + objws.Run """" & cur(1) & "\bin\ruby.exe"" dk.rb install", 1 , true + objws.CurrentDirectory =strCurrent +End Sub + +Sub installDevKit(cur) + Dim list + Dim dev + Dim idx + If cur(4) = "bundled" Then + objws.Run """" & cur(1) & "\bin\ridk.cmd"" install", 1 , true + Else + For Each list In listDevKit + If list(0) = cur(4) Then + dev=Array("DevKit_" & list(0), strDirDevKit&"\"&list(0), strDirDevKit&"\"&list(0)&"\"&list(2), list(1)&list(2), strDirCache&"\"&list(2)) + extractDevKit dev + patchDevKit dev,cur + Exit Sub + End If + Next + End If +End Sub + +Sub clear(cur) + If objfs.FolderExists(cur(1)) Then objfs.DeleteFolder cur(1),True + If objfs.FileExists( cur(2)) Then objfs.DeleteFile cur(2),True +End Sub + +Sub download(cur) + Wscript.echo "download " & cur(0) & " ..." + DownloadFile cur(3) , cur(2) +End Sub + +Sub extract(cur) + If Not objfs.FolderExists( strDirCache ) Then objfs.CreateFolder(strDirCache) + If Not objfs.FolderExists( strDirVers ) Then objfs.CreateFolder(strDirVers ) + + If objfs.FolderExists(cur(1)) Then Exit Sub + + If Not objfs.FileExists(cur(2)) Then download(cur) + + Wscript.echo "install " & cur(0) & " ..." + + objws.CurrentDirectory = strDirCache + objws.Run tool7z & " """ & cur(2) & """" , 0 , true + objfs.MoveFolder strDirCache&"\"&objfs.GetBaseName(cur(2)) , cur(1) + + installDevKit(cur) + objws.Run "rbenv rehash " & cur(0), 0, true + Wscript.echo "comlete! " & cur(0) + +End Sub + +Function GetCurrentVersionGlobal() + GetCurrentVersionGlobal = Null + + Dim fname + Dim objFile + fname = strRbenvHome & "\version" + If objfs.FileExists( fname ) Then + Set objFile = objfs.OpenTextFile(fname) + If objFile.AtEndOfStream <> True Then + GetCurrentVersionGlobal = Array(objFile.ReadLine,fname) + End If + objFile.Close + End If +End Function + +Function GetCurrentVersionLocal(path) + GetCurrentVersionLocal = Null + + Dim fname + Dim objFile + Do While path <> "" + fname = path & strVerFile + If objfs.FileExists( fname ) Then + Set objFile = objfs.OpenTextFile(fname) + If objFile.AtEndOfStream <> True Then + GetCurrentVersionLocal = Array(objFile.ReadLine,fname) + End If + objFile.Close + Exit Function + End If + path = objfs.getParentFolderName(path) + Loop +End Function + +Function GetCurrentVersionShell() + GetCurrentVersionShell = Null + + Dim str + str=objws.ExpandEnvironmentStrings("%RBENV_VERSION%") + If str <> "%RBENV_VERSION%" Then + GetCurrentVersionShell = Array(str,"%RBENV_VERSION%") + End If +End Function + +Function GetCurrentVersionNoError() + Dim str + str=GetCurrentVersionShell + If IsNull(str) Then str = GetCurrentVersionLocal(strCurrent) + If IsNull(str) Then str = GetCurrentVersionGlobal + GetCurrentVersionNoError = str +End Function + +Sub main(arg) + If arg.Count = 0 Then ShowHelp + + Dim idx + Dim optForce + Dim optSkip + Dim optList + Dim version + + optForce=False + optSkip=False + optList=False + version="" + + For idx = 0 To arg.Count - 1 + Select Case arg(idx) + Case "--help" ShowHelp + Case "-l" optList=True + Case "--list" optList=True + Case "-f" optForce=True + Case "--force" optForce=True + Case "-s" optSkip=True + Case "--skip-existing" optSkip=True + Case Else + version = arg(idx) + Exit For + End Select + Next + + If version = "" Then + Dim ary + ary=GetCurrentVersionNoError() + If Not IsNull(ary) Then version=ary(0) + End If + + Dim list + Dim cur + If optList Then + For Each list In listEnv_i386 + Wscript.echo list(0) + Next + Exit Sub + ElseIf version <> "" Then + For Each list In listEnv_i386 + If list(0) = version Then + cur=Array(list(0),strDirVers&"\"&list(0),strDirCache&"\"&list(2),list(1)&list(2),list(3)) + If optForce Then clear(cur) + extract(cur) + Exit Sub + End If + Next + Wscript.echo "rbenv-install: definition not found: " & version + Wscript.echo "" + Wscript.echo "See all available versions with `rbenv install --list'." + Else + ShowHelp + End If +End Sub + +main(WScript.Arguments) diff --git a/libexec/rbenv-local.bat b/libexec/rbenv-local.bat new file mode 100644 index 0000000..79018f0 --- /dev/null +++ b/libexec/rbenv-local.bat @@ -0,0 +1,23 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv local ^ +echo rbenv local --unset +echo. +echo Sets the local application-specific Ruby version by writing the +echo version name to a file named `.ruby-version'. +echo. +echo When you run a Ruby command, rbenv will look for a `.ruby-version' +echo file in the current directory and each parent directory. If no such +echo file is found in the tree, rbenv will use the global Ruby version +echo specified with `rbenv global'. A version specified with the +echo `RBENV_VERSION' environment variable takes precedence over local +echo and global versions. +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . + + diff --git a/libexec/rbenv-rehash.bat b/libexec/rbenv-rehash.bat new file mode 100644 index 0000000..5625706 --- /dev/null +++ b/libexec/rbenv-rehash.bat @@ -0,0 +1,13 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv rehash +echo. +echo Rehash rbenv shims ^(run this after installing executables^) +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . + diff --git a/libexec/rbenv-shell.bat b/libexec/rbenv-shell.bat new file mode 100644 index 0000000..4200fcd --- /dev/null +++ b/libexec/rbenv-shell.bat @@ -0,0 +1,15 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv shell ^ +echo rbenv shell --unset +echo. +echo Sets a shell-specific Ruby version by setting the `RBENV_VERSION' +echo environment variable in your shell. This version overrides local +echo application-specific versions and the global version. +echo. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . diff --git a/libexec/rbenv-uninstall.vbs b/libexec/rbenv-uninstall.vbs new file mode 100644 index 0000000..6a7bf34 --- /dev/null +++ b/libexec/rbenv-uninstall.vbs @@ -0,0 +1,77 @@ +Option Explicit + +Dim objws +Dim objfs +Set objws = WScript.CreateObject("WScript.Shell") +Set objfs = CreateObject("Scripting.FileSystemObject") + +Dim strCurrent +Dim strRbenvHome +Dim strDirCache +Dim strDirVers +Dim strDirLibs +strCurrent = objfs.GetAbsolutePathName(".") +strRbenvHome = objfs.getParentFolderName(objfs.getParentFolderName(WScript.ScriptFullName)) +strDirCache = strRbenvHome & "\install_cache" +strDirVers = strRbenvHome & "\versions" +strDirLibs = strRbenvHome & "\libexec" + + +Sub ShowHelp() + Wscript.echo "Usage: rbenv uninstall [-f|--force] " + Wscript.echo "" + Wscript.echo " -f Attempt to remove the specified version without prompting" + Wscript.echo " for confirmation. If the version does not exist, do not" + Wscript.echo " display an error message." + Wscript.echo "" + Wscript.echo "See `rbenv versions` for a complete list of installed versions." + Wscript.echo "" + Wscript.Quit +End Sub + +Function IsVersion(version) + Dim re + Set re = new regexp + re.Pattern = "^[a-zA-Z_0-9-.]+$" + IsVersion = re.Test(version) +End Function + +Sub main(arg) + If arg.Count = 0 Then ShowHelp + + Dim idx + Dim optForce + Dim version + + optForce=False + version="" + + For idx = 0 To arg.Count - 1 + Select Case arg(idx) + Case "--help" ShowHelp + Case "-f" optForce=True + Case "--force" optForce=True + Case Else + version = arg(idx) + Exit For + End Select + Next + + Dim str,ans + ans="" + str=strDirVers&"\"&version + If IsVersion(version) And objfs.FolderExists(str) Then + ans="y" + If Not optForce Then + Wscript.StdOut.Write "rbenv: remove "&str&"? " + ans=WScript.StdIn.ReadLine + End If + Else + If Not optForce Then Wscript.echo "rbenv: version `"&version&"' not installed" + Wscript.Quit + End If + + If ans="y" Or ans="Y" Then objfs.DeleteFolder str , True +End Sub + +main(WScript.Arguments) diff --git a/libexec/rbenv-version.bat b/libexec/rbenv-version.bat new file mode 100644 index 0000000..8ce4f6e --- /dev/null +++ b/libexec/rbenv-version.bat @@ -0,0 +1,13 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv version +echo. +echo Shows the currently selected Ruby version and how it was +echo selected. To obtain only the version string, use `rbenv +echo version-name'. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . diff --git a/libexec/rbenv-versions.bat b/libexec/rbenv-versions.bat new file mode 100644 index 0000000..04e088f --- /dev/null +++ b/libexec/rbenv-versions.bat @@ -0,0 +1,11 @@ +@echo off +setlocal + +if "%1" == "--help" ( +echo Usage: rbenv versions [--bare] [--skip-aliases] +echo. +echo Lists all Ruby versions found in `$RBENV_ROOT/versions/*'. +EXIT /B +) + +rem Implementation of this command is in the rbenv.vbs file . diff --git a/libexec/rbenv.vbs b/libexec/rbenv.vbs new file mode 100644 index 0000000..396849a --- /dev/null +++ b/libexec/rbenv.vbs @@ -0,0 +1,408 @@ +Option Explicit + +Dim objws +Dim objfs +Set objws = WScript.CreateObject("WScript.Shell") +Set objfs = CreateObject("Scripting.FileSystemObject") + +Dim strCurrent +Dim strRbenvHome +Dim strDirCache +Dim strDirVers +Dim strDirLibs +Dim strVerFile +strCurrent = objfs.GetAbsolutePathName(".") +strRbenvHome = objfs.getParentFolderName(objfs.getParentFolderName(WScript.ScriptFullName)) +strDirCache = strRbenvHome & "\install_cache" +strDirVers = strRbenvHome & "\versions" +strDirLibs = strRbenvHome & "\libexec" +strVerFile = "\.ruby_version" + +Function IsVersion(version) + Dim re + Set re = new regexp + re.Pattern = "^[a-zA-Z_0-9-.]+$" + IsVersion = re.Test(version) +End Function + +Function GetCurrentVersionGlobal() + GetCurrentVersionGlobal = Null + + Dim fname + Dim objFile + fname = strRbenvHome & "\version" + If objfs.FileExists( fname ) Then + Set objFile = objfs.OpenTextFile(fname) + If objFile.AtEndOfStream <> True Then + GetCurrentVersionGlobal = Array(objFile.ReadLine,fname) + End If + objFile.Close + End If +End Function + +Function GetCurrentVersionLocal(path) + GetCurrentVersionLocal = Null + + Dim fname + Dim objFile + Do While path <> "" + fname = path & strVerFile + If objfs.FileExists( fname ) Then + Set objFile = objfs.OpenTextFile(fname) + If objFile.AtEndOfStream <> True Then + GetCurrentVersionLocal = Array(objFile.ReadLine,fname) + End If + objFile.Close + Exit Function + End If + path = objfs.getParentFolderName(path) + Loop +End Function + +Function GetCurrentVersionShell() + GetCurrentVersionShell = Null + + Dim str + str=objws.ExpandEnvironmentStrings("%RBENV_VERSION%") + If str <> "%RBENV_VERSION%" Then + GetCurrentVersionShell = Array(str,"%RBENV_VERSION%") + End If +End Function + +Function GetCurrentVersion() + Dim str + str=GetCurrentVersionShell + If IsNull(str) Then str = GetCurrentVersionLocal(strCurrent) + If IsNull(str) Then str = GetCurrentVersionGlobal + If IsNull(str) Then Err.Raise vbError + 1, "version not found", "please set 'rbenv global '" + GetCurrentVersion = str +End Function + +Function GetCurrentVersionNoError() + Dim str + str=GetCurrentVersionShell + If IsNull(str) Then str = GetCurrentVersionLocal(strCurrent) + If IsNull(str) Then str = GetCurrentVersionGlobal + GetCurrentVersionNoError = str +End Function + +Function GetBinDir(ver) + Dim str + str=strDirVers & "\" & ver & "\bin" + If Not(IsVersion(ver) And objfs.FolderExists(str)) Then Err.Raise vbError + 2, "rbenv", "version `"&ver&"' not installed" + GetBinDir = str +End Function + +Function GetCommandList() + Dim cmdList + Set cmdList = CreateObject("Scripting.Dictionary")'"System.Collections.SortedList" + + Dim re + Set re = new regexp + re.Pattern = "\\rbenv-([a-zA-Z_0-9-]+)\.(bat|vbs)$" + + Dim file + Dim mts + For Each file In objfs.GetFolder(strDirLibs).Files + Set mts=re.Execute(file) + If mts.Count > 0 Then + cmdList.Add mts(0).submatches(0), file + End If + Next + + Set GetCommandList = cmdList +End Function + +Sub ExecCommand(str) + Dim ofile + Set ofile = objfs.CreateTextFile(strRbenvHome & "\exec.bat" , True ) + ofile.WriteLine(str) + ofile.Close() +End Sub + +Sub ShowHelp() + Wscript.echo "Usage: rbenv []" + Wscript.echo "" + Wscript.echo "Some useful rbenv commands are:" + Wscript.echo " commands List all available rbenv commands" + Wscript.echo " local Set or show the local application-specific Ruby version" + Wscript.echo " global Set or show the global Ruby version" + Wscript.echo " shell Set or show the shell-specific Ruby version" + Wscript.echo " install Install a Ruby version using ruby-build" + Wscript.echo " uninstall Uninstall a specific Ruby version" + Wscript.echo " rehash Rehash rbenv shims (run this after installing executables)" + Wscript.echo " version Show the current Ruby version and its origin" + Wscript.echo " versions List all Ruby versions available to rbenv" + Wscript.echo " exec Runs an executable by first preparing PATH so that the selected Ruby" + Wscript.echo "" + Wscript.echo "See `rbenv help ' for information on a specific command." + Wscript.echo "For full documentation, see: https://github.com/rbenv/rbenv#readme" + Exit Sub + + + Wscript.echo " which Display the full path to an executable" + Wscript.echo " whence List all Ruby versions that contain the given executable" +End Sub + +Sub CommandHelp(arg) + If arg.Count > 1 Then + Dim list + Set list=GetCommandList + If list.Exists(arg(1)) Then + ExecCommand(list(arg(1)) & " --help") + Else + Wscript.echo "unknown rbenv command '"&arg(1)&"'" + End If + Else + ShowHelp + End If +End Sub + + +Sub CommandRehash(arg) + Dim strDirShims + strDirShims= strRbenvHome & "\shims" + If Not objfs.FolderExists( strDirShims ) Then objfs.CreateFolder(strDirShims) + + Dim ofile + Dim file + For Each file In objfs.GetFolder(strDirShims).Files + objfs.DeleteFile file, True + Next + For Each file In objfs.GetFolder(GetBinDir(GetCurrentVersion()(0))).Files + If objfs.GetExtensionName(file) = "exe" or objfs.GetExtensionName(file) = "bat" or objfs.GetExtensionName(file) = "cmd" Then + Set ofile = objfs.CreateTextFile(strDirShims & "\" & objfs.GetBaseName( file ) & ".bat" ) + ofile.WriteLine("@echo off") + ofile.WriteLine("rbenv exec %~n0 %*") + ofile.Close() + Set ofile = objfs.CreateTextFile(strDirShims & "\" & objfs.GetBaseName( file ) ) + ofile.WriteLine("#!/bin/sh") + ofile.WriteLine("rbenv exec $(basename ""$0"") $*") + ofile.Close() + End If + Next + + + If arg.Count < 2 Then + Exit Sub + End If + If arg(1) <> "bundle" Then + Exit Sub + End If + + Dim oExec,str,re,mts + set oExec = objws.Exec("bundle.bat config") + Do While oExec.Status = 0 + WScript.Sleep 100 + Loop + str = oExec.StdOut.ReadAll + + set re=new regexp + re.multiline=true + re.pattern="^path\r\n.*\((.+?)\)\: ""(.+?)""" + set mts=re.execute(str) + + if mts.count > 0 then + str= mts(0).submatches(0) & "/../../" & mts(0).submatches(1) + + set oExec = objws.Exec("where -R """ & Replace(str,"/","\") &""" *.bat") + Do While oExec.Status = 0 + WScript.Sleep 100 + Loop + + Do While Not oExec.StdOut.AtEndOfStream + str = oExec.StdOut.ReadLine + Set ofile = objfs.CreateTextFile(strDirShims & "\" & objfs.GetBaseName( str ) & ".bat" ) + ofile.WriteLine("@echo off") + ofile.WriteLine("call bundle show > NUL") + ofile.WriteLine("if ERRORLEVEL 1 (") + ofile.WriteLine("rbenv exec %~n0 %*") + ofile.WriteLine(") else (") + ofile.WriteLine("bundle exec %~n0 %*") + ofile.WriteLine(")") + ofile.Close() + Set ofile = objfs.CreateTextFile(strDirShims & "\" & objfs.GetBaseName( str ) ) + ofile.WriteLine("#!/bin/sh") + ofile.WriteLine("if bundle show >/dev/null; then") + ofile.WriteLine("bundle exec $(basename ""$0"") $*") + ofile.WriteLine("else") + ofile.WriteLine("rbenv exec $(basename ""$0"") $*") + ofile.WriteLine("fi") + ofile.Close() + Loop + end if +End Sub + +Sub CommandExecute(arg) + Dim str + Dim dstr + dstr=GetBinDir(GetCurrentVersion()(0)) + str="set PATH=" & dstr & ";%PATH:&=^&%" & vbCrLf + If arg.Count > 1 Then + str=str & """" & dstr & "\" & arg(1) & """" + Dim idx + If arg.Count > 2 Then + For idx = 2 To arg.Count - 1 + str=str & " """& arg(idx) &"""" + Next + End If + End If + ExecCommand(str) +End Sub + +Sub CommandGlobal(arg) + If arg.Count < 2 Then + Dim ver + ver=GetCurrentVersionGlobal() + If IsNull(ver) Then + Wscript.echo "no global version configured" + Else + Wscript.echo ver(0) + End If + Else + GetBinDir(arg(1)) + Dim ofile + Set ofile = objfs.CreateTextFile( strRbenvHome & "\version" , True ) + ofile.WriteLine(arg(1)) + ofile.Close() + End If +End Sub + +Sub CommandLocal(arg) + Dim ver + If arg.Count < 2 Then + ver=GetCurrentVersionLocal(strCurrent) + If IsNull(ver) Then + Wscript.echo "no local version configured for this directory" + Else + Wscript.echo ver(0) + End If + Else + ver=arg(1) + If ver = "--unset" Then + ver = "" + objfs.DeleteFile strCurrent & strVerFile, True + Exit Sub + Else + GetBinDir(ver) + End If + Dim ofile + Set ofile = objfs.CreateTextFile( strCurrent & strVerFile , True ) + ofile.WriteLine(ver) + ofile.Close() + End If +End Sub + +Sub CommandShell(arg) + Dim ver + If arg.Count < 2 Then + ver=GetCurrentVersionShell + If IsNull(ver) Then + Wscript.echo "no shell-specific version configured" + Else + Wscript.echo ver(0) + End If + Else + ver=arg(1) + If ver = "--unset" Then + ver = "" + Else + GetBinDir(ver) + End If + ExecCommand("endlocal"&vbCrLf&"set RBENV_VERSION=" & ver) + End If +End Sub + +Sub CommandVersion(arg) + If Not objfs.FolderExists( strDirVers ) Then objfs.CreateFolder(strDirVers) + + Dim curVer + curVer=GetCurrentVersion + Wscript.echo curVer(0) & " (set by " &curVer(1)&")" +End Sub + +Sub CommandVersions(arg) + Dim isBare + + isBare=False + If arg.Count > 2 Then + If arg(1) = "--bare" Then isBare=True + End If + + If Not objfs.FolderExists( strDirVers ) Then objfs.CreateFolder(strDirVers) + + Dim curVer + curVer=GetCurrentVersionNoError + If IsNull(curVer) Then + curVer=Array("","") + End If + + Dim dir + Dim ver + For Each dir In objfs.GetFolder(strDirVers).subfolders + ver=objfs.GetFileName( dir ) + If isBare Then + Wscript.echo ver + ElseIf ver = curVer(0) Then + Wscript.echo "* " & ver & " (set by " &curVer(1)&")" + Else + Wscript.echo " " & ver + End If + Next +End Sub + +Sub PlugIn(arg) + Dim fname + Dim idx + Dim str + fname = strDirLibs & "\rbenv-" & arg(0) + If objfs.FileExists( fname & ".bat" ) Then + str="""" & fname & ".bat""" + ElseIf objfs.FileExists( fname & ".vbs" ) Then + str="cscript //nologo """ & fname & ".vbs""" + Else + Wscript.echo "rbenv: no such command `"&arg(0)&"'" + Wscript.Quit + End If + + For idx = 1 To arg.Count - 1 + str=str & " """& arg(idx) &"""" + Next + + ExecCommand(str) +End Sub + +Sub CommandCommands(arg) + Dim cname + For Each cname In GetCommandList() + Wscript.echo cname + Next +End Sub + +Sub Dummy() + Wscript.echo "command not implement" +End Sub + + +Sub main(arg) + If arg.Count = 0 Then + ShowHelp + Else + Select Case arg(0) + Case "exec" CommandExecute(arg) + Case "rehash" CommandRehash(arg) + Case "global" CommandGlobal(arg) + Case "local" CommandLocal(arg) + Case "shell" CommandShell(arg) + Case "version" CommandVersion(arg) + Case "versions" CommandVersions(arg) + Case "commands" CommandCommands(arg) + Case "help" CommandHelp(arg) + Case Else PlugIn(arg) + End Select + End If +End Sub + + + +main(WScript.Arguments) diff --git a/test/gem_rake_bundler/Gemfile b/test/gem_rake_bundler/Gemfile new file mode 100644 index 0000000..046362c --- /dev/null +++ b/test/gem_rake_bundler/Gemfile @@ -0,0 +1,8 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in ariblib.gemspec +group :development, :test do + gem 'rake' + gem 'rspec' + gem 'selenium-webdriver' +end diff --git a/test/gem_rake_bundler/Rakefile b/test/gem_rake_bundler/Rakefile new file mode 100644 index 0000000..e40991d --- /dev/null +++ b/test/gem_rake_bundler/Rakefile @@ -0,0 +1,10 @@ +#require "bundler/gem_tasks" +require "rspec/core/rake_task" + +RSpec::Core::RakeTask.new(:spec) + +task :default => :spec + +task :init do + sh "bundle install --path vendor/bundle" +end diff --git a/test/gem_rake_bundler/html/index.html b/test/gem_rake_bundler/html/index.html new file mode 100644 index 0000000..8fd4299 --- /dev/null +++ b/test/gem_rake_bundler/html/index.html @@ -0,0 +1,11 @@ + + + + + rbenv for Windows test page + + +

rbenv for Windows

+ + diff --git a/test/gem_rake_bundler/spec/index_spec.rb b/test/gem_rake_bundler/spec/index_spec.rb new file mode 100644 index 0000000..5c07e34 --- /dev/null +++ b/test/gem_rake_bundler/spec/index_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' +require 'selenium-webdriver' + +describe 'index.html' do + before do + Encoding.default_external='utf-8' + @webserver=start_http() + @webdriver = Selenium::WebDriver.for :firefox + end + + it "Http get should be successfull." do + @webdriver.navigate.to "http://127.0.0.1:10080/index.html" + expect(@webdriver.title).to eq "rbenv for Windows test page" + end + + after do + @webdriver.quit + @webserver.shutdown + end + +end diff --git a/test/gem_rake_bundler/spec/spec_helper.rb b/test/gem_rake_bundler/spec/spec_helper.rb new file mode 100644 index 0000000..f60b235 --- /dev/null +++ b/test/gem_rake_bundler/spec/spec_helper.rb @@ -0,0 +1,25 @@ +# $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +require 'bundler/setup' +require 'webrick' + +def start_http(opt={}) + s = WEBrick::HTTPServer.new({ + :DocumentRoot => File.expand_path('../../html', __FILE__), + :BindAddress => '127.0.0.1', + :Port => 10080, + :AccessLog => [[File.open('accesslog.txt', 'w'), WEBrick::AccessLog::CLF]], + :Logger => WEBrick::Log.new("log.txt", WEBrick::BasicLog::DEBUG), + }.merge(opt).merge({:StartCallback => Proc.new{ Thread.main.wakeup }})) + + trap("INT"){ s.shutdown } + @server_thread = Thread.new do + s.start + end + Thread.stop + s +end + +RSpec.configure do |config| + config.filter_run :debug => true + config.run_all_when_everything_filtered = true +end diff --git a/test/rake.bat b/test/rake.bat new file mode 100644 index 0000000..6ee6e7f --- /dev/null +++ b/test/rake.bat @@ -0,0 +1,7 @@ +@echo off +call bundle show > NUL +if ERRORLEVEL 1 ( +rbenv exec %~n0 %* +) else ( +bundle exec %~n0 %* +) diff --git a/test/test.bat b/test/test.bat new file mode 100644 index 0000000..af69927 --- /dev/null +++ b/test/test.bat @@ -0,0 +1,120 @@ +@echo off +setlocal + +set PATH=%~dp0..\bin;%~dp0..\shims;%PATH% + +echo :install: test +call rbenv install -l +call rbenv install 2.1.8 +call rbenv install 2.1.7-x64 +call rbenv install 1.9.3-p551 + + +mkdir test +cd test +echo :global: test +call rbenv global 2.1.8 +call rbenv rehash +call ruby -v +call rbenv version +call rbenv versions + +echo :local: test +call rbenv local 2.1.7-x64 +call rbenv rehash +call ruby -v +call rbenv version +call rbenv versions +cd .. +call ruby -v +call rbenv version +call rbenv versions +cd test +call ruby -v +call rbenv version +call rbenv versions + +echo :shell: test +call rbenv shell 1.9.3-p551 +call rbenv rehash +call ruby -v +call rbenv version +call rbenv versions +cd .. +call ruby -v +call rbenv version +call rbenv versions +cd test +call ruby -v +call rbenv version +call rbenv versions + +echo :shell --unset: test +call rbenv shell --unset +call rbenv rehash +call ruby -v +call rbenv version +call rbenv versions + +echo :local --unset: test +call rbenv local --unset +call rbenv rehash +call ruby -v +call rbenv version +call rbenv versions + +cd .. +rmdir /s /q test + +echo :rehash: test +call rbenv shell 2.1.8 +call rbenv rehash +call gem install bundler +call where bundle +call rbenv rehash +call where bundle + + +echo :DevKit i386: test +call xcopy "%~dp0\gem_rake_bundler" "%~dp0test\" /E /H /R /K /Y /I /F +cd test +call rbenv shell 2.1.8 +call rbenv rehash +call gem install bundler +call rbenv rehash +call bundle install --path vendor/bundle +call bundle platform +call bundle exec rake +cd .. +rmdir /s /q test + +echo :DevKit x64: test +call xcopy "%~dp0\gem_rake_bundler" "%~dp0test\" /E /H /R /K /Y /I /F +cd test +call rbenv shell 2.1.7-x64 +call rbenv rehash +call gem install bundler +call rbenv rehash +call bundle install --path vendor/bundle +call bundle platform +call bundle exec rake +cd .. +rmdir /s /q test + +echo :DevKit tdm: test +call xcopy "%~dp0\gem_rake_bundler" "%~dp0test\" /E /H /R /K /Y /I /F +cd test +call rbenv shell 1.9.3-p551 +call rbenv rehash +call gem install rubygems-update +call rbenv rehash +call update_rubygems +call rbenv rehash +call gem install bundler +call rbenv rehash +call bundle install --path vendor/bundle +call bundle platform +call bundle exec rake +cd .. +rmdir /s /q test + diff --git a/tools/7z/7zdec.exe b/tools/7z/7zdec.exe new file mode 100644 index 0000000000000000000000000000000000000000..4a914a30a9cc8c09b0588c335fac790881e8f702 GIT binary patch literal 42496 zcmeFaeSA~Ll|L-$UfTi-t_TVUtOik()`=YAMowaolgMBjLyRNiHz>wVyVNC=B*c~s zv_NgH1il*7rrq=&zw!2T-rrY#oe+#6|S~l3m1n|r9-X@T2lPe1n1FdaLK+pHg zmEQ<`+1=-lXFs3y=Of>_^K$0QnKNh3oH;Xh<)@$52|Arl#4jG#>Gt7Ce;)q-&;RR2 z^7MHJrt5w+<>>r<`l6%r%Qie!Z{J+^?C0w~^R)eMKJ&~o&-(12{hYnd|BU^qXY6@T zl-i$ucKzoTPMbE>kpL}koIk50^@;q^U!HJB{vo`-Y{}1m1JAtKx%n;p{qg*RJYRAC zdw5>HFF(Hz&s9(T%?2tvim4Z&BE6tXa|bI%_L&bykF{cIXv|L@xNDfx~+c(~yc6aG9P$U-ffZnYf=E%<>p zx*y^<;m@O`Oo;j4;QurVlx*1gsz(>Ub2I+S2aRp}a&mP#^%LLF=}ODleH2?!>56X% z{KBJCwmYo&dEzHnz)^;5@RaUkI$$NG*uN5NURSvThJb*#Po)JL^8-CgNrN72ixfZZ`xD`+w_di6y1A$fx7(4knr~;C9Yp<)( zG$aGC13#~{JCkY*I8IZpuPT z)-rV3-KFF?tp4flR^QY`WsYaWfu&ed~V(h!l99%KH8*WjO-r9D&CH zL}Tv#AI9UafthsCZ$n7B4ugG~@wN)&w5czpaGLx(B0w@TQK)R#$g+l=Cz)^9l;#^2 zD^{tsS{Gk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{1;OB!(73xWIt^Q_VYir zGS30DK684a#q@-&fp(bE5E2pLeJEBY3o4(nvK^6i+fP|pGP2G|k7Pj^Je75|<5m_m zCJRb6SC!^EP(=>*;|@ej9Hk8J7%0{3~ZEmQ4WQIVTqUeeIoA; z_x1Y*1;S#o4GQ5s@D1$b5z_KC)8#ye!aigel%&Rk-Yfh4e8?^JqxqR>%U-_D(cZMFo=2^;rY*nYw(?58 zns3?}4D(L+pg%YWms5Vw@9RUm54e2+xHp%T-?6ED^QMY&6VZCh-ouABY8Ff3Salf; zSy-88XB)71A=oMeWM4pNLV^8tveb_{`TFXb8|v}mmcw?p>=&=kU7NjT4L(6~9H+>iU0; zzbEveFj~yZ*nN60dYs6v)wz7Z2N`=zKcEdbjA^|$ETE${w|CXIb=>ChqqEL2m$2I> zF*|eh^o68GpI;KftVyqVG7odPLN1rf7r^KW46+`$cM1|Umpi;uWO=}WAS4-J5rm0? zB#UsMBVf=o_Cw}!dv?j9pwl-rwfjihpLxkDkBv?qk{7pQc7 zLP&D;W4QQ*a0O$(WiINt;h^6ef~^CtU7%76b&?eJJt#|p*v*(vw^fj~yG6;CVm)?N z9~QuI8Zv_caiUze&m+|LyTcv9X4x + +: + e: Extract files from archive + l: List contents of archive + t: Test integrity of archive + +Example: + + 7zDec l archive.7z + +lists contents of archive.7z + + 7zDec e archive.7z + +extracts files from archive.7z to current folder. + + +How to use .7z Decoder +---------------------- + +Memory allocation +~~~~~~~~~~~~~~~~~ + +7z Decoder uses two memory pools: +1) Temporary pool +2) Main pool +Such scheme can allow you to avoid fragmentation of allocated blocks. + + +Steps for using 7z decoder +-------------------------- + +Use code at 7zMain.c as example. + +1) Declare variables: + inStream /* implements ILookInStream interface */ + CSzArEx db; /* 7z archive database structure */ + ISzAlloc allocImp; /* memory functions for main pool */ + ISzAlloc allocTempImp; /* memory functions for temporary pool */ + +2) call CrcGenerateTable(); function to initialize CRC structures. + +3) call SzArEx_Init(&db); function to initialize db structures. + +4) call SzArEx_Open(&db, inStream, &allocMain, &allocTemp) to open archive + +This function opens archive "inStream" and reads headers to "db". +All items in "db" will be allocated with "allocMain" functions. +SzArEx_Open function allocates and frees temporary structures by "allocTemp" functions. + +5) List items or Extract items + + Listing code: + ~~~~~~~~~~~~~ + + Use SzArEx_GetFileNameUtf16 function. Look example code in C\Util\7z\7zMain.c file. + + + Extracting code: + ~~~~~~~~~~~~~~~~ + + SZ_RESULT SzAr_Extract( + CArchiveDatabaseEx *db, + ILookInStream *inStream, + UInt32 fileIndex, /* index of file */ + UInt32 *blockIndex, /* index of solid block */ + Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ + size_t *outBufferSize, /* buffer size for output buffer */ + size_t *offset, /* offset of stream for required file in *outBuffer */ + size_t *outSizeProcessed, /* size of file in *outBuffer */ + ISzAlloc *allocMain, + ISzAlloc *allocTemp); + + If you need to decompress more than one file, you can send these values from previous call: + blockIndex, + outBuffer, + outBufferSize, + You can consider "outBuffer" as cache of solid block. If your archive is solid, + it will increase decompression speed. + + After decompressing you must free "outBuffer": + allocImp.Free(outBuffer); + +6) call SzArEx_Free(&db, allocImp.Free) to free allocated items in "db". + + + + +Memory requirements for .7z decoding +------------------------------------ + +Memory usage for Archive opening: + - Temporary pool: + - Memory for uncompressed .7z headers + - some other temporary blocks + - Main pool: + - Memory for database: + Estimated size of one file structures in solid archive: + - Size (4 or 8 Bytes) + - CRC32 (4 bytes) + - LastWriteTime (8 bytes) + - Some file information (4 bytes) + - File Name (variable length) + pointer + allocation structures + +Memory usage for archive Decompressing: + - Temporary pool: + - Memory for LZMA decompressing structures + - Main pool: + - Memory for decompressed solid block + - Memory for temprorary buffers, if BCJ2 fileter is used. Usually these + temprorary buffers can be about 15% of solid block size. + + +7z Decoder doesn't allocate memory for compressed blocks. +Instead of this, you must allocate buffer with desired +size before calling 7z Decoder. Use 7zMain.c as example. + + +Defines +------- + +_SZ_ALLOC_DEBUG - define it if you want to debug alloc/free operations to stderr. + + +--- + +http://www.7-zip.org +http://www.7-zip.org/sdk.html +http://www.7-zip.org/support.html