Skip to content

Commit

Permalink
Batch script for generating Visual Studio project
Browse files Browse the repository at this point in the history
  • Loading branch information
vkedwardli committed Nov 25, 2023
1 parent e3e42f8 commit 32dc825
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions shell/windows/generate_vs_project.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off
setlocal EnableDelayedExpansion
cmake --version >nul 2>&1 && (
set cmake=1
) || (
echo please install cmake first
)

if !cmake! equ 1 (
cd /d "%~dp0..\.."
echo 1: Visual Studio 2022
echo 2: Visual Studio 2019
echo 3: Visual Studio 2017
set "num=1"
set /p num="Enter your preference [1]: "
if !num! equ 2 (
set "generator=Visual Studio 16 2019"
)else if !num! equ 3 (
set "generator=Visual Studio 15 2017"
) else (
set "generator=Visual Studio 17 2022"
)
echo Generating !generator! ...
cmake -B build -G "!generator!" -A x64
start build\flycast.vcxproj
)

pause

0 comments on commit 32dc825

Please sign in to comment.