qt6: add 'i18n' example

Fixes #5421
This commit is contained in:
Christian Prochaska 2025-01-15 04:22:29 +01:00 committed by Christian Helmuth
parent 916d036b58
commit 6c1af53909
10 changed files with 174 additions and 0 deletions

View File

@ -0,0 +1,19 @@
MIRROR_FROM_REP_DIR := src/app/qt6/examples/i18n_cmake
content: $(MIRROR_FROM_REP_DIR) LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6_tools)
MIRROR_FROM_PORT_DIR := src/lib/qt6_tools/examples/linguist/i18n
content: $(MIRROR_FROM_PORT_DIR)
$(MIRROR_FROM_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(PORT_DIR)/$@ $(dir $@)
LICENSE:
cp $(PORT_DIR)/src/lib/qt6_tools/LICENSES/GPL-3.0-only.txt $@

View File

@ -0,0 +1 @@
2025-01-15 a954ed52258bcb371fb38df7c1ce01df38d8844b

View File

@ -0,0 +1,5 @@
libc
mesa
qt6_base
qt6_component
stdcxx

View File

@ -0,0 +1,19 @@
MIRROR_FROM_REP_DIR := src/app/qt6/examples/i18n_qmake
content: $(MIRROR_FROM_REP_DIR) LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6_tools)
MIRROR_FROM_PORT_DIR := src/lib/qt6_tools/examples/linguist/i18n
content: $(MIRROR_FROM_PORT_DIR)
$(MIRROR_FROM_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(PORT_DIR)/$@ $(dir $@)
LICENSE:
cp $(PORT_DIR)/src/lib/qt6_tools/LICENSES/GPL-3.0-only.txt $@

View File

@ -0,0 +1 @@
2025-01-15 a954ed52258bcb371fb38df7c1ce01df38d8844b

View File

@ -0,0 +1,5 @@
libc
mesa
qt6_base
qt6_component
stdcxx

View File

@ -0,0 +1,46 @@
source ${genode_dir}/repos/libports/run/qt6_common.inc
import_from_depot [depot_user]/src/qt6_component \
[depot_user]/src/qt6_i18n_cmake
install_config {
<config>
<parent-provides>
} [qt6_parent_provides] {
</parent-provides>
<default caps="100"/>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
} [qt6_start_nodes] {
<start name="i18n" caps="1000">
<resource name="RAM" quantum="80M"/>
<config>
<vfs>
<dir name="dev">
<log/>
<inline name="rtc">2018-01-01 00:01</inline>
</dir>
<dir name="pipe"> <pipe/> </dir>
<tar name="qt6_dejavusans.tar"/>
<tar name="qt6_libqgenode.tar"/>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
</config>
<route>
<service name="Gui"> <child name="wm"/> </service>
<service name="Report" label="shape">
<child name="pointer" label="wm -> i18n -> shape"/>
</service>
<service name="ROM" label="mesa_gpu.lib.so">
<parent label="mesa_gpu-softpipe.lib.so" />
</service>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>
</config>
}
build_boot_image [qt6_boot_modules]
run_genode_until forever

View File

@ -0,0 +1,46 @@
source ${genode_dir}/repos/libports/run/qt6_common.inc
import_from_depot [depot_user]/src/qt6_component \
[depot_user]/src/qt6_i18n_qmake
install_config {
<config>
<parent-provides>
} [qt6_parent_provides] {
</parent-provides>
<default caps="100"/>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
} [qt6_start_nodes] {
<start name="i18n" caps="1000">
<resource name="RAM" quantum="80M"/>
<config>
<vfs>
<dir name="dev">
<log/>
<inline name="rtc">2018-01-01 00:01</inline>
</dir>
<dir name="pipe"> <pipe/> </dir>
<tar name="qt6_dejavusans.tar"/>
<tar name="qt6_libqgenode.tar"/>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
</config>
<route>
<service name="Gui"> <child name="wm"/> </service>
<service name="Report" label="shape">
<child name="pointer" label="wm -> i18n -> shape"/>
</service>
<service name="ROM" label="mesa_gpu.lib.so">
<parent label="mesa_gpu-softpipe.lib.so" />
</service>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>
</config>
}
build_boot_image [qt6_boot_modules]
run_genode_until forever

View File

@ -0,0 +1,16 @@
ifeq ($(CONTRIB_DIR),)
QT6_TOOLS_DIR = $(call select_from_repositories,src/lib/qt6_tools)
else
QT6_TOOLS_PORT_DIR := $(call select_from_ports,qt6_tools)
QT6_TOOLS_DIR = $(QT6_TOOLS_PORT_DIR)/src/lib/qt6_tools
endif
CMAKE_LISTS_DIR = $(QT6_TOOLS_DIR)/examples/linguist/i18n
CMAKE_TARGET_BINARIES = i18n
QT6_PORT_LIBS = libQt6Core \
libQt6Gui \
libQt6Widgets
LIBS = qt6_cmake libc libm qt6_component stdcxx mesa egl

View File

@ -0,0 +1,16 @@
ifeq ($(CONTRIB_DIR),)
QT6_TOOLS_DIR = $(call select_from_repositories,src/lib/qt6_tools)
else
QT6_TOOLS_PORT_DIR := $(call select_from_ports,qt6_tools)
QT6_TOOLS_DIR = $(QT6_TOOLS_PORT_DIR)/src/lib/qt6_tools
endif
QMAKE_PROJECT_FILE = $(QT6_TOOLS_DIR)/examples/linguist/i18n/i18n.pro
QMAKE_TARGET_BINARIES = i18n
QT6_PORT_LIBS = libQt6Core \
libQt6Gui \
libQt6Widgets
LIBS = qt6_qmake libc libm qt6_component stdcxx mesa egl