Skip to content

Commit

Permalink
impr.Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
R3D9477 committed Nov 20, 2024
1 parent 00c9cfc commit a9280e8
Show file tree
Hide file tree
Showing 24 changed files with 2,437 additions and 2,434 deletions.
107 changes: 53 additions & 54 deletions .devcontainer/Dockerfile_debian_clang-19
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
FROM debian:latest

USER root

RUN passwd --delete root

# INSTALL CLANG

RUN apt update -y
RUN apt install lsb-release ninja-build wget make build-essential software-properties-common gnupg git sudo nano valgrind -y

RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
RUN chmod +x /tmp/llvm.sh
RUN /tmp/llvm.sh 19 all
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-19 100
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 100

# INSTALL ADDITIONAL PKGS (for Qt6)

RUN apt install pkg-config libgl-dev libgl1-mesa-dev xkb-data libxcb-util-dev libxcb-util0-dev \
libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxaw7-dev libxcomposite-dev libxcursor-dev \
libxdamage-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev \
libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev \
libxcb-glx0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev \
libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev \
libxcb-dri3-dev uuid-dev libxcb-cursor-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev libxcb-composite0-dev \
libxcb-ewmh-dev libxcb-res0-dev -y

# INSTALL CPPTOOLS

RUN apt install python3 python3-venv -y

RUN useradd -rm -d /home/build -s /bin/bash -g root -G sudo -u 1001 build
RUN echo "export USER=build" > /etc/profile.d/set_user.sh
RUN mkdir -p "/home/build/cppproject"
RUN passwd --delete build
RUN usermod -a -G sudo build

USER build
WORKDIR /home/build

RUN python3 -m venv /home/build/.local --system-site-packages
RUN echo 'PATH="${PATH}:/home/build/.local/bin"' >> /home/build/.bashrc
RUN export PATH="${PATH}:/home/build/.local/bin"

RUN /home/build/.local/bin/pip install cmake

RUN /home/build/.local/bin/pip install conan
RUN /home/build/.local/bin/conan profile detect
RUN /home/build/.local/bin/conan remote update conancenter --url="https://center2.conan.io"

RUN /home/build/.local/bin/pip install gprof2dot matplotlib pillow
FROM debian:latest

USER root

RUN passwd --delete root

# INSTALL CLANG

RUN apt update -y
RUN apt install lsb-release ninja-build wget make build-essential software-properties-common gnupg git sudo nano valgrind -y

RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
RUN chmod +x /tmp/llvm.sh
RUN /tmp/llvm.sh 19 all
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-19 100
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 100

# INSTALL ADDITIONAL PKGS (for Qt6)

RUN apt install pkg-config libgl-dev libgl1-mesa-dev xkb-data libxcb-util-dev libxcb-util0-dev \
libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxaw7-dev libxcomposite-dev libxcursor-dev \
libxdamage-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev \
libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev \
libxcb-glx0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev \
libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev \
libxcb-dri3-dev uuid-dev libxcb-cursor-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev libxcb-composite0-dev \
libxcb-ewmh-dev libxcb-res0-dev -y

# INSTALL CPPTOOLS

RUN apt install python3 python3-venv -y

RUN useradd -rm -d /home/build -s /bin/bash -g root -G sudo -u 1001 build
RUN echo "export USER=build" > /etc/profile.d/set_user.sh
RUN mkdir -p "/home/build/cppproject"
RUN passwd --delete build
RUN usermod -a -G sudo build

USER build
WORKDIR /home/build

RUN python3 -m venv /home/build/.local --system-site-packages
RUN echo 'PATH="${PATH}:/home/build/.local/bin"' >> /home/build/.bashrc
RUN export PATH="${PATH}:/home/build/.local/bin"

RUN /home/build/.local/bin/pip install cmake

RUN /home/build/.local/bin/pip install conan
RUN /home/build/.local/bin/conan remote update conancenter --url="https://center2.conan.io"

RUN /home/build/.local/bin/pip install gprof2dot matplotlib pillow
73 changes: 37 additions & 36 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu
{
"name": "${localWorkspaceFolderBasename}",
"service": "cppproject",
"dockerComposeFile": "./docker-compose.user_debian_clang-19.yaml",
"workspaceFolder": "/home/build/cppproject",
"remoteUser": "build",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode-remote.remote-containers",
"ms-vscode.cpptools-extension-pack",
"xaver.clang-format",
"ryuta46.multi-command",
"vadimcn.vscode-lldb",
"fredericbonnet.cmake-test-adapter",
"matepek.vscode-catch2-test-adapter",
"krosf.vscode-valgrind",
"tintinweb.graphviz-interactive-preview",
"Guyutongxue.cpp-reference",
"CFXS.BuildOutputColorizerIAR",
"SR-team.vscode-autohide-fork",
"Blackboxapp.blackbox",
"jiapeiyao.tab-group",
"hediet.vscode-drawio",
"rioj7.command-variable",
"dacapoday.status-bar-button",
"ArturoDent.launch-config"
]
}
},
"containerEnv": {
"DISPLAY": ":0"
}
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu
{
"name": "${localWorkspaceFolderBasename}",
"service": "cppproject",
"dockerComposeFile": "./docker-compose.user_debian_clang-19.yaml",
"workspaceFolder": "/home/build/cppproject",
"remoteUser": "build",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode-remote.remote-containers",
"ms-vscode.cpptools-extension-pack",
"xaver.clang-format",
"ryuta46.multi-command",
"vadimcn.vscode-lldb",
"fredericbonnet.cmake-test-adapter",
"matepek.vscode-catch2-test-adapter",
"krosf.vscode-valgrind",
"tintinweb.graphviz-interactive-preview",
"Guyutongxue.cpp-reference",
"CFXS.BuildOutputColorizerIAR",
"SR-team.vscode-autohide-fork",
"Blackboxapp.blackbox",
"jiapeiyao.tab-group",
"hediet.vscode-drawio",
"rioj7.command-variable",
"dacapoday.status-bar-button",
"ArturoDent.launch-config"
]
}
},
"containerEnv": {
"DISPLAY": ":0"
},
"postStartCommand": "/home/build/.local/bin/conan profile detect --exist-ok"
}
78 changes: 39 additions & 39 deletions .devcontainer/docker-compose.user_debian_clang-19.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
x-setup: &setup
image: cpp-dev
build:
context: ..
dockerfile: ./.devcontainer/Dockerfile_debian_clang-19
stdin_open: true
tty: true
network_mode: host
environment:
SSH_AUTH_SOCK: /ssh-agent
ulimits:
nofile:
soft: 1024
hard: 1024

x-volume-cppproject: &volume-cppproject
type: bind
source: ../
target: /home/build/cppproject

x-volume-conan2-cache: &volume-conan2-cache
type: bind
source: ./conan2_cache
target: /home/build/.conan2

services:
cppproject:
<<: *setup
volumes:
- <<: *volume-cppproject
- <<: *volume-conan2-cache
- type: bind
source: ${SSH_AUTH_SOCK:-/dev/null}
target: /ssh-agent
- type: bind
source: /tmp/.X11-unix
target: /tmp/.X11-unix
devices:
- /dev/dri:/dev/dri
x-setup: &setup
image: cpp-dev
build:
context: ..
dockerfile: ./.devcontainer/Dockerfile_debian_clang-19
stdin_open: true
tty: true
network_mode: host
environment:
SSH_AUTH_SOCK: /ssh-agent
ulimits:
nofile:
soft: 1024
hard: 1024

x-volume-cppproject: &volume-cppproject
type: bind
source: ../
target: /home/build/cppproject

x-volume-conan2-cache: &volume-conan2-cache
type: bind
source: ./conan2_cache
target: /home/build/.conan2

services:
cppproject:
<<: *setup
volumes:
- <<: *volume-cppproject
- <<: *volume-conan2-cache
- type: bind
source: ${SSH_AUTH_SOCK:-/dev/null}
target: /ssh-agent
- type: bind
source: /tmp/.X11-unix
target: /tmp/.X11-unix
devices:
- /dev/dri:/dev/dri
18 changes: 9 additions & 9 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"configurations": [
{
"name": "CMake",
"configurationProvider": "ms-vscode.cmake-tools",
"includePath": [ "${workspaceFolder}/**" ]
}
],
"version": 4
{
"configurations": [
{
"name": "CMake",
"configurationProvider": "ms-vscode.cmake-tools",
"includePath": [ "${workspaceFolder}/**" ]
}
],
"version": 4
}
34 changes: 17 additions & 17 deletions .vscode/dev/liveprocmon_optimized_refresh_disabled.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

def generate_index_html():

with open('index.html', 'w') as index_html:
index_html.write("<!DOCTYPE html><body><header>")
index_html.write('<script>')
index_html.write('var counter = 0;')
index_html.write('var plotimg = document.getElementById("plotimg");')
index_html.write('function refreshPlotImg()')
index_html.write('{')
index_html.write(' plotimg.src = plotimg.src + "?" + (counter++);')
index_html.write(' setTimeout(refreshPlotImg, {})'.format(UPDATE_FREQUECY_MS))
index_html.write('}')
index_html.write('refreshPlotImg()')
index_html.write('</script></header>')
index_html.write('<img id="plotimg" src="{}">'.format(PLOT_FILE_NAME))
index_html.write("</body></html>")

def generate_index_html():

with open('index.html', 'w') as index_html:
index_html.write("<!DOCTYPE html><body><header>")
index_html.write('<script>')
index_html.write('var counter = 0;')
index_html.write('var plotimg = document.getElementById("plotimg");')
index_html.write('function refreshPlotImg()')
index_html.write('{')
index_html.write(' plotimg.src = plotimg.src + "?" + (counter++);')
index_html.write(' setTimeout(refreshPlotImg, {})'.format(UPDATE_FREQUECY_MS))
index_html.write('}')
index_html.write('refreshPlotImg()')
index_html.write('</script></header>')
index_html.write('<img id="plotimg" src="{}">'.format(PLOT_FILE_NAME))
index_html.write("</body></html>")
Loading

0 comments on commit a9280e8

Please sign in to comment.