| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7f0cad5 commit 417e98a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,18 +1,59 @@ | |||
| 1 | 1 | @echo off | |
| 2 | + | ||
| 3 | + REM Default VS paths to check if no Paths.cmd file exists | ||
| 4 | + set VISUAL_STUDIO_PATH_0="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" | ||
| 5 | + set VISUAL_STUDIO_PATH_1="%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" | ||
| 6 | + set VISUAL_STUDIO_PATH_2="%programfiles(x86)%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe" | ||
| 7 | + set VISUAL_STUDIO_PATH_3="%programfiles(x86)%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe" | ||
| 8 | + | ||
| 2 | 9 | pushd "%~dp0" | |
| 3 | 10 | if exist Debug rd /s /q Debug | |
| 4 | 11 | if exist Release rd /s /q Release | |
| 5 | 12 | if exist x64 rd /s /q x64 | |
| 6 | 13 | ||
| 7 | - IF NOT EXIST "Paths.cmd" ( | ||
| 8 | - ECHO Please copy "Paths.cmd.template", enter your Visual Studio path and rename it to "Paths.cmd". | ||
| 9 | - PAUSE | ||
| 10 | - GOTO exit | ||
| 14 | + if exist "Paths.cmd" ( | ||
| 15 | + REM Prefer Paths.cmd as Visual Studio path source if it exists. | ||
| 16 | + call Paths.cmd | ||
| 17 | + goto build | ||
| 18 | + ) else ( | ||
| 19 | + REM Otherwise try to auto-detect the Visual Studio path. | ||
| 20 | + if exist %VISUAL_STUDIO_PATH_0% ( | ||
| 21 | + set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_0% | ||
| 22 | + goto build | ||
| 11 | 23 | ) | |
| 12 | 24 | ||
| 13 | - call Paths.cmd | ||
| 14 | - "%VISUAL_STUDIO_PATH%" /p:Configuration=Release | ||
| 25 | + if exist %VISUAL_STUDIO_PATH_1% ( | ||
| 26 | + set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_1% | ||
| 27 | + goto build | ||
| 28 | + ) | ||
| 29 | + | ||
| 30 | + if exist %VISUAL_STUDIO_PATH_2% ( | ||
| 31 | + set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_2% | ||
| 32 | + goto build | ||
| 33 | + ) | ||
| 34 | + | ||
| 35 | + if exist %VISUAL_STUDIO_PATH_3% ( | ||
| 36 | + set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_3% | ||
| 37 | + goto build | ||
| 38 | + ) | ||
| 39 | + | ||
| 40 | + REM No default path found. Let the user know what to do. | ||
| 41 | + echo No Visual Studio installation found. Please configure it manually. | ||
| 42 | + echo 1. Copy 'Paths.cmd.template'. | ||
| 43 | + echo 2. Rename it to 'Paths.cmd'. | ||
| 44 | + echo 3. Enter your Visual Studio path in there. | ||
| 45 | + echo 4. Restart the build. | ||
| 46 | + REM Allow disabling pause to support non-interacting build chains. | ||
| 47 | + if NOT "%~1"=="-no-pause" pause | ||
| 48 | + goto end | ||
| 49 | + ) | ||
| 50 | + | ||
| 51 | + :build | ||
| 52 | + REM Log the used Vistual Studio version. | ||
| 53 | + @echo on | ||
| 54 | + %VISUAL_STUDIO_PATH% /p:Configuration=Release | ||
| 55 | + @echo off | ||
| 15 | 56 | ||
| 16 | - :exit | ||
| 57 | + :end | ||
| 17 | 58 | popd | |
| 18 | 59 | @echo on | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,4 @@ | |||
| 1 | 1 | @echo off | |
| 2 | - :: Set your Visual Studio path here. | ||
| 3 | - :: TODO: Make visual studio path auto detection. | ||
| 4 | - | ||
| 5 | - :: Enterprise path | ||
| 6 | - SET VISUAL_STUDIO_PATH=%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe | ||
| 7 | - | ||
| 8 | - :: Community path | ||
| 9 | - ::SET VISUAL_STUDIO_PATH=%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe | ||
| 10 | - | ||
| 11 | - echo Using Visual Studio path:%VISUAL_STUDIO_PATH% | ||
| 2 | + REM Set your Visual Studio path here. | ||
| 3 | + SET VISUAL_STUDIO_PATH="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" | ||
| 12 | 4 | @echo on | |
| Back | FazBrowse Home | New Git URL |
0 commit comments