Skip to content

Instantly share code, notes, and snippets.

@madosuki
Last active September 5, 2020 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madosuki/95d3d32d8321bba4a392fa4e219810e7 to your computer and use it in GitHub Desktop.
Save madosuki/95d3d32d8321bba4a392fa4e219810e7 to your computer and use it in GitHub Desktop.
@echo off
set x64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
set x86="C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
set mes="コンパイルスタート"
if exist "%x64%" (
goto :compile_x64
) else if exist "%x86%" (
goto :compile_x86
) else (
goto :erromes
)
:compile_x64
call %x64%
echo %mes%
goto :compile
:compile_x86
call %x86%
echo %mes%
goto :compile
:compile
cd %1
.\msvcbuild.bat
:erromes
echo "VS2019 Communityエディションをインストールするか、または他のエディション用に変数に代入する文字列を書き換えてください"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment