initial commit
This commit is contained in:
commit
984322d789
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
@ -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/
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -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.
|
70
README.md
Normal file
70
README.md
Normal file
@ -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 <your test dir>
|
||||||
|
> cd <your test dir>/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.
|
3
bin/rbenv
Normal file
3
bin/rbenv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cmd //c call "$(dirname "$0")/rbenv.bat" $*
|
9
bin/rbenv.bat
Normal file
9
bin/rbenv.bat
Normal file
@ -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
|
||||||
|
)
|
18
libexec/rbenv---version.bat
Normal file
18
libexec/rbenv---version.bat
Normal file
@ -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 ^<version^>-^<num_commits^>-^<git_sha^>
|
||||||
|
echo where `num_commits` is the number of commits since `version` was
|
||||||
|
echo tagged.
|
||||||
|
echo.
|
||||||
|
EXIT /B
|
||||||
|
)
|
||||||
|
|
||||||
|
echo rbenv 0.0.5-06
|
13
libexec/rbenv-commands.bat
Normal file
13
libexec/rbenv-commands.bat
Normal file
@ -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 .
|
||||||
|
|
49
libexec/rbenv-duplicate.bat
Normal file
49
libexec/rbenv-duplicate.bat
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv duplicate ^<available_envirment^> ^<new_enviroment^>
|
||||||
|
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=
|
19
libexec/rbenv-exec.bat
Normal file
19
libexec/rbenv-exec.bat
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv exec ^<command^> [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 .
|
37
libexec/rbenv-export.bat
Normal file
37
libexec/rbenv-export.bat
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv duplicate ^<available_envirment^> ^<new_enviroment^>
|
||||||
|
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=
|
15
libexec/rbenv-global.bat
Normal file
15
libexec/rbenv-global.bat
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv global ^<version^>
|
||||||
|
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 .
|
||||||
|
|
30
libexec/rbenv-help.bat
Normal file
30
libexec/rbenv-help.bat
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv ^<command^> [^<args^>]
|
||||||
|
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 ^<command^>' 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 .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
520
libexec/rbenv-install.vbs
Normal file
520
libexec/rbenv-install.vbs
Normal file
@ -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] <version>"
|
||||||
|
Wscript.echo " rbenv install [-f|-s] <definition-file>"
|
||||||
|
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)
|
23
libexec/rbenv-local.bat
Normal file
23
libexec/rbenv-local.bat
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv local ^<version^>
|
||||||
|
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 .
|
||||||
|
|
||||||
|
|
13
libexec/rbenv-rehash.bat
Normal file
13
libexec/rbenv-rehash.bat
Normal file
@ -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 .
|
||||||
|
|
15
libexec/rbenv-shell.bat
Normal file
15
libexec/rbenv-shell.bat
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
if "%1" == "--help" (
|
||||||
|
echo Usage: rbenv shell ^<version^>
|
||||||
|
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 .
|
77
libexec/rbenv-uninstall.vbs
Normal file
77
libexec/rbenv-uninstall.vbs
Normal file
@ -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] <version>"
|
||||||
|
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)
|
13
libexec/rbenv-version.bat
Normal file
13
libexec/rbenv-version.bat
Normal file
@ -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 .
|
11
libexec/rbenv-versions.bat
Normal file
11
libexec/rbenv-versions.bat
Normal file
@ -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 .
|
408
libexec/rbenv.vbs
Normal file
408
libexec/rbenv.vbs
Normal file
@ -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 <version>'"
|
||||||
|
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 <command> [<args>]"
|
||||||
|
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 <command>' 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)
|
8
test/gem_rake_bundler/Gemfile
Normal file
8
test/gem_rake_bundler/Gemfile
Normal file
@ -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
|
10
test/gem_rake_bundler/Rakefile
Normal file
10
test/gem_rake_bundler/Rakefile
Normal file
@ -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
|
11
test/gem_rake_bundler/html/index.html
Normal file
11
test/gem_rake_bundler/html/index.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>rbenv for Windows test page</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>rbenv for Windows</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
21
test/gem_rake_bundler/spec/index_spec.rb
Normal file
21
test/gem_rake_bundler/spec/index_spec.rb
Normal file
@ -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
|
25
test/gem_rake_bundler/spec/spec_helper.rb
Normal file
25
test/gem_rake_bundler/spec/spec_helper.rb
Normal file
@ -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
|
7
test/rake.bat
Normal file
7
test/rake.bat
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
call bundle show > NUL
|
||||||
|
if ERRORLEVEL 1 (
|
||||||
|
rbenv exec %~n0 %*
|
||||||
|
) else (
|
||||||
|
bundle exec %~n0 %*
|
||||||
|
)
|
120
test/test.bat
Normal file
120
test/test.bat
Normal file
@ -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
|
||||||
|
|
BIN
tools/7z/7zdec.exe
Normal file
BIN
tools/7z/7zdec.exe
Normal file
Binary file not shown.
187
tools/7z/readme.txt
Normal file
187
tools/7z/readme.txt
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
7z ANSI-C Decoder 9.35
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
7z ANSI-C provides 7z/LZMA decoding.
|
||||||
|
7z ANSI-C version is simplified version ported from C++ code.
|
||||||
|
|
||||||
|
LZMA is default and general compression method of 7z format
|
||||||
|
in 7-Zip compression program (www.7-zip.org). LZMA provides high
|
||||||
|
compression ratio and very fast decompression.
|
||||||
|
|
||||||
|
|
||||||
|
LICENSE
|
||||||
|
-------
|
||||||
|
|
||||||
|
7z ANSI-C Decoder is part of the LZMA SDK.
|
||||||
|
LZMA SDK is written and placed in the public domain by Igor Pavlov.
|
||||||
|
|
||||||
|
Files
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
7zDecode.* - Low level 7z decoding
|
||||||
|
7zExtract.* - High level 7z decoding
|
||||||
|
7zHeader.* - .7z format constants
|
||||||
|
7zIn.* - .7z archive opening
|
||||||
|
7zItem.* - .7z structures
|
||||||
|
7zMain.c - Test application
|
||||||
|
|
||||||
|
|
||||||
|
How To Use
|
||||||
|
----------
|
||||||
|
|
||||||
|
You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:
|
||||||
|
|
||||||
|
7z.exe a archive.7z *.htm -r -mx -m0fb=255
|
||||||
|
|
||||||
|
If you have big number of files in archive, and you need fast extracting,
|
||||||
|
you can use partly-solid archives:
|
||||||
|
|
||||||
|
7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K
|
||||||
|
|
||||||
|
In that example 7-Zip will use 512KB solid blocks. So it needs to decompress only
|
||||||
|
512KB for extracting one file from such archive.
|
||||||
|
|
||||||
|
|
||||||
|
Limitations of current version of 7z ANSI-C Decoder
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
- It reads only "FileName", "Size", "LastWriteTime" and "CRC" information for each file in archive.
|
||||||
|
- It supports only LZMA and Copy (no compression) methods with BCJ or BCJ2 filters.
|
||||||
|
- It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.
|
||||||
|
|
||||||
|
These limitations will be fixed in future versions.
|
||||||
|
|
||||||
|
|
||||||
|
Using 7z ANSI-C Decoder Test application:
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
Usage: 7zDec <command> <archive_name>
|
||||||
|
|
||||||
|
<Command>:
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user