-
Notifications
You must be signed in to change notification settings - Fork 28
docs: MSYS2 UCRT64 でのビルド手順を追加 #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+103
−0
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b7fd280
docs: add UCRT64 build guide
mattn 83f3e69
Update docs/build_windows_ucrt64.md
mattn 293f874
docs: add VIMDLL=yes section to UCRT64 build guide
mattn febdda0
docs: drop DirectWrite/STATIC_STDCPLUS note from UCRT64 guide
mattn b1df959
docs: fix VIMDLL output name to vim64.dll
mattn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| layout: docs | ||
| title: MSYS2 UCRT64を使ってのビルド方法 | ||
| --- | ||
|
|
||
| ビルド手順はVimのバージョンによって一部変更されていることがあります。公式のビルド手順は、ソースファイル内の [src/INSTALLpc.txt](https://github.com/vim/vim/blob/master/src/INSTALLpc.txt) および、[MinGW用Makefile](https://github.com/vim/vim/blob/master/src/Make_ming.mak)や[Cygwin/MinGW共通Makefile](https://github.com/vim/vim/blob/master/src/Make_cyg_ming.mak)内のコメントを参照してください。 | ||
|
|
||
| UCRT64 環境は、従来の MSVCRT ではなく Universal C Runtime (UCRT) に対してリンクする MSYS2 のサブシステムです。Windows 10 以降では UCRT が標準で搭載されており、新規にビルドする場合は MinGW64 (MSVCRT) よりも UCRT64 を選択することが推奨されています。 | ||
|
|
||
| 1. msys2 のインストール | ||
|
|
||
| <a href="https://www.msys2.org/">msys2</a> をダウンロードしてインストールします。以下は msys2 がインストール済みの前提で記述しています。 | ||
|
|
||
| 2. Git・GCCのインストール | ||
|
|
||
| スタートメニューから `MSYS2 MSYS` を実行し、以下のコマンドを実行してシステムの更新を行います。 | ||
|
|
||
| pacman -Suuy | ||
|
|
||
| MSYS2を終了して再実行するように言われた場合は、それに従ってminttyのウィンドウを閉じ、スタートメニューから再度 `MSYS2 MSYS` を実行し、`pacman -Suu` を実行します。 | ||
| システムの更新が終わったら、以下のコマンドを実行してGitやGCCなど必要なパッケージをインストールします。 | ||
|
|
||
| pacman -S git mingw-w64-ucrt-x86_64-toolchain | ||
|
|
||
| pacmanのwrapperコマンドであるpacboyを使えば、もう少し簡単に、以下のコマンドでインストールできます。 | ||
|
|
||
| pacboy -S git toolchain:u | ||
|
|
||
| pacboyの使い方は、`pacboy help`を実行すると表示されます。パッケージ名の後に`:u`でUCRT64用(`mingw-w64-ucrt-x86_64-`)、`:x`でMinGW64用(`mingw-w64-x86_64-`)、`:c`でClang64用(`mingw-w64-clang-x86_64-`)のパッケージがインストールされます。 | ||
|
|
||
| 3. ソース取得 | ||
|
|
||
| スタートメニューから `MSYS2 UCRT64` を実行し、そこから以下を実行します。 | ||
|
|
||
| git clone https://github.com/vim/vim.git | ||
|
|
||
| `git clone`を実行した後にソースが更新された場合は、以下のコマンドで最新のソースを取得できます。 | ||
|
|
||
| git pull | ||
|
|
||
| 特定のバージョンを指定して取得する場合は、以下のコマンドを実行します。 | ||
|
|
||
| git checkout v9.2.0000 | ||
|
|
||
| 4. コンパイル | ||
|
|
||
| `vim/src`フォルダに移動し以下のコマンドを実行します。 | ||
|
|
||
| mingw32-make -f Make_ming.mak GUI=yes IME=yes MBYTE=yes \ | ||
| ICONV=yes DEBUG=no | ||
|
|
||
| Python3拡張やXPMサポートなどを有効にする場合は、以下の様に指定します(GUI版)。 | ||
|
|
||
| mingw32-make -f Make_ming.mak GUI=yes IME=yes MBYTE=yes ICONV=yes \ | ||
| PYTHON3=c:/msys64/ucrt64 DYNAMIC_PYTHON3=yes PYTHON3_VER=314 \ | ||
| PYTHON3_HOME=c:/msys64/ucrt64/ \ | ||
| PYTHON3INC=-Ic:/msys64/ucrt64/include/python3.14 \ | ||
| DYNAMIC_PYTHON3_DLL=libpython3.14.dll \ | ||
| CSCOPE=yes NETBEANS=yes STATIC_STDCPLUS=yes DEBUG=no \ | ||
| XPM=c:/msys64/ucrt64 | ||
|
|
||
| CUI版(コンソール版)を同時にビルドする場合は、`GUI=no` を指定してもう一度実行します。 | ||
|
|
||
| mingw32-make -f Make_ming.mak GUI=no IME=yes MBYTE=yes ICONV=yes \ | ||
| PYTHON3=c:/msys64/ucrt64 DYNAMIC_PYTHON3=yes PYTHON3_VER=314 \ | ||
| PYTHON3_HOME=c:/msys64/ucrt64/ \ | ||
| PYTHON3INC=-Ic:/msys64/ucrt64/include/python3.14 \ | ||
| DYNAMIC_PYTHON3_DLL=libpython3.14.dll \ | ||
| CSCOPE=yes NETBEANS=yes STATIC_STDCPLUS=yes DEBUG=no \ | ||
| XPM=c:/msys64/ucrt64 | ||
|
|
||
| GUI/CUI 双方をビルドする場合は `VIMDLL=yes` を指定することで、GUI/CUI が利用する共通の DLL (`vim64.dll`) を生成できます。ビルドが1回で済み、サイズも多少節約できます。 | ||
|
|
||
| mingw32-make -f Make_ming.mak GUI=yes IME=yes MBYTE=yes ICONV=yes \ | ||
| VIMDLL=yes \ | ||
| PYTHON3=c:/msys64/ucrt64 DYNAMIC_PYTHON3=yes PYTHON3_VER=314 \ | ||
| PYTHON3_HOME=c:/msys64/ucrt64/ \ | ||
| PYTHON3INC=-Ic:/msys64/ucrt64/include/python3.14 \ | ||
| DYNAMIC_PYTHON3_DLL=libpython3.14.dll \ | ||
| CSCOPE=yes NETBEANS=yes STATIC_STDCPLUS=yes DEBUG=no \ | ||
| XPM=c:/msys64/ucrt64 | ||
|
|
||
| Perl・Ruby・Lua拡張も含めて、msys2 付属のパッケージを利用する場合は以下の様に指定します。バージョン番号(`PERL_VER`等)はインストールされているパッケージに合わせて適宜変更してください。 | ||
|
|
||
| mingw32-make -f Make_ming.mak GUI=yes IME=yes MBYTE=yes ICONV=yes \ | ||
| PERL=c:/msys64/ucrt64 DYNAMIC_PERL=yes PERL_VER=540 \ | ||
| PERLEXE=c:/msys64/ucrt64/bin/perl.exe \ | ||
| PERLLIB=c:/msys64/ucrt64/lib/perl5/core_perl \ | ||
| PYTHON3=c:/msys64/ucrt64 DYNAMIC_PYTHON3=yes PYTHON3_VER=314 \ | ||
| PYTHON3_HOME=c:/msys64/ucrt64/ \ | ||
| PYTHON3INC=-Ic:/msys64/ucrt64/include/python3.14 \ | ||
| DYNAMIC_PYTHON3_DLL=libpython3.14.dll \ | ||
| RUBY=c:/msys64/ucrt64 DYNAMIC_RUBY=yes RUBY_VER=34 RUBY_API_VER_LONG=3.4.0 \ | ||
| LUA=c:/msys64/ucrt64 DYNAMIC_LUA=yes LUA_VER=54 \ | ||
| CSCOPE=yes NETBEANS=yes STATIC_STDCPLUS=yes DEBUG=no \ | ||
| XPM=c:/msys64/ucrt64 | ||
|
|
||
| 注意1) 複数行に跨るのでシェルスクリプトに記載して実行して下さい。Windowsのバッチファイルで実行する場合は行末のバックスラッシュ(`\`)をキャレット(`^`)に置き換えてください。 | ||
|
|
||
| 注意2) `PYTHON3_VER`、`PYTHON3INC`、`DYNAMIC_PYTHON3_DLL` 等の数字は、インストールされているPythonのバージョンに合わせてください。バージョンは `pacman -Qi mingw-w64-ucrt-x86_64-python` で確認できます。Perl・Ruby・Lua も同様です。 | ||
|
|
||
| 注意3) `XPM=c:/msys64/ucrt64` を指定する場合は、事前に `pacboy -S xpm-nox:u` で XPM ライブラリをインストールしておく必要があります。 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.