From c94ffd1a56c5d87a6f9eb577f2fe2bcecdced8a0 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Fri, 14 Apr 2023 10:55:11 -0400 Subject: [PATCH] cli: Add spark.console.cmd (alias for Spark.Console.exe) --- tools/spark.console.cmd | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tools/spark.console.cmd diff --git a/tools/spark.console.cmd b/tools/spark.console.cmd new file mode 100644 index 000000000..27b72927e --- /dev/null +++ b/tools/spark.console.cmd @@ -0,0 +1,33 @@ +@echo off + +@REM Launch Spark.Console.exe +@REM Usage: spark.console.cmd +@REM Usage: spark.console.cmd [debug|release] + +setlocal +@REM Note: Evaluate %~dp0 before running SHIFT. Initially, it equals this +@REM script's parent dir. Once SHIFT is run, it changes to the working dir. +set REPO_DIR=%~dp0.. +set BUILD_TYPE=Debug + +@REM If the first arg is 'debug' or 'release', it indicates which +@REM Spark.Console.exe to run (debug or release). All other args are passed to +@REM Spark.Console.exe. +IF /I "%1"=="release" ( + set BUILD_TYPE=Release + shift +) ELSE IF /I "%1"=="debug" ( + shift +) + +set SPARK_CONSOLE_EXE_ARGS=%1 +if "%1"=="" goto launch_spark_console +shift +:exe_args_loop +if "%1"=="" goto launch_spark_console +set SPARK_CONSOLE_EXE_ARGS=%SPARK_CONSOLE_EXE_ARGS% %1 +shift +goto exe_args_loop + +:launch_spark_console +%REPO_DIR%\build\%BUILD_TYPE%\bin\net7.0\Spark.Console.exe %SPARK_CONSOLE_EXE_ARGS%