Skip to content
Merged

misc #48

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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/* \
Expand All @@ -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
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -32,4 +32,8 @@ test_build/%.o : tests/%.cc
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -rf *build *.exe
rm -rf *build *.exe

release: CFLAGS+= -O3
release: LDFLAGS+= -s
release: multiapp