-
Notifications
You must be signed in to change notification settings - Fork 169
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
Visual Studio 2022に対応する #1755
Visual Studio 2022に対応する #1755
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -154,10 +154,9 @@ exit /b | |||
:: | ||||
:: ARG_VSVERSION | ||||
:: latest => the latest version of installed Visual Studio | ||||
:: 2017 => Visual Studio 2017 | ||||
:: 2019 => Visual Studio 2019 | ||||
:: 15 => Visual Studio 2017 | ||||
:: 16 => Visual Studio 2019 | ||||
:: 2017 or 15 => Visual Studio 2017 | ||||
:: 2019 or 16 => Visual Studio 2019 | ||||
:: 2022 or 17 => Visual Studio 2022 | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここのコメント修正はどちらでもよいです。 visual studio 的に「バージョン」とは 17.0 のことで 2022 は「商標」にあたります。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. そもそも
とすればよかったような気もします。 |
||||
:: --------------------------------------------------------------------------------------------------------------------- | ||||
:msbuild | ||||
:: convert productLineVersion to Internal Major Version | ||||
|
@@ -167,6 +166,8 @@ exit /b | |||
set NUM_VSVERSION=15 | ||||
) else if "%ARG_VSVERSION%" == "2019" ( | ||||
set NUM_VSVERSION=16 | ||||
) else if "%ARG_VSVERSION%" == "2022" ( | ||||
set NUM_VSVERSION=17 | ||||
) else if "%ARG_VSVERSION%" == "latest" ( | ||||
call :check_latest_installed_vsversion | ||||
) else ( | ||||
|
@@ -185,6 +186,8 @@ exit /b | |||
set CMAKE_G_PARAM=Visual Studio 15 2017 | ||||
) else if "%NUM_VSVERSION%" == "16" ( | ||||
set CMAKE_G_PARAM=Visual Studio 16 2019 | ||||
) else if "%NUM_VSVERSION%" == "17" ( | ||||
set CMAKE_G_PARAM=Visual Studio 17 2022 | ||||
) else ( | ||||
call :set_cmake_gparam_automatically | ||||
) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 235行目ですが、ここに「17^」を追加する必要がある気がします。 Line 235 in 90951db
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👆の部分は、利用できるMsBuildのパスを列挙する部分です。 vs2019のMsBuildは、vs2022を使ったビルドができる仕様なので、 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VS2019/VS2022が混在した環境で実行し、vswhereにどんな引数が入るか確認してみました。
引数に「15」を与えた場合(※実行した環境にVS2017はインストールされていない)
引数に「16」を与えた場合
引数に「17」を与えた場合
探索ロジックがまずビルドツールを「指定したバージョンが利用できるか調べ、できなければ最新のものを選ぶ」ようになっており、MSBuildは「ビルドツールの探索で決定したバージョンのものを探す」ようになっているようなので、find-tools.batの実行結果からは問題なく見えています。 しかし、
ビルドツールの探索と同じく、指定バージョンのものが見つからなければ利用可能な最新のものを選ぶようにして良いのではないかと思うのですが。
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 単独環境はこうなりました。 VS2017のみ
VS2019のみ
VS2022のみ
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vswhere -versionを使って抽出するには
となります。
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :find_msbuild_legacyについてですが There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
|
This comment was marked as duplicate.
Sorry, something went wrong.