Skip to content

Instantly share code, notes, and snippets.

@SuperFromND
Created March 14, 2023 17:09
Show Gist options
  • Save SuperFromND/fa10ba93f9457da2d485cdb424c20ded to your computer and use it in GitHub Desktop.
Save SuperFromND/fa10ba93f9457da2d485cdb424c20ded to your computer and use it in GitHub Desktop.
Open Manifold - Build & Test Wrapper Script for Windows
@echo off
:4
make -C %~dp0
:m
ECHO 1. Run Game
ECHO 2. Run Game w/ Debug
ECHO 3. Open Folder
ECHO 4. Re-Compile EXE
ECHO 5. Make Background Test
ECHO 6. Exit
CHOICE /C 123456 /M "Enter your choice: "
IF ERRORLEVEL 6 GOTO 6
IF ERRORLEVEL 5 GOTO 5
IF ERRORLEVEL 4 GOTO 4
IF ERRORLEVEL 3 GOTO 3
IF ERRORLEVEL 2 GOTO 2
IF ERRORLEVEL 1 GOTO 1
:1
start "" /d %~dp0bin OpenManifold.exe
cd ..
GOTO End
:2
start "" /d %~dp0bin OpenManifold.exe -d
cd ..
GOTO End
:3
start /d %~dp0
GOTO End
:5
make bg-test
GOTO m
:6
GOTO End
:End
REM Do nothing.
@SuperFromND
Copy link
Author

SuperFromND commented Mar 14, 2023

This is a batch script for Windows that can be used to quickly test code changes in Open Manifold. It is intended to be invoked from your editor of choice, such as Notepad++, via a hotkey combination. In my case, I have it set to run with Ctrl-Shift-C.

To use this file, save it as a .bat file called test.bat and place it into the root of the Open-Manifold code repository. It should be in the same directory that contains the Makefile.

Upon execution, it will navigate to the directory the batch file is contained in and compile Open Manifold, then ask you what to do next.

This file has been purposefully excluded from the repository using .gitignore so as not to confuse non-Windows users, but if you wish to use this script, then go ahead. I am releasing it to the public domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment