summaryrefslogtreecommitdiff
path: root/build-win.bat
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-01-30 21:11:12 +0100
committerAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-01-30 21:11:12 +0100
commit260f05025631031b7cc4904805d5017feaf53eda (patch)
treed5a723bb7bbbc9f8b598712723fe3d8290c0a54c /build-win.bat
initial commit
Diffstat (limited to 'build-win.bat')
-rw-r--r--build-win.bat22
1 files changed, 22 insertions, 0 deletions
diff --git a/build-win.bat b/build-win.bat
new file mode 100644
index 0000000..13cbace
--- /dev/null
+++ b/build-win.bat
@@ -0,0 +1,22 @@
+@echo off
+
+windres misc/icon.rc -O coff -o misc/icon.res
+
+DEL /S /Q bin
+cd src
+
+ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/error.png ../data/imgs/folder.png ../data/imgs/nl.png ../data/imgs/search.png ../data/imgs/logo_64.png ../data/fonts/mono.ttf ../data/translations/en-English.mo ../data/translations/nl-Dutch.mo ../data/imgs/list.png ../data/imgs/delete.png ../data/imgs/exclaim.png
+
+if "%1"=="-w" (SET defs=-DMODE_DEVELOPER -DMODE_GDBDEBUG) else (SET defs=-DMODE_DEVELOPER)
+
+x86_64-w64-mingw32-gcc -m64 -Wall -g %defs% -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/moedit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi
+
+DEL /Q "../bin/data.o"
+
+FOR %%A IN ("../bin/moedit.exe") DO set size=%%~zA
+echo size = %size%
+
+cd ../
+
+if "%1"=="-r" start bin/moedit.exe
+if "%1"=="-w" start gdb -ex run bin/moedit.exe \ No newline at end of file