Skip to content

Commit

Permalink
Updated the create-project script to include the UI template type
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-bures committed Dec 15, 2023
1 parent 7fd0f89 commit e6cf990
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions create-project.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ echo This script will create a new SpaceWarp mod project.
echo.
echo Choose the template you want to use:
echo 1. General mod (with example code)
echo 2. Empty mod
echo 3. Library mod
echo 2. General mod with UI
echo 3. Empty mod
echo 4. Library mod
echo.
choice /c 123 /n /m "Choice [1-3]: "
choice /c 1234 /n /m "Choice [1-4]: "

if %errorlevel% == 0 goto error
if %errorlevel% == 255 goto error
Expand Down Expand Up @@ -47,8 +48,9 @@ set "CheckVersion="
set /p "CheckVersion=Version check URL (default is empty): "

if %choice% == 1 goto general
if %choice% == 2 goto empty
if %choice% == 3 goto library
if %choice% == 2 goto ui
if %choice% == 3 goto empty
if %choice% == 4 goto library

:error
echo Invalid choice.
Expand All @@ -59,6 +61,11 @@ echo Creating general mod project...
dotnet new spacewarpmod-general -n "%ProjectName%" -M "%ModName%" -A "%Author%" -D "%Description%" -S "%Source%" -V "%Version%" -C "%CheckVersion%"
goto setup

:ui
echo Creating UI mod project...
dotnet new spacewarpmod-ui -n "%ProjectName%" -M "%ModName%" -A "%Author%" -D "%Description%" -S "%Source%" -V "%Version%" -C "%CheckVersion%"
goto setup

:empty
echo Creating empty mod project...
dotnet new spacewarpmod-empty -n "%ProjectName%" -M "%ModName%" -A "%Author%" -D "%Description%" -S "%Source%" -V "%Version%" -C "%CheckVersion%"
Expand Down

0 comments on commit e6cf990

Please sign in to comment.