@echo off
setlocal

set "QSFERA_EXE=%USERPROFILE%\craft\CraftMaster\windows-cl-msvc2022-x86_64\bin\qsfera.exe"
for %%I in ("%QSFERA_EXE%") do set "QSFERA_DIR=%%~dpI"

if not exist "%QSFERA_EXE%" (
    echo QSfera executable was not found:
    echo "%QSFERA_EXE%"
    echo.
    echo Build and install the desktop app first, then run this file again.
    pause
    exit /b 1
)

start "" /D "%QSFERA_DIR%" "%QSFERA_EXE%" --show
