From 530e6d8b8959656180a7d7421c707475dfbb32b7 Mon Sep 17 00:00:00 2001 From: David Xchel Morales Hurtado Date: Sat, 30 May 2026 13:17:06 -0600 Subject: [PATCH 1/2] Added release make which uses optimized compilation --- makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 08622a2..b590dab 100644 --- a/makefile +++ b/makefile @@ -5,7 +5,7 @@ TESTS=test_build/main.o test_build/main_application_tests.o test_build/browser_a CC=g++ CFLAGS=$(shell pkg-config --cflags gtkmm-4.0 webkitgtk-6.0 gtest_main) -CFLAGS+= -Wall -Wextra -Werror -g -O0 -std=c++20 +CFLAGS+= -Wall -Wextra -Werror -g -std=c++20 LDFLAGS=$(shell pkg-config --libs gtkmm-4.0 webkitgtk-6.0 gtest_main) @@ -32,4 +32,8 @@ test_build/%.o : tests/%.cc $(CC) $(CFLAGS) -c $< -o $@ clean: - rm -rf *build *.exe \ No newline at end of file + rm -rf *build *.exe + +release: CFLAGS+= -O3 +release: LDFLAGS+= -s +release: multiapp From 9550d88bfb2a86134b04563d34595832e7b71ac6 Mon Sep 17 00:00:00 2001 From: David Xchel Morales Hurtado Date: Sat, 30 May 2026 13:18:03 -0600 Subject: [PATCH 2/2] Added docker container notes and release compilation --- Dockerfile | 8 ++------ README.md | 15 ++++++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6f7144..9d1e513 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive # Install base dependencies, build tools, GTKmm 4.0, WebKitGTK 6.0, and X11 forwarding -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --no-install-recommends \ # Build essentials build-essential \ pkg-config \ @@ -17,12 +17,8 @@ RUN apt-get update && apt-get install -y \ libwebkitgtk-6.0-dev \ libasio-dev \ libgtest-dev \ - libx11-dev \ - fonts-dejavu-core \ - fonts-font-awesome \ fontconfig \ locales \ - librsvg2-common \ git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ @@ -40,7 +36,7 @@ COPY . /app/ # Build the application RUN make clean || true -RUN make +RUN make release # Set display environment variable for X11 forwarding ENV DISPLAY=:0 diff --git a/README.md b/README.md index 737087b..bae650f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Small GUI MultiApp project for showcasing and learning C++ made on Linux (Not sure if WebKit is usable in Windows anymore). -This App will evolve with time, at the moment the plan is to have a general layout and testing for different GUI apps living inside the same Window for learning how to use Gtkmm4 and Webkit. +This App will evolve with time, at the moment the plan is to have a general layout and testing for different GUI apps living inside the same Window for learning how to use Gtkmm4 and Webkit. it is not meant to have a goal, it's used to learn and find new ways of coding. In the future it should have apps that work using SQL, SDL and even web requests. @@ -77,15 +77,20 @@ It removes the build/, build_tests/, multiapp.exe and multiapp_tests.exe folders ### 🐋 Docker You can also run with docker! -Just run to create a local image +Just run ```sudo docker build -t multiapp .``` to create a local image. +Note: It can't currently show the web browser or Gtk4 icons. And then run the container using: -- Linux: Run ``` xhost +local:docker ``` create the image using ```sudo docker build -t multiapp .``` and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp``` +- Linux: Run ``` xhost +local:docker ``` +then run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp``` -- Windows: Use ```sudo docker build -t multiapp .``` and run with ``` docker run -it -e DISPLAY=$DISPLAY --network host -v /mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /mnt/host/wslg:/mnt/host/wslg multiapp ``` +- Windows: Run with +``` docker run -it -e DISPLAY=$DISPLAY --network host -v /mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /mnt/host/wslg:/mnt/host/wslg multiapp ``` -- Mac: ``` Use xquartz to allow the connection ```, then run ``` xhost +local:docker ``` finally create the image using ```sudo docker build -t multiapp .``` and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp``` +- Mac: ``` Use xquartz to allow the connection ```, +then run ``` xhost +local:docker ``` +and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp``` ## 📷 Screenshots