grnenv-rs is a tool to switch using multiple Groonga versions.
Currently, only confirmed to work on Windows 10, macOS Sierra(10.12), and Ubuntu Trusty (14.04 LTS).
- Visual C++ Redistributable for Visual Studio 2015
x86_64 msvc target binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
And then, put binaries into $Env:USERPROFILE\bin
.
- rustup
Prepare the following dependent libraries:
- C and C++ compilers like gcc or clang
- autoconf
- automake
- libtool
- pkg-config
- pcre
x86_64 musl Linux binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
- grnenv-rs-VERSION-x86_64-unknown-linux-musl.tar.xz
And then, put binaries into $HOME\bin
.
x86_64 macOS binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
- grnenv-rs-VERSION-x86_64-apple-darwin.zip
And then, put binaries into $HOME\bin
.
Prepare the following toolchain:
- rust compiler (installed with rustup)
And then,
$ cargo install grnenv-rs
This tool has plugin system, which is using subcommand mechanism.
You should put grnenv-*
executables into $PATH
or ~/bin
.
In Windows, grnenv-*
subcommand should be portable executables.
If you want to support Windows in subcommand, it recommends to use Rust language and build (i686|x86_64)-pc-windows-msvc target.
PS> grnenv init
And then, Please create profile.ps1 with the following command:
notepad $profile.CurrentUserCurrentHost
And write the following thing:
. $Env:USERPROFILE\.groonga\shims\bin\source-groonga.ps1
then,
PS> grnenv install VERSION [--arch (x86|x64)]
PS> grnenv switch VERSION [--arch (x86|x64)]
Finally, restart powershell and use specified version of Groonga.
If you get an error, you should specify execution policy as follows:
PS> Set-ExecutionPolicy RemoteSigned
$ grnenv init
And write the following content into .bash_profile or .zsh_profile etc.:
. $HOME/.groonga/shims/bin/source-groonga.sh
then,
$ grnenv install VERSION
$ grnenv switch VERSION
Finally, restart your shell and use specified version of Groonga.
MIT.
- 複数の環境で動作するバージョン切り替えツールのgrnenv-rsを作ってみたお話 http://qiita.com/cosmo0920/items/0a975fb4509114e9b189