@echo off
chcp 65001 >nul 2>&1
title MaQiangTang Launcher

echo.
echo Starting MaQiangTang...
echo.

REM 转义 $ 符号
set "PLUGIN_DIR=D:\共享\extracted_files\$PLUGINSDIR\app-64\resources\decompiled_code"

cd /d "%PLUGIN_DIR%"

if errorlevel 1 (
    echo Error: Cannot find directory
    pause
    exit /b 1
)

if not exist "node_modules\electron" (
    echo Installing Electron...
    call npm install electron --save-dev
)

echo Launching...
npx electron .

pause