Created
December 3, 2025 14:41
-
-
Save doccaico/e83278a8896bb848e6111e15b9625cdf to your computer and use it in GitHub Desktop.
build and run on Windows (Odin + Raylib)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| set EXE=main | |
| set PDB=main | |
| odin build main.odin -file -strict-style -vet -debug -out:%EXE%.exe -pdb-name:%PDB%.pdb | |
| if %ERRORLEVEL% neq 0 exit /b 1 | |
| set ODIN_PATH= | |
| for /f "delims=" %%i in ('odin root') do set "ODIN_PATH=%%i" | |
| if not exist "raylib.dll" ( | |
| if exist "%ODIN_PATH%\vendor\raylib\windows\raylib.dll" ( | |
| copy "%ODIN_PATH%\vendor\raylib\windows\raylib.dll" . 1> nul | |
| if %ERRORLEVEL% neq 0 exit /b 1 | |
| ) else ( | |
| echo "Please copy raylib.dll from <your_odin_compiler>/vendor/raylib/windows/raylib.dll to the same directory as %EXE%.exe" | |
| exit /b 1 | |
| ) | |
| ) | |
| if "%~1"=="run" ( | |
| %EXE%.exe | |
| ) | |
| endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment