hererocks が VS2019BuildTools を検知して動作するように改造してみた。
Visual Studio 2019 patch by ousttrue · Pull Request #15 · luarocks/hererocks
This fix detects the installation of vc by vswhere and adds the environment variables INCLUDE, LIB, PATH from the run of vcvars64.bat.
I'm using VisualStudio2019BuildTools on Windows10(64bit)
Thank...
https://github.com/luarocks/hererocks/pull/15
通るかどうかは微妙。 内容的に、通りづらそう。 古い vc を使っていたり MinGW 使っていたりすると実験できないしね。 とりあえず、既存の動いている部分が壊れないようには配慮した。
採用されれば、
Hererocks fails to install in Windows · Issue #302 · wbthomason/packer.nvim
I tried to install some luarocks in Windows and I got this error. I tried running nvim as both admin and non-admin, still hitting same error. There wasn't a specific error message shown compared to...
https://github.com/wbthomason/packer.nvim/issues/302
も進展する。 Windows 版の luarocks 呼び出しに改造が必要なのだが、 先に hererocks が動いている必要があるという順番。
とりあえず単体で試すことができて
とする。
lua はシステムにインストールして全体でライブラリを共有するというよりは、
プロジェクト単位でインストールしてローカルに必要なライブラリだけを追加するという運用になりそう。
なので、 hererocks でプロジェクトローカルに lua をサクッとビルドできるのはなかなかよい。
python の venv 的な運用。
展開先は、 .gitignore
する。
ただ、外部ライブラリのラッパーがさくっと動くかというと Windows だと厳しいものがありますな・・・。
vcpkg と連携させるとか、更なる頑張りが必要かもしれない。
なので、 luajit の ffi が面白いかもしれない。
standalone の lua インタプリタを使う場合は hererocks
がいいのではないか。
vswhere メモ
GitHub - microsoft/vswhere: Locate Visual Studio 2017 and newer installations
Locate Visual Studio 2017 and newer installations. Contribute to microsoft/vswhere development by creating an account on GitHub.
https://github.com/Microsoft/vswhere
cl.exe
, msbuild.exe
などの探索に使う。
vs2017 version 15.2
以降に入っているらしい。
こんな感じに使う。
Find VC
Locate Visual Studio 2017 and newer installations. Contribute to microsoft/vswhere development by creating an account on GitHub.
https://github.com/microsoft/vswhere/wiki/Find-VC
フィルタをかけられる。
見つかったパスから先は固定であるとみなして、 vcvars64.bat
などを見つける。