diff --git a/README.md b/README.md index 62069d0..cdc0be2 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,9 @@ where the mask is set to zero. In order to easily debug and better visualize the problem, I chose to implement a minimal GUI using [raylib][3]. +You can build it with `./build-gui.sh` (you need to installed [raylib required +libraries](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)). + You can add, move, and resize boxes. Processing steps are triggered with buttons. @@ -85,6 +88,9 @@ buttons. A commandline sample is also available, in case the raylib library cannot be built, or if we need to benchmark performance. +You can build it with `./build-cli.sh` (you need to installed [raylib required +libraries](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)). + ## PNG support I chose to support PNG files through the stb files: diff --git a/build-cli.sh b/build-cli.sh new file mode 100755 index 0000000..b2cd959 --- /dev/null +++ b/build-cli.sh @@ -0,0 +1,14 @@ +#! /bin/sh -e +export tup_vardict="/home/fabs/Code/netatmo-algo/tup-generate.vardict" +cd "src" +(clang++ -c a2.cpp -o a2.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c bounding_box.cpp -o bounding_box.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c frame.cpp -o frame.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c mapping.cpp -o mapping.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c mask.cpp -o mask.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c pack.cpp -o pack.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c png.cpp -o png.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(ar rcs libpacking.a a2.o bounding_box.o frame.o mapping.o mask.o pack.o png.o) +(clang++ -c main_cli.cpp -o main_cli.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c png_impl.cpp -o png_impl.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ libpacking.a main_cli.o png_impl.o -o ../packing_cli -L. -lpacking) diff --git a/build-gui.sh b/build-gui.sh new file mode 100755 index 0000000..7ffa62c --- /dev/null +++ b/build-gui.sh @@ -0,0 +1,14 @@ +#! /bin/sh -e +export tup_vardict="/home/fabs/Code/netatmo-algo/tup-generate.vardict" +cd "src" +(clang++ -c a2.cpp -o a2.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c bounding_box.cpp -o bounding_box.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c frame.cpp -o frame.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c mapping.cpp -o mapping.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c mask.cpp -o mask.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c pack.cpp -o pack.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(clang++ -c png.cpp -o png.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb) +(ar rcs libpacking.a a2.o bounding_box.o frame.o mapping.o mask.o pack.o png.o) +(cd 3rd-party/raylib-4.0.0/src && make CC=clang PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_AUDIO=FALSE RAYLIB_MODULE_MODELS=FALSE) +(clang++ -c main_gui.cpp -o main_gui.o -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1 -I./3rd-party/stb -I3rd-party/raylib-4.0.0/src) +(clang++ libpacking.a main_gui.o -o ../packing_gui -L. -lpacking -L3rd-party/raylib-4.0.0 -lraylib -lGL -lc -lm -lpthread -ldl -lrt -lX11)