2 more AI plugins for shits n giggles

This commit is contained in:
KingKDot
2026-07-30 22:31:13 -05:00
parent 6c208da75f
commit 9288824fa6
12 changed files with 1755 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
@echo off
setlocal
set "PLUGIN_DIR=%~dp0"
set "PLUGIN_NAME=tic-tac-toe"
set "ZIP_OUT=%PLUGIN_DIR%%PLUGIN_NAME%.zip"
set "DLL_OUT=%PLUGIN_DIR%%PLUGIN_NAME%-windows-amd64.dll"
where gcc >nul 2>&1
if errorlevel 1 (
echo [error] gcc was not found
exit /b 1
)
gcc -shared -O2 -s -o "%DLL_OUT%" "%PLUGIN_DIR%native\plugin.c" -luser32 -lgdi32
if errorlevel 1 (
echo [error] Native build failed
exit /b 1
)
for %%F in (config.json tic-tac-toe.html tic-tac-toe.css tic-tac-toe.js server.js tic-tac-toe-windows-amd64.dll) do (
if not exist "%PLUGIN_DIR%%%F" (
echo [error] Missing %%F
exit /b 1
)
)
if exist "%ZIP_OUT%" del /f /q "%ZIP_OUT%"
pushd "%PLUGIN_DIR%"
powershell -NoProfile -ExecutionPolicy Bypass -Command "Compress-Archive -Path @('config.json','tic-tac-toe.html','tic-tac-toe.css','tic-tac-toe.js','server.js','tic-tac-toe-windows-amd64.dll') -DestinationPath '%ZIP_OUT%' -Force"
set "ZIP_STATUS=%ERRORLEVEL%"
popd
if not "%ZIP_STATUS%"=="0" exit /b %ZIP_STATUS%
echo [ok] %ZIP_OUT%