mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
451ea47dd8
commit
18869199ca
17
repos/gems/recipes/src/mixer_gui_qt6/content.mk
Normal file
17
repos/gems/recipes/src/mixer_gui_qt6/content.mk
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/app/mixer_gui_qt6
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
MIRROR_FROM_OS := include/mixer
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_OS)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_OS):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(GENODE_DIR)/repos/os/$@ $(dir $@)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/gems/recipes/src/mixer_gui_qt6/hash
Normal file
1
repos/gems/recipes/src/mixer_gui_qt6/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-08 e0c80c1e04f8b05725ba904c9bd0f45d619e6d7b
|
10
repos/gems/recipes/src/mixer_gui_qt6/used_apis
Normal file
10
repos/gems/recipes/src/mixer_gui_qt6/used_apis
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
base
|
||||||
|
libc
|
||||||
|
mesa
|
||||||
|
os
|
||||||
|
qoost
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
report_session
|
||||||
|
stdcxx
|
||||||
|
vfs
|
9
repos/gems/recipes/src/test-tiled_wm_qt6/content.mk
Normal file
9
repos/gems/recipes/src/test-tiled_wm_qt6/content.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/test/tiled_wm_qt6
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/gems/recipes/src/test-tiled_wm_qt6/hash
Normal file
1
repos/gems/recipes/src/test-tiled_wm_qt6/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 2a2c41fe5c6449c94e1346d9b7aeb6c525c7647f
|
11
repos/gems/recipes/src/test-tiled_wm_qt6/used_apis
Normal file
11
repos/gems/recipes/src/test-tiled_wm_qt6/used_apis
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
base
|
||||||
|
libc
|
||||||
|
mesa
|
||||||
|
os
|
||||||
|
qoost
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
report_session
|
||||||
|
stdcxx
|
||||||
|
timer_session
|
||||||
|
vfs
|
83
repos/gems/run/mixer_gui_qt6_test.run
Normal file
83
repos/gems/run/mixer_gui_qt6_test.run
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
source ${genode_dir}/repos/libports/run/qt6_common.inc
|
||||||
|
|
||||||
|
import_from_depot [depot_user]/src/dynamic_rom \
|
||||||
|
[depot_user]/src/mixer_gui_qt6
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate config
|
||||||
|
#
|
||||||
|
|
||||||
|
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="dynamic_rom">
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
|
<provides><service name="ROM"/></provides>
|
||||||
|
<config verbose="yes">
|
||||||
|
<rom name="channel_list">
|
||||||
|
<sleep milliseconds="1000" />
|
||||||
|
<inline description="first config update">
|
||||||
|
<channel_list>
|
||||||
|
<channel type="input" label="test-audio_out0" name="right" number="1" active="1" volume="0" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out_click" name="left" number="0" active="1" volume="75" muted="0"/>
|
||||||
|
<channel type="input" label="fancy_init -> test-audio_out1" name="left" number="0" active="1" volume="75" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out0" name="left" number="0" active="1" volume="0" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out_click" name="right" number="1" active="1" volume="75" muted="0"/>
|
||||||
|
<channel type="input" label="fancy_init -> test-audio_out1" name="right" number="1" active="1" volume="75" muted="0"/>
|
||||||
|
<channel type="output" label="master" name="left" number="0" active="1" volume="100" muted="0"/>
|
||||||
|
<channel type="output" label="master" name="right" number="1" active="1" volume="100" muted="0"/>
|
||||||
|
</channel_list>
|
||||||
|
</inline>
|
||||||
|
<sleep milliseconds="1000" />
|
||||||
|
<inline description="second config update">
|
||||||
|
<channel_list>
|
||||||
|
<channel type="input" label="test-audio_out0" name="right" number="1" active="1" volume="100" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out_click" name="left" number="0" active="1" volume="75" muted="1"/>
|
||||||
|
<channel type="input" label="fancy_init -> test-audio_out1" name="left" number="0" active="1" volume="25" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out0" name="left" number="0" active="1" volume="100" muted="0"/>
|
||||||
|
<channel type="input" label="test-audio_out_click" name="right" number="1" active="1" volume="15" muted="1"/>
|
||||||
|
<channel type="input" label="fancy_init -> test-audio_out1" name="right" number="1" active="1" volume="25" muted="0"/>
|
||||||
|
<channel type="output" label="master" name="left" number="0" active="1" volume="100" muted="0"/>
|
||||||
|
<channel type="output" label="master" name="right" number="1" active="1" volume="100" muted="0"/>
|
||||||
|
</channel_list>
|
||||||
|
</inline>
|
||||||
|
</rom>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
|
||||||
|
<start name="mixer_gui_qt" caps="200">
|
||||||
|
<resource name="RAM" quantum="32M"/>
|
||||||
|
<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="wm"/> </service>
|
||||||
|
<service name="ROM" label="channel_list"> <child name="dynamic_rom" /> </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
|
||||||
|
|
||||||
|
# vi: set ft=tcl :
|
228
repos/gems/run/tiled_wm_qt6.run
Normal file
228
repos/gems/run/tiled_wm_qt6.run
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
source ${genode_dir}/repos/libports/run/qt6_common.inc
|
||||||
|
|
||||||
|
import_from_depot [depot_user]/src/qt6_component \
|
||||||
|
[depot_user]/src/qt6_textedit \
|
||||||
|
[depot_user]/src/dynamic_rom \
|
||||||
|
[depot_user]/src/test-tiled_wm_qt6
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate config
|
||||||
|
#
|
||||||
|
|
||||||
|
proc qt6_layouter_config { } {
|
||||||
|
return { <config rules="rom"> <report rules="no"/> </config>}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc qt6_decorator_binary { } { return "themed_decorator" }
|
||||||
|
|
||||||
|
proc qt6_decorator_config { } {
|
||||||
|
return {
|
||||||
|
<config>
|
||||||
|
<vfs>
|
||||||
|
<dir name="theme">
|
||||||
|
<inline name="metadata">
|
||||||
|
<theme>
|
||||||
|
<aura top="0" bottom="0" left="0" right="0"/>
|
||||||
|
<decor top="0" bottom="0" left="0" right="0"/>
|
||||||
|
</theme>
|
||||||
|
</inline>
|
||||||
|
</dir>
|
||||||
|
</vfs>
|
||||||
|
<libc/>
|
||||||
|
<default-policy/>
|
||||||
|
</config>}
|
||||||
|
}
|
||||||
|
|
||||||
|
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="test_reports">
|
||||||
|
<binary name="report_rom"/>
|
||||||
|
<resource name="RAM" quantum="1M"/>
|
||||||
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
||||||
|
<config verbose="no">
|
||||||
|
<policy label="test-tiled_wm-panel -> apps" report="test-tiled_wm-manager -> apps"/>
|
||||||
|
<policy label="test-tiled_wm-panel -> overlay" report="test-tiled_wm-manager -> overlay"/>
|
||||||
|
<policy label="test-tiled_wm-manager -> content_request" report="test-tiled_wm-panel -> content_request"/>
|
||||||
|
<policy label="test-tiled_wm-manager -> overlay_request" report="test-tiled_wm-panel -> overlay_request"/>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
<start name="wifi_reports">
|
||||||
|
<binary name="dynamic_rom"/>
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
|
<provides> <service name="ROM"/> </provides>
|
||||||
|
<config verbose="no">
|
||||||
|
<rom name="accesspoints">
|
||||||
|
<inline>
|
||||||
|
<accesspoints>
|
||||||
|
<accesspoint ssid="skynet" bssid="00:01:02:03:04:05" quality="40"/>
|
||||||
|
<accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" protection="WPA2"/>
|
||||||
|
<accesspoint ssid="foobar" bssid="01:02:03:04:05:07" quality="10" protection="WPA2"/>
|
||||||
|
</accesspoints>
|
||||||
|
</inline>
|
||||||
|
<sleep milliseconds="60000" />
|
||||||
|
<inline>
|
||||||
|
<accesspoints>
|
||||||
|
</accesspoints>
|
||||||
|
</inline>
|
||||||
|
<sleep milliseconds="60000" />
|
||||||
|
</rom>
|
||||||
|
<rom name="state">
|
||||||
|
<inline>
|
||||||
|
<state>
|
||||||
|
<accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" freq="2418" state="disconnected"/>
|
||||||
|
</state>
|
||||||
|
</inline>
|
||||||
|
<sleep milliseconds="60000" />
|
||||||
|
<inline>
|
||||||
|
<state>
|
||||||
|
<accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" freq="2418" state="connecting"/>
|
||||||
|
</state>
|
||||||
|
</inline>
|
||||||
|
<sleep milliseconds="60000" />
|
||||||
|
</rom>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
|
||||||
|
<start name="test-tiled_wm-manager" caps="120">
|
||||||
|
<resource name="RAM" quantum="8M"/>
|
||||||
|
<route>
|
||||||
|
<service name="ROM" label="content_request"> <child name="test_reports" /> </service>
|
||||||
|
<service name="ROM" label="overlay_request"> <child name="test_reports" /> </service>
|
||||||
|
<service name="Report" label="layout_rules"> <child name="wm_report_rom" label="layout_rules"/> </service>
|
||||||
|
<service name="Report"> <child name="test_reports"/> </service>
|
||||||
|
<any-service> <parent /> <any-child/> </any-service>
|
||||||
|
</route>
|
||||||
|
</start>
|
||||||
|
<start name="test-tiled_wm-panel" caps="250">
|
||||||
|
<resource name="RAM" quantum="32M"/>
|
||||||
|
<config>
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
|
||||||
|
<vfs>
|
||||||
|
<dir name="dev">
|
||||||
|
<log/>
|
||||||
|
<inline name="rtc">2018-01-01 00:01</inline>
|
||||||
|
</dir>
|
||||||
|
<dir name="pipe"> <pipe/> </dir>
|
||||||
|
<dir name="fs"> <ram/> </dir>
|
||||||
|
<tar name="qt6_dejavusans.tar"/>
|
||||||
|
<tar name="qt6_libqgenode.tar"/>
|
||||||
|
</vfs>
|
||||||
|
</config>
|
||||||
|
<route>
|
||||||
|
<service name="Gui"> <child name="wm"/> </service>
|
||||||
|
<service name="Report" label="shape"> <child name="wm"/> </service>
|
||||||
|
<service name="ROM" label="mesa_gpu.lib.so"> <parent label="mesa_gpu-softpipe.lib.so" /> </service>
|
||||||
|
|
||||||
|
<service name="ROM" label="apps"> <child name="test_reports" /> </service>
|
||||||
|
<service name="ROM" label="overlay"> <child name="test_reports" /> </service>
|
||||||
|
<service name="Report"> <child name="test_reports"/> </service>
|
||||||
|
<any-service> <parent /> <any-child/> </any-service>
|
||||||
|
</route>
|
||||||
|
</start>
|
||||||
|
<start name="test-tiled_wm-overlay" caps="250">
|
||||||
|
<resource name="RAM" quantum="32M"/>
|
||||||
|
<config>
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
|
||||||
|
<vfs>
|
||||||
|
<dir name="dev">
|
||||||
|
<log/>
|
||||||
|
<inline name="rtc">2018-01-01 00:01</inline>
|
||||||
|
</dir>
|
||||||
|
<dir name="pipe"> <pipe/> </dir>
|
||||||
|
<dir name="fs"> <ram/> </dir>
|
||||||
|
<tar name="qt6_dejavusans.tar"/>
|
||||||
|
<tar name="qt6_libqgenode.tar"/>
|
||||||
|
</vfs>
|
||||||
|
</config>
|
||||||
|
<route>
|
||||||
|
<service name="Gui"> <child name="wm"/> </service>
|
||||||
|
<service name="Report" label="shape"> <child name="wm"/> </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>
|
||||||
|
<start name="test-tiled_wm-app-1" caps="250">
|
||||||
|
<binary name="test-tiled_wm-app"/>
|
||||||
|
<resource name="RAM" quantum="32M"/>
|
||||||
|
<config name="app1">
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
|
||||||
|
<vfs>
|
||||||
|
<dir name="dev">
|
||||||
|
<log/>
|
||||||
|
<inline name="rtc">2018-01-01 00:01</inline>
|
||||||
|
</dir>
|
||||||
|
<dir name="pipe"> <pipe/> </dir>
|
||||||
|
<dir name="fs"> <ram/> </dir>
|
||||||
|
<tar name="qt6_dejavusans.tar"/>
|
||||||
|
<tar name="qt6_libqgenode.tar"/>
|
||||||
|
</vfs>
|
||||||
|
</config>
|
||||||
|
<route>
|
||||||
|
<service name="Gui"> <child name="wm"/> </service>
|
||||||
|
<service name="Report" label="shape"> <child name="wm"/> </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>
|
||||||
|
<start name="test-tiled_wm-app-2" caps="250">
|
||||||
|
<binary name="test-tiled_wm-app"/>
|
||||||
|
<resource name="RAM" quantum="32M"/>
|
||||||
|
<config name="app2">
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
|
||||||
|
<vfs>
|
||||||
|
<dir name="dev">
|
||||||
|
<log/>
|
||||||
|
<inline name="rtc">2018-01-01 00:01</inline>
|
||||||
|
</dir>
|
||||||
|
<dir name="pipe"> <pipe/> </dir>
|
||||||
|
<dir name="fs"> <ram/> </dir>
|
||||||
|
<tar name="qt6_dejavusans.tar"/>
|
||||||
|
<tar name="qt6_libqgenode.tar"/>
|
||||||
|
</vfs>
|
||||||
|
</config>
|
||||||
|
<route>
|
||||||
|
<service name="Gui"> <child name="wm"/> </service>
|
||||||
|
<service name="Report" label="shape"> <child name="wm"/> </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>
|
||||||
|
<start name="textedit" caps="250">
|
||||||
|
<resource name="RAM" quantum="70M"/>
|
||||||
|
<config>
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" pipe="/pipe" rtc="/dev/rtc"/>
|
||||||
|
<vfs>
|
||||||
|
<dir name="dev">
|
||||||
|
<log/>
|
||||||
|
<inline name="rtc">2018-01-01 00:01</inline>
|
||||||
|
</dir>
|
||||||
|
<dir name="pipe"> <pipe/> </dir>
|
||||||
|
<dir name="fs"> <ram/> </dir>
|
||||||
|
<tar name="qt6_dejavusans.tar"/>
|
||||||
|
<tar name="qt6_libqgenode.tar"/>
|
||||||
|
</vfs>
|
||||||
|
</config>
|
||||||
|
<route>
|
||||||
|
<service name="Gui"> <child name="wm"/> </service>
|
||||||
|
<service name="Report" label="shape"> <child name="wm"/> </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]
|
||||||
|
|
||||||
|
append qemu_args " -device nec-usb-xhci,id=xhci -device usb-tablet"
|
||||||
|
|
||||||
|
run_genode_until forever
|
||||||
|
|
||||||
|
# vi: set ft=tcl :
|
131
repos/gems/src/app/mixer_gui_qt6/main.cpp
Normal file
131
repos/gems/src/app/mixer_gui_qt6/main.cpp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
/*
|
||||||
|
* \brief Mixer frontend
|
||||||
|
* \author Josef Soentgen
|
||||||
|
* \date 2015-10-15
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015-2020 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/log.h>
|
||||||
|
#include <base/thread.h>
|
||||||
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
#include <libc/component.h>
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QFile>
|
||||||
|
|
||||||
|
/* qt6_component includes */
|
||||||
|
#include <qt6_component/qpa_init.h>
|
||||||
|
|
||||||
|
/* application includes */
|
||||||
|
#include "main_window.h"
|
||||||
|
|
||||||
|
|
||||||
|
enum { SIGNAL_EP_STACK_SIZE = 16*1024 };
|
||||||
|
|
||||||
|
|
||||||
|
struct Report_handler
|
||||||
|
{
|
||||||
|
QMember<Report_proxy> proxy;
|
||||||
|
|
||||||
|
Genode::Attached_rom_dataspace channels_rom;
|
||||||
|
|
||||||
|
Genode::Entrypoint sig_ep;
|
||||||
|
Genode::Signal_handler<Report_handler> channels_handler;
|
||||||
|
|
||||||
|
Genode::Blockade _report_blockade { };
|
||||||
|
|
||||||
|
bool window_connected { false };
|
||||||
|
|
||||||
|
void _report(char const *data, size_t size)
|
||||||
|
{
|
||||||
|
Genode::Xml_node node(data, size);
|
||||||
|
proxy->report_changed(&_report_blockade, &node);
|
||||||
|
|
||||||
|
/* wait until the report was handled */
|
||||||
|
_report_blockade.block();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handle_channels()
|
||||||
|
{
|
||||||
|
if (!window_connected)
|
||||||
|
return;
|
||||||
|
|
||||||
|
channels_rom.update();
|
||||||
|
|
||||||
|
if (channels_rom.valid())
|
||||||
|
_report(channels_rom.local_addr<char>(), channels_rom.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
Report_handler(Genode::Env &env)
|
||||||
|
:
|
||||||
|
channels_rom(env, "channel_list"),
|
||||||
|
sig_ep(env, SIGNAL_EP_STACK_SIZE, "signal ep",
|
||||||
|
Genode::Affinity::Location()),
|
||||||
|
channels_handler(sig_ep, *this, &Report_handler::_handle_channels)
|
||||||
|
{
|
||||||
|
channels_rom.sigh(channels_handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
void connect_window(Main_window *win)
|
||||||
|
{
|
||||||
|
QObject::connect(proxy, SIGNAL(report_changed(void *,void const*)),
|
||||||
|
win, SLOT(report_changed(void *, void const*)),
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
|
window_connected = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static inline void load_stylesheet()
|
||||||
|
{
|
||||||
|
QFile file(":style.qss");
|
||||||
|
if (!file.open(QFile::ReadOnly)) {
|
||||||
|
qWarning() << "Warning:" << file.errorString()
|
||||||
|
<< "opening file" << file.fileName();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
qApp->setStyleSheet(QLatin1String(file.readAll()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Libc::Component::construct(Libc::Env &env)
|
||||||
|
{
|
||||||
|
Libc::with_libc([&] {
|
||||||
|
|
||||||
|
qpa_init(env);
|
||||||
|
|
||||||
|
int argc = 1;
|
||||||
|
char const *argv[] = { "mixer_gui_qt", 0 };
|
||||||
|
|
||||||
|
Report_handler *report_handler;
|
||||||
|
try { report_handler = new Report_handler(env); }
|
||||||
|
catch (...) {
|
||||||
|
Genode::error("Could not create Report_handler");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QApplication app(argc, (char**)argv);
|
||||||
|
|
||||||
|
load_stylesheet();
|
||||||
|
|
||||||
|
QMember<Main_window> main_window(env);
|
||||||
|
main_window->show();
|
||||||
|
|
||||||
|
report_handler->connect_window(main_window);
|
||||||
|
|
||||||
|
app.connect(&app, SIGNAL(lastWindowClosed()), SLOT(quit()));
|
||||||
|
|
||||||
|
exit(app.exec());
|
||||||
|
});
|
||||||
|
}
|
463
repos/gems/src/app/mixer_gui_qt6/main_window.cpp
Normal file
463
repos/gems/src/app/mixer_gui_qt6/main_window.cpp
Normal file
@ -0,0 +1,463 @@
|
|||||||
|
/*
|
||||||
|
* \brief Main window of the mixer frontend
|
||||||
|
* \author Josef Soentgen
|
||||||
|
* \date 2015-10-15
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/log.h>
|
||||||
|
#include <mixer/channel.h>
|
||||||
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
#include <os/reporter.h>
|
||||||
|
#include <rom_session/connection.h>
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QFrame>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QSlider>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
/* application includes */
|
||||||
|
#include "main_window.h"
|
||||||
|
|
||||||
|
|
||||||
|
/************
|
||||||
|
** helper **
|
||||||
|
************/
|
||||||
|
|
||||||
|
using Channel = Mixer::Channel;
|
||||||
|
|
||||||
|
static struct Names {
|
||||||
|
char const *name;
|
||||||
|
Channel::Number number;
|
||||||
|
} names[] = {
|
||||||
|
{ "left", Channel::Number::LEFT },
|
||||||
|
{ "front left", Channel::Number::LEFT },
|
||||||
|
{ "right", Channel::Number::RIGHT },
|
||||||
|
{ "front right", Channel::Number::RIGHT },
|
||||||
|
{ nullptr, Channel::Number::MAX_CHANNELS }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char const *channel_string_from_number(Channel::Number ch)
|
||||||
|
{
|
||||||
|
for (Names *n = names; n->name; ++n)
|
||||||
|
if (ch == n->number)
|
||||||
|
return n->name;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* keep sorted! */
|
||||||
|
static struct Types {
|
||||||
|
char const *name;
|
||||||
|
Channel::Type type;
|
||||||
|
} types[] = {
|
||||||
|
{ "invalid", Channel::Type::TYPE_INVALID },
|
||||||
|
{ "input", Channel::Type::INPUT },
|
||||||
|
{ "output", Channel::Type::OUTPUT }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char const *type_to_string(Channel::Type t) { return types[t].name; }
|
||||||
|
|
||||||
|
|
||||||
|
class Channel_widget : public Compound_widget<QFrame, QVBoxLayout>,
|
||||||
|
public Genode::List<Channel_widget>::Element
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Channel::Number _number;
|
||||||
|
Channel::Type _type;
|
||||||
|
|
||||||
|
QCheckBox _muted_checkbox;
|
||||||
|
QSlider _slider { Qt::Vertical };
|
||||||
|
QHBoxLayout _slider_hbox;
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
void channel_changed();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Channel_widget(Channel::Type type, Channel::Number number)
|
||||||
|
:
|
||||||
|
_number(number), _type(type),
|
||||||
|
_muted_checkbox("mute")
|
||||||
|
{
|
||||||
|
_slider.setMinimum(Channel::Volume_level::MIN);
|
||||||
|
_slider.setMaximum(Channel::Volume_level::MAX);
|
||||||
|
|
||||||
|
_slider_hbox.addStretch();
|
||||||
|
_slider_hbox.addWidget(&_slider, Qt::AlignCenter);
|
||||||
|
_slider_hbox.addStretch();
|
||||||
|
|
||||||
|
_layout->addLayout(&_slider_hbox);
|
||||||
|
_layout->addWidget(&_muted_checkbox);
|
||||||
|
|
||||||
|
connect(&_slider, SIGNAL(sliderReleased()),
|
||||||
|
this, SIGNAL(channel_changed()));
|
||||||
|
connect(&_muted_checkbox, SIGNAL(clicked(bool)),
|
||||||
|
this, SIGNAL(channel_changed()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Channel::Number number() const { return _number; }
|
||||||
|
Channel::Type type() const { return _type; }
|
||||||
|
int volume() const { return _slider.value(); }
|
||||||
|
void volume(int v) { _slider.setValue(v); }
|
||||||
|
bool muted() const { return _muted_checkbox.checkState() == Qt::Checked; }
|
||||||
|
void muted(bool v) { _muted_checkbox.setChecked(v); }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Client_widget : public Compound_widget<QFrame, QVBoxLayout>,
|
||||||
|
public Genode::List<Client_widget>::Element
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
bool valid { true };
|
||||||
|
|
||||||
|
void _sorted_insert(Channel_widget *cw)
|
||||||
|
{
|
||||||
|
Channel::Number const nr = cw->number();
|
||||||
|
|
||||||
|
Channel_widget const *last = nullptr;
|
||||||
|
Channel_widget const *w = _list.first();
|
||||||
|
for (; w; w = w->next()) {
|
||||||
|
if (w->number() > nr)
|
||||||
|
break;
|
||||||
|
last = w;
|
||||||
|
}
|
||||||
|
_list.insert(cw, last);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Genode::List<Channel_widget> _list;
|
||||||
|
Channel::Label _label;
|
||||||
|
|
||||||
|
QLabel _name;
|
||||||
|
QHBoxLayout _hlayout;
|
||||||
|
|
||||||
|
static char const *_strip_label(Channel::Label const &label)
|
||||||
|
{
|
||||||
|
char const * str = label.string();
|
||||||
|
int pos = 0;
|
||||||
|
for (int i = 0; str[i]; i++)
|
||||||
|
if (str[i] == '>') pos = i+1;
|
||||||
|
|
||||||
|
return str+pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
void client_changed();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Client_widget(Channel::Label const &label)
|
||||||
|
:
|
||||||
|
_label(label),
|
||||||
|
_name(_strip_label(_label))
|
||||||
|
{
|
||||||
|
setFrameStyle(QFrame::Panel | QFrame::Raised);
|
||||||
|
setLineWidth(4);
|
||||||
|
setToolTip(_label.string());
|
||||||
|
|
||||||
|
_name.setAlignment(Qt::AlignCenter);
|
||||||
|
_name.setContentsMargins(0, 0, 0, 5);
|
||||||
|
|
||||||
|
_layout->addWidget(&_name);
|
||||||
|
_layout->addLayout(&_hlayout);
|
||||||
|
_layout->setContentsMargins(10, 10, 10, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
~Client_widget()
|
||||||
|
{
|
||||||
|
while (Channel_widget *ch = _list.first()) {
|
||||||
|
disconnect(ch, SIGNAL(channel_changed()));
|
||||||
|
_hlayout.removeWidget(ch);
|
||||||
|
_list.remove(ch);
|
||||||
|
delete ch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Channel::Label const &label() const { return _label; }
|
||||||
|
|
||||||
|
Channel_widget* lookup_channel(Channel::Number const number)
|
||||||
|
{
|
||||||
|
for (Channel_widget *ch = _list.first(); ch; ch = ch->next())
|
||||||
|
if (number == ch->number())
|
||||||
|
return ch;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Channel_widget* add_channel(Channel::Type const type,
|
||||||
|
Channel::Number const number)
|
||||||
|
{
|
||||||
|
Channel_widget *ch = new Channel_widget(type, number);
|
||||||
|
connect(ch, SIGNAL(channel_changed()),
|
||||||
|
this, SIGNAL(client_changed()));
|
||||||
|
|
||||||
|
_sorted_insert(ch);
|
||||||
|
_hlayout.addWidget(ch);
|
||||||
|
|
||||||
|
return ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
Channel_widget const* first_channel() const { return _list.first(); }
|
||||||
|
|
||||||
|
void only_show_first()
|
||||||
|
{
|
||||||
|
Channel_widget *cw = _list.first();
|
||||||
|
while ((cw = cw->next())) cw->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool combined_control() const
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Having a seperate volume control widget for each channel is
|
||||||
|
* nice-to-have but for now it is unnecessary. We therefore disable
|
||||||
|
* it the hardcoded way.
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Client_widget_registry : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Genode::List<Client_widget> _list;
|
||||||
|
|
||||||
|
void _remove_destroy(Client_widget *c)
|
||||||
|
{
|
||||||
|
disconnect(c, SIGNAL(client_changed()));
|
||||||
|
_list.remove(c);
|
||||||
|
delete c;
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
void registry_changed();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Client_widget_registry() : QObject() { }
|
||||||
|
|
||||||
|
Client_widget* first() { return _list.first(); }
|
||||||
|
|
||||||
|
Client_widget* lookup(Channel::Label const &label)
|
||||||
|
{
|
||||||
|
for (Client_widget *c = _list.first(); c; c = c->next()) {
|
||||||
|
if (label == c->label())
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Client_widget* alloc_insert(Channel::Label const &label)
|
||||||
|
{
|
||||||
|
Client_widget *c = lookup(label);
|
||||||
|
if (c == nullptr) {
|
||||||
|
c = new Client_widget(label);
|
||||||
|
connect(c, SIGNAL(client_changed()),
|
||||||
|
this, SIGNAL(registry_changed()));
|
||||||
|
_list.insert(c);
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
void invalidate_all()
|
||||||
|
{
|
||||||
|
for (Client_widget *c = _list.first(); c; c = c->next())
|
||||||
|
c->valid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void remove_invalid()
|
||||||
|
{
|
||||||
|
for (Client_widget *c = _list.first(); c; c = c->next())
|
||||||
|
if (c->valid == false) _remove_destroy(c);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static Client_widget_registry *client_registry()
|
||||||
|
{
|
||||||
|
static Client_widget_registry inst;
|
||||||
|
return &inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char const * const config_file = "/config/mixer.config";
|
||||||
|
|
||||||
|
|
||||||
|
static int write_config(char const *file, char const *data, size_t length)
|
||||||
|
{
|
||||||
|
if (length == 0) return 0;
|
||||||
|
|
||||||
|
QFile mixer_file(file);
|
||||||
|
if (!mixer_file.open(QIODevice::WriteOnly)) {
|
||||||
|
Genode::error("could not open '", file, "'");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixer_file.write(data, length);
|
||||||
|
mixer_file.close();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Main_window::_update_config()
|
||||||
|
{
|
||||||
|
char xml_data[2048];
|
||||||
|
size_t xml_used = 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
Genode::Xml_generator xml(xml_data, sizeof(xml_data), "config", [&] {
|
||||||
|
|
||||||
|
xml.node("default", [&] {
|
||||||
|
xml.attribute("out_volume", _default_out_volume);
|
||||||
|
xml.attribute("volume", _default_volume);
|
||||||
|
xml.attribute("muted", _default_muted);
|
||||||
|
});
|
||||||
|
|
||||||
|
xml.node("channel_list", [&] {
|
||||||
|
for (Client_widget const *c = client_registry()->first(); c; c = c->next()) {
|
||||||
|
bool const combined = c->combined_control();
|
||||||
|
|
||||||
|
static int vol = 0;
|
||||||
|
static bool muted = true;
|
||||||
|
if (combined) {
|
||||||
|
Channel_widget const *w = c->first_channel();
|
||||||
|
vol = w->volume();
|
||||||
|
muted = w->muted();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Channel_widget const *w = c->first_channel(); w; w = w->next()) {
|
||||||
|
Channel::Number const nr = w->number();
|
||||||
|
xml.node("channel", [&] {
|
||||||
|
xml.attribute("type", type_to_string(w->type()));
|
||||||
|
xml.attribute("label", c->label().string());
|
||||||
|
xml.attribute("name", channel_string_from_number(nr));
|
||||||
|
xml.attribute("number", nr);
|
||||||
|
xml.attribute("volume", combined ? vol : w->volume());
|
||||||
|
xml.attribute("muted", combined ? muted : w->muted());
|
||||||
|
});
|
||||||
|
|
||||||
|
if (_verbose)
|
||||||
|
Genode::log("label: '", c->label(), "' "
|
||||||
|
"volume: ", combined ? vol : w->volume(), " "
|
||||||
|
"muted: ", combined ? muted : w->muted());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
xml_used = xml.used();
|
||||||
|
|
||||||
|
} catch (...) { Genode::warning("could generate 'mixer.config'"); }
|
||||||
|
|
||||||
|
write_config(config_file, xml_data, xml_used);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Main_window::_update_clients(Genode::Xml_node &channels)
|
||||||
|
{
|
||||||
|
for (Client_widget *c = client_registry()->first(); c; c = c->next())
|
||||||
|
_layout->removeWidget(c);
|
||||||
|
|
||||||
|
client_registry()->invalidate_all();
|
||||||
|
|
||||||
|
channels.for_each_sub_node("channel", [&] (Genode::Xml_node const &node) {
|
||||||
|
try {
|
||||||
|
Channel ch(node);
|
||||||
|
|
||||||
|
Client_widget *c = client_registry()->lookup(ch.label);
|
||||||
|
if (c == nullptr)
|
||||||
|
c = client_registry()->alloc_insert(ch.label);
|
||||||
|
|
||||||
|
Channel_widget *w = c->lookup_channel(ch.number);
|
||||||
|
if (w == nullptr)
|
||||||
|
w = c->add_channel(ch.type, ch.number);
|
||||||
|
|
||||||
|
w->volume(ch.volume);
|
||||||
|
w->muted(ch.muted);
|
||||||
|
|
||||||
|
if (c->combined_control()) c->only_show_first();
|
||||||
|
else w->show();
|
||||||
|
|
||||||
|
c->valid = true;
|
||||||
|
|
||||||
|
_layout->addWidget(c);
|
||||||
|
resize(sizeHint());
|
||||||
|
} catch (Channel::Invalid_channel) { Genode::warning("invalid channel node"); }
|
||||||
|
});
|
||||||
|
|
||||||
|
client_registry()->remove_invalid();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets called from the Genode to Qt proxy object when the report was
|
||||||
|
* updated with a pointer to the XML document.
|
||||||
|
*/
|
||||||
|
void Main_window::report_changed(void *l, void const *p)
|
||||||
|
{
|
||||||
|
Genode::Blockade &blockade = *reinterpret_cast<Genode::Blockade*>(l);
|
||||||
|
Genode::Xml_node &node = *((Genode::Xml_node*)p);
|
||||||
|
|
||||||
|
if (node.has_type("channel_list"))
|
||||||
|
_update_clients(node);
|
||||||
|
|
||||||
|
blockade.wakeup();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Main_window::Main_window(Genode::Env &env)
|
||||||
|
:
|
||||||
|
_default_out_volume(0),
|
||||||
|
_default_volume(0),
|
||||||
|
_default_muted(true)
|
||||||
|
{
|
||||||
|
connect(client_registry(), SIGNAL(registry_changed()),
|
||||||
|
this, SLOT(_update_config()));
|
||||||
|
|
||||||
|
using namespace Genode;
|
||||||
|
|
||||||
|
Attached_rom_dataspace const config(env, "config");
|
||||||
|
_verbose = config.xml().attribute_value("verbose", false);
|
||||||
|
config.xml().with_sub_node("default",
|
||||||
|
[&] (Xml_node const &node) {
|
||||||
|
_default_out_volume = node.attribute_value("out_volume", 0L);
|
||||||
|
_default_volume = node.attribute_value("volume", 0L);
|
||||||
|
_default_muted = node.attribute_value("muted", 1L);
|
||||||
|
},
|
||||||
|
[&] { warning("no <default> node found, fallback is 'muted=1'"); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Main_window::~Main_window()
|
||||||
|
{
|
||||||
|
disconnect(client_registry(), SIGNAL(registry_changed()));
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "main_window.moc"
|
75
repos/gems/src/app/mixer_gui_qt6/main_window.h
Normal file
75
repos/gems/src/app/mixer_gui_qt6/main_window.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* \brief Main window of the mixer Qt frontend
|
||||||
|
* \author Josef Soentgen
|
||||||
|
* \date 2015-10-15
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MAIN_WINDOW_H_
|
||||||
|
#define _MAIN_WINDOW_H_
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/env.h>
|
||||||
|
#include <util/xml_node.h>
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
/* Qoost includes */
|
||||||
|
#include <qoost/compound_widget.h>
|
||||||
|
#include <qoost/qmember.h>
|
||||||
|
|
||||||
|
/* application includes */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class proxies Genode signals to Qt signals
|
||||||
|
*/
|
||||||
|
struct Report_proxy : QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
void report_changed(void *, void const *);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Main_window : public Compound_widget<QWidget, QHBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
int _default_out_volume;
|
||||||
|
int _default_volume;
|
||||||
|
bool _default_muted;
|
||||||
|
|
||||||
|
bool _verbose;
|
||||||
|
|
||||||
|
void _update_clients(Genode::Xml_node &);
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
|
||||||
|
void _update_config();
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
|
||||||
|
void report_changed(void *, void const *);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Main_window(Genode::Env &);
|
||||||
|
|
||||||
|
~Main_window();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _MAIN_WINDOW_H_ */
|
7
repos/gems/src/app/mixer_gui_qt6/mixer_gui_qt.pro
Normal file
7
repos/gems/src/app/mixer_gui_qt6/mixer_gui_qt.pro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
QT += core gui widgets
|
||||||
|
TEMPLATE = app
|
||||||
|
CONFIG += c++2a
|
||||||
|
SOURCES += main.cpp \
|
||||||
|
main_window.cpp
|
||||||
|
HEADERS += main_window.h
|
||||||
|
RESOURCES = style.qrc
|
6
repos/gems/src/app/mixer_gui_qt6/style.qrc
Normal file
6
repos/gems/src/app/mixer_gui_qt6/style.qrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<RCC version="1.0">
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>style.qss</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
5
repos/gems/src/app/mixer_gui_qt6/style.qss
Normal file
5
repos/gems/src/app/mixer_gui_qt6/style.qss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Main_window { min-width: 100; min-height: 100px; }
|
||||||
|
|
||||||
|
Client_widget QFrame {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
12
repos/gems/src/app/mixer_gui_qt6/target.mk
Normal file
12
repos/gems/src/app/mixer_gui_qt6/target.mk
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
QMAKE_PROJECT_FILE = $(PRG_DIR)/mixer_gui_qt.pro
|
||||||
|
|
||||||
|
QMAKE_TARGET_BINARIES = mixer_gui_qt
|
||||||
|
|
||||||
|
QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6Widgets
|
||||||
|
|
||||||
|
LIBS = qt6_qmake base libc libm mesa stdcxx qoost
|
||||||
|
|
||||||
|
QT6_COMPONENT_LIB_SO =
|
||||||
|
|
||||||
|
QT6_GENODE_LIBS_APP += ld.lib.so
|
||||||
|
qmake_prepared.tag: $(addprefix build_dependencies/lib/,$(QT6_GENODE_LIBS_APP))
|
44
repos/gems/src/test/tiled_wm_qt6/app/app.cpp
Normal file
44
repos/gems/src/test/tiled_wm_qt6/app/app.cpp
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: example application widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
|
|
||||||
|
App::App(QString name)
|
||||||
|
{
|
||||||
|
_name->setText("This is <b>" + name + "</b> an example application for the tiled-WM test.");
|
||||||
|
_entry->setPlaceholderText("Placeholder text");
|
||||||
|
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_name);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_entry);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
QLabel *l = new QLabel(QString("QLabel No." + QString::number(i)));
|
||||||
|
l->setToolTip(QString::number(i) + " is just a number.");
|
||||||
|
_layout->addWidget(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
App::~App()
|
||||||
|
{
|
||||||
|
}
|
46
repos/gems/src/test/tiled_wm_qt6/app/app.h
Normal file
46
repos/gems/src/test/tiled_wm_qt6/app/app.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* \brief TIled-WM test: example application widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _TEST__TILED_WM__APP__APP_H_
|
||||||
|
#define _TEST__TILED_WM__APP__APP_H_
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
/* Qoost includes */
|
||||||
|
#include <qoost/compound_widget.h>
|
||||||
|
#include <qoost/qmember.h>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include <util.h>
|
||||||
|
|
||||||
|
|
||||||
|
class App : public Compound_widget<QWidget, QVBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
QMember<QLabel> _name;
|
||||||
|
QMember<QLineEdit> _entry;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
App(QString name);
|
||||||
|
~App();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _TEST__TILED_WM__APP__APP_H_ */
|
7
repos/gems/src/test/tiled_wm_qt6/app/app.pro
Normal file
7
repos/gems/src/test/tiled_wm_qt6/app/app.pro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TEMPLATE = app
|
||||||
|
TARGET = test-tiled_wm-app
|
||||||
|
QT = core gui widgets
|
||||||
|
CONFIG += c++2a
|
||||||
|
SOURCES += main.cpp app.cpp
|
||||||
|
HEADERS += app.h ../util.h
|
||||||
|
RESOURCES = app.qrc
|
8
repos/gems/src/test/tiled_wm_qt6/app/app.qrc
Normal file
8
repos/gems/src/test/tiled_wm_qt6/app/app.qrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<RCC version="1.0">
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../style.qss</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
|
||||||
|
<!-- vi: set ft=xml : -->
|
55
repos/gems/src/test/tiled_wm_qt6/app/main.cpp
Normal file
55
repos/gems/src/test/tiled_wm_qt6/app/main.cpp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: example application
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-26
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include <util.h>
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct Main
|
||||||
|
{
|
||||||
|
Libc::Env &env;
|
||||||
|
|
||||||
|
Genode::Attached_rom_dataspace config { env, "config" };
|
||||||
|
|
||||||
|
QApplication &app { qt6_initialization(env) };
|
||||||
|
|
||||||
|
QMember<App> widget { name_from_config() };
|
||||||
|
|
||||||
|
QString name_from_config()
|
||||||
|
{
|
||||||
|
Name name = config.xml().attribute_value("name", Name("no name"));
|
||||||
|
|
||||||
|
return QString(name.string());
|
||||||
|
}
|
||||||
|
|
||||||
|
Main(Libc::Env &env) : env(env)
|
||||||
|
{
|
||||||
|
widget->show();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void Libc::Component::construct(Libc::Env &env)
|
||||||
|
{
|
||||||
|
Libc::with_libc([&] {
|
||||||
|
|
||||||
|
static Main main { env };
|
||||||
|
|
||||||
|
exit(main.app.exec());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
4
repos/gems/src/test/tiled_wm_qt6/app/target.mk
Normal file
4
repos/gems/src/test/tiled_wm_qt6/app/target.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
QMAKE_PROJECT_FILE = $(PRG_DIR)/app.pro
|
||||||
|
QMAKE_TARGET_BINARIES = test-tiled_wm-app
|
||||||
|
|
||||||
|
include $(PRG_DIR)/../target.inc
|
210
repos/gems/src/test/tiled_wm_qt6/manager/main.cc
Normal file
210
repos/gems/src/test/tiled_wm_qt6/manager/main.cc
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: GUI manager
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-26
|
||||||
|
*
|
||||||
|
* GUI manager implements the user-visible display state machine.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/component.h>
|
||||||
|
#include <util/string.h>
|
||||||
|
#include <base/log.h>
|
||||||
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
#include <os/reporter.h>
|
||||||
|
|
||||||
|
|
||||||
|
using Name = Genode::String<32>;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Test { struct Manager; }
|
||||||
|
|
||||||
|
struct Test::Manager
|
||||||
|
{
|
||||||
|
Genode::Env &env;
|
||||||
|
|
||||||
|
Genode::Attached_rom_dataspace content_request_rom { env, "content_request" };
|
||||||
|
Genode::Attached_rom_dataspace overlay_request_rom { env, "overlay_request" };
|
||||||
|
|
||||||
|
Genode::Signal_handler<Manager> content_request_handler {
|
||||||
|
env.ep(), *this, &Manager::handle_content_request };
|
||||||
|
Genode::Signal_handler<Manager> overlay_request_handler {
|
||||||
|
env.ep(), *this, &Manager::handle_overlay_request };
|
||||||
|
|
||||||
|
Genode::Reporter apps_report { env, "apps" };
|
||||||
|
Genode::Reporter overlay_report { env, "overlay" };
|
||||||
|
|
||||||
|
Genode::Reporter layout_rules_report { env, "rules", "layout_rules" };
|
||||||
|
|
||||||
|
struct App {
|
||||||
|
char const *label;
|
||||||
|
char const *name;
|
||||||
|
bool visible;
|
||||||
|
} apps[3] {
|
||||||
|
{ "test-tiled_wm-app-1", "app1", true },
|
||||||
|
{ "test-tiled_wm-app-2", "app2", false },
|
||||||
|
{ "textedit", "textedit", false }
|
||||||
|
};
|
||||||
|
|
||||||
|
bool overlay_visible { false };
|
||||||
|
|
||||||
|
void report_apps();
|
||||||
|
void report_overlay();
|
||||||
|
void report_layout_rules();
|
||||||
|
|
||||||
|
void handle_content_request();
|
||||||
|
void handle_overlay_request();
|
||||||
|
|
||||||
|
Manager(Genode::Env &env);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void Test::Manager::handle_content_request()
|
||||||
|
{
|
||||||
|
content_request_rom.update();
|
||||||
|
|
||||||
|
Name requested_app =
|
||||||
|
content_request_rom.xml().attribute_value("name", Name());
|
||||||
|
|
||||||
|
if (!requested_app.valid()) return;
|
||||||
|
|
||||||
|
App *found = nullptr;
|
||||||
|
for (App &app : apps) {
|
||||||
|
if (requested_app != app.name) continue;
|
||||||
|
found = &app;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!found || found->visible) return;
|
||||||
|
|
||||||
|
for (App &app : apps) {
|
||||||
|
if (&app == found) {
|
||||||
|
app.visible = true;
|
||||||
|
} else {
|
||||||
|
app.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
report_apps();
|
||||||
|
report_layout_rules();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Test::Manager::handle_overlay_request()
|
||||||
|
{
|
||||||
|
overlay_request_rom.update();
|
||||||
|
|
||||||
|
bool const request_visible =
|
||||||
|
overlay_request_rom.xml().attribute_value("visible", false);
|
||||||
|
|
||||||
|
if (request_visible == overlay_visible) return;
|
||||||
|
|
||||||
|
overlay_visible = request_visible;
|
||||||
|
|
||||||
|
report_overlay();
|
||||||
|
report_layout_rules();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Test::Manager::report_apps()
|
||||||
|
{
|
||||||
|
Genode::Reporter::Xml_generator xml(apps_report, [&] () {
|
||||||
|
for (App &app : apps) {
|
||||||
|
xml.node("app", [&] () {
|
||||||
|
xml.attribute("name", app.name);
|
||||||
|
xml.attribute("visible", app.visible);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Test::Manager::report_overlay()
|
||||||
|
{
|
||||||
|
Genode::Reporter::Xml_generator xml(overlay_report, [&] () {
|
||||||
|
xml.attribute("visible", overlay_visible);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Test::Manager::report_layout_rules()
|
||||||
|
{
|
||||||
|
Genode::Reporter::Xml_generator xml(layout_rules_report, [&] () {
|
||||||
|
xml.node("screen", [&] () {
|
||||||
|
xml.node("column", [&] () {
|
||||||
|
xml.attribute("name", "screen");
|
||||||
|
xml.attribute("layer", "1");
|
||||||
|
xml.node("row", [&] () {
|
||||||
|
xml.attribute("name", "panel");
|
||||||
|
xml.attribute("layer", "2");
|
||||||
|
xml.attribute("height", "24");
|
||||||
|
});
|
||||||
|
xml.node("row", [&] () {
|
||||||
|
xml.attribute("name", "content");
|
||||||
|
xml.attribute("layer", "4");
|
||||||
|
xml.node("column", [&] () {
|
||||||
|
xml.attribute("weight", "2");
|
||||||
|
});
|
||||||
|
xml.node("column", [&] () {
|
||||||
|
xml.attribute("name", "overlay");
|
||||||
|
xml.attribute("layer", "3");
|
||||||
|
xml.attribute("weight", "1");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
xml.node("assign", [&] () {
|
||||||
|
xml.attribute("label_prefix", "test-tiled_wm-panel");
|
||||||
|
xml.attribute("target", "panel");
|
||||||
|
});
|
||||||
|
xml.node("assign", [&] () {
|
||||||
|
xml.attribute("label_prefix", "test-tiled_wm-overlay");
|
||||||
|
xml.attribute("target", "overlay");
|
||||||
|
if (!overlay_visible)
|
||||||
|
xml.attribute("visible", false);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* debug */
|
||||||
|
if (false) {
|
||||||
|
xml.node("assign", [&] () {
|
||||||
|
xml.attribute("label_prefix", "");
|
||||||
|
xml.attribute("target", "screen");
|
||||||
|
xml.attribute("xpos", "any");
|
||||||
|
xml.attribute("ypos", "any");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (App &app : apps) {
|
||||||
|
xml.node("assign", [&] () {
|
||||||
|
xml.attribute("label_prefix", app.label);
|
||||||
|
xml.attribute("target", "content");
|
||||||
|
if (!app.visible)
|
||||||
|
xml.attribute("visible", "false");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Test::Manager::Manager(Genode::Env &env) : env(env)
|
||||||
|
{
|
||||||
|
apps_report.enabled(true);
|
||||||
|
overlay_report.enabled(true);
|
||||||
|
layout_rules_report.enabled(true);
|
||||||
|
|
||||||
|
content_request_rom.sigh(content_request_handler);
|
||||||
|
overlay_request_rom.sigh(overlay_request_handler);
|
||||||
|
|
||||||
|
report_apps();
|
||||||
|
report_overlay();
|
||||||
|
report_layout_rules();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Component::construct(Genode::Env &env) { static Test::Manager manager(env); }
|
3
repos/gems/src/test/tiled_wm_qt6/manager/target.mk
Normal file
3
repos/gems/src/test/tiled_wm_qt6/manager/target.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TARGET = test-tiled_wm-manager
|
||||||
|
SRC_CC = main.cc
|
||||||
|
LIBS = base
|
43
repos/gems/src/test/tiled_wm_qt6/overlay/main.cpp
Normal file
43
repos/gems/src/test/tiled_wm_qt6/overlay/main.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: example overlay
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include <util.h>
|
||||||
|
#include "overlay.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct Main
|
||||||
|
{
|
||||||
|
Libc::Env &env;
|
||||||
|
|
||||||
|
QApplication &app { qt6_initialization(env) };
|
||||||
|
|
||||||
|
QMember<Overlay> widget { };
|
||||||
|
|
||||||
|
Main(Libc::Env &env) : env(env)
|
||||||
|
{
|
||||||
|
widget->show();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void Libc::Component::construct(Libc::Env &env)
|
||||||
|
{
|
||||||
|
Libc::with_libc([&] {
|
||||||
|
|
||||||
|
static Main main { env };
|
||||||
|
|
||||||
|
exit(main.app.exec());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
36
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.cpp
Normal file
36
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: overlay widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include "overlay.h"
|
||||||
|
|
||||||
|
|
||||||
|
Overlay::Overlay()
|
||||||
|
{
|
||||||
|
_label->setText("WiFi overlay");
|
||||||
|
_entry->setEchoMode(QLineEdit::Password);
|
||||||
|
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_label);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_entry);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Overlay::~Overlay()
|
||||||
|
{
|
||||||
|
}
|
46
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.h
Normal file
46
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: overlay widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _TEST__TILED_WM__OVERLAY__OVERLAY_H_
|
||||||
|
#define _TEST__TILED_WM__OVERLAY__OVERLAY_H_
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
/* Qoost includes */
|
||||||
|
#include <qoost/compound_widget.h>
|
||||||
|
#include <qoost/qmember.h>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include <util.h>
|
||||||
|
|
||||||
|
|
||||||
|
class Overlay : public Compound_widget<QWidget, QHBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
QMember<QLabel> _label;
|
||||||
|
QMember<QLineEdit> _entry;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Overlay();
|
||||||
|
~Overlay();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _TEST__TILED_WM__OVERLAY__OVERLAY_H_ */
|
7
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.pro
Normal file
7
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.pro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TEMPLATE = app
|
||||||
|
TARGET = test-tiled_wm-overlay
|
||||||
|
QT = core gui widgets
|
||||||
|
CONFIG += c++2a
|
||||||
|
SOURCES += main.cpp overlay.cpp
|
||||||
|
HEADERS += overlay.h ../util.h
|
||||||
|
RESOURCES = overlay.qrc
|
8
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.qrc
Normal file
8
repos/gems/src/test/tiled_wm_qt6/overlay/overlay.qrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<RCC version="1.0">
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../style.qss</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
|
||||||
|
<!-- vi: set ft=xml : -->
|
4
repos/gems/src/test/tiled_wm_qt6/overlay/target.mk
Normal file
4
repos/gems/src/test/tiled_wm_qt6/overlay/target.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
QMAKE_PROJECT_FILE = $(PRG_DIR)/overlay.pro
|
||||||
|
QMAKE_TARGET_BINARIES = test-tiled_wm-overlay
|
||||||
|
|
||||||
|
include $(PRG_DIR)/../target.inc
|
46
repos/gems/src/test/tiled_wm_qt6/panel/main.cpp
Normal file
46
repos/gems/src/test/tiled_wm_qt6/panel/main.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: panel
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-26
|
||||||
|
*
|
||||||
|
* Panel is a Qt6-based example panel at the bottom of the screen.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include "panel.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct Main
|
||||||
|
{
|
||||||
|
Libc::Env &env;
|
||||||
|
|
||||||
|
Genode::Entrypoint signal_ep { env, 0x4000, "signal ep",
|
||||||
|
Genode::Affinity::Location() };
|
||||||
|
|
||||||
|
QApplication &app { qt6_initialization(env) };
|
||||||
|
|
||||||
|
QMember<Panel> widget { env, signal_ep };
|
||||||
|
|
||||||
|
Main(Libc::Env &env) : env(env)
|
||||||
|
{
|
||||||
|
widget->show();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void Libc::Component::construct(Libc::Env &env)
|
||||||
|
{
|
||||||
|
Libc::with_libc([&] {
|
||||||
|
|
||||||
|
static Main main { env };
|
||||||
|
|
||||||
|
exit(main.app.exec());
|
||||||
|
});
|
||||||
|
}
|
148
repos/gems/src/test/tiled_wm_qt6/panel/panel.cpp
Normal file
148
repos/gems/src/test/tiled_wm_qt6/panel/panel.cpp
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: panel widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include "panel.h"
|
||||||
|
|
||||||
|
|
||||||
|
void Panel_button::_clicked() { Q_EMIT clicked(text()); if (text() == "Panel") showMenu(); }
|
||||||
|
void Panel_button::_toggled(bool checked) { Q_EMIT toggled(checked, text()); }
|
||||||
|
|
||||||
|
|
||||||
|
Panel_button::Panel_button(QString label)
|
||||||
|
{
|
||||||
|
if (!label.isNull()) {
|
||||||
|
setText(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
setCheckable(true);
|
||||||
|
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||||
|
|
||||||
|
_layout->addWidget(_icon, 0, Qt::AlignCenter);
|
||||||
|
|
||||||
|
if (label == "Panel") {
|
||||||
|
_menu->addAction("Action");
|
||||||
|
setMenu(_menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(this, SIGNAL(clicked()), SLOT(_clicked()));
|
||||||
|
connect(this, SIGNAL(toggled(bool)), SLOT(_toggled(bool)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Panel_button::~Panel_button() { }
|
||||||
|
|
||||||
|
|
||||||
|
void App_bar::_app_button(QAbstractButton *b, bool checked)
|
||||||
|
{
|
||||||
|
if (!checked) return;
|
||||||
|
|
||||||
|
if (Panel_button *button = qobject_cast<Panel_button *>(b)) {
|
||||||
|
Name name { button->text().toUtf8().constData() };
|
||||||
|
|
||||||
|
Genode::Reporter::Xml_generator xml(_content_request, [&] () {
|
||||||
|
xml.attribute("name", name);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void App_bar::_handle_apps()
|
||||||
|
{
|
||||||
|
/* empty bar before adding current apps */
|
||||||
|
while (QLayoutItem *item = _layout->takeAt(0)) {
|
||||||
|
if (Panel_button *button = qobject_cast<Panel_button *>(item->widget())) {
|
||||||
|
_button_group->removeButton(button);
|
||||||
|
button->deleteLater();
|
||||||
|
}
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
|
||||||
|
_apps.update();
|
||||||
|
|
||||||
|
Panel_button *visible_app_button = nullptr;
|
||||||
|
|
||||||
|
_apps.xml().for_each_sub_node("app", [&] (Genode::Xml_node node) {
|
||||||
|
QString const name { node.attribute_value("name", Name("no name")).string() };
|
||||||
|
bool const visible { node.attribute_value("visible", false) };
|
||||||
|
Panel_button *button { new Panel_button(name) };
|
||||||
|
|
||||||
|
if (visible) visible_app_button = button;
|
||||||
|
|
||||||
|
_button_group->addButton(button);
|
||||||
|
_layout->addWidget(button);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (visible_app_button) visible_app_button->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
App_bar::App_bar(Genode::Env &env, Genode::Entrypoint &sig_ep)
|
||||||
|
:
|
||||||
|
_apps(env, "apps"), _content_request(env, "content_request"),
|
||||||
|
_apps_proxy(sig_ep)
|
||||||
|
{
|
||||||
|
_content_request.enabled(true);
|
||||||
|
|
||||||
|
_button_group->setExclusive(true);
|
||||||
|
|
||||||
|
_handle_apps();
|
||||||
|
|
||||||
|
_apps.sigh(*_apps_proxy);
|
||||||
|
|
||||||
|
connect(_apps_proxy, SIGNAL(signal()), SLOT(_handle_apps()));
|
||||||
|
connect(_button_group, SIGNAL(buttonToggled(QAbstractButton *, bool)),
|
||||||
|
SLOT(_app_button(QAbstractButton *, bool)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
App_bar::~App_bar() { }
|
||||||
|
|
||||||
|
|
||||||
|
void Panel::_wifi_toggled(bool checked)
|
||||||
|
{
|
||||||
|
Genode::Reporter::Xml_generator xml(_overlay_request, [&] () {
|
||||||
|
xml.attribute("visible", checked);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Panel::Panel(Genode::Env &env, Genode::Entrypoint &sig_ep)
|
||||||
|
:
|
||||||
|
_overlay(env, "overlay"), _overlay_request(env, "overlay_request"),
|
||||||
|
_panel_button("Panel"), _app_bar(env, sig_ep)
|
||||||
|
{
|
||||||
|
_layout->addWidget(_panel_button);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_app_bar);
|
||||||
|
_layout->addWidget(new Spacer(), 1);
|
||||||
|
_layout->addWidget(_wifi_button);
|
||||||
|
|
||||||
|
_panel_button->setCheckable(false);
|
||||||
|
_panel_button->setToolTip("This panel is just an example.");
|
||||||
|
|
||||||
|
_wifi_button->setObjectName("wifi");
|
||||||
|
_wifi_button->setToolTip("Open WiFi overlay");
|
||||||
|
|
||||||
|
_overlay_request.enabled(true);
|
||||||
|
|
||||||
|
_wifi_toggled(_wifi_button->isChecked());
|
||||||
|
|
||||||
|
connect(_wifi_button, SIGNAL(toggled(bool)), SLOT(_wifi_toggled(bool)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Panel::~Panel() { }
|
111
repos/gems/src/test/tiled_wm_qt6/panel/panel.h
Normal file
111
repos/gems/src/test/tiled_wm_qt6/panel/panel.h
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: panel widget
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-27
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _TEST__TILED_WM__PANEL__PANEL_H_
|
||||||
|
#define _TEST__TILED_WM__PANEL__PANEL_H_
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
|
/* Qoost includes */
|
||||||
|
#include <qoost/compound_widget.h>
|
||||||
|
#include <qoost/qmember.h>
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
#include <os/reporter.h>
|
||||||
|
|
||||||
|
/* local includes */
|
||||||
|
#include <util.h>
|
||||||
|
#include <icon.h> /* build-dir copy of qoost/icon.h works around missing "vtable for Icon" */
|
||||||
|
|
||||||
|
|
||||||
|
class Panel_button : public Compound_widget<QPushButton, QHBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
QMember<Icon> _icon;
|
||||||
|
QMember<QMenu> _menu;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
|
||||||
|
void _clicked();
|
||||||
|
void _toggled(bool);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Panel_button(QString label = QString());
|
||||||
|
~Panel_button();
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
void clicked(QString label);
|
||||||
|
void toggled(bool checked, QString label);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class App_bar : public Compound_widget<QWidget, QHBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Genode::Attached_rom_dataspace _apps;
|
||||||
|
Genode::Reporter _content_request;
|
||||||
|
|
||||||
|
QMember<QButtonGroup> _button_group;
|
||||||
|
QMember<Genode_signal_proxy> _apps_proxy;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
|
||||||
|
void _handle_apps();
|
||||||
|
void _app_button(QAbstractButton *, bool);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
App_bar(Genode::Env &, Genode::Entrypoint &);
|
||||||
|
~App_bar();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Panel : public Compound_widget<QWidget, QHBoxLayout>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Genode::Attached_rom_dataspace _overlay;
|
||||||
|
Genode::Reporter _overlay_request;
|
||||||
|
|
||||||
|
QMember<Panel_button> _panel_button;
|
||||||
|
QMember<App_bar> _app_bar;
|
||||||
|
QMember<Panel_button> _wifi_button;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
|
||||||
|
void _wifi_toggled(bool);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Panel(Genode::Env &, Genode::Entrypoint &);
|
||||||
|
~Panel();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _TEST__TILED_WM__PANEL__PANEL_H_ */
|
7
repos/gems/src/test/tiled_wm_qt6/panel/panel.pro
Normal file
7
repos/gems/src/test/tiled_wm_qt6/panel/panel.pro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TEMPLATE = app
|
||||||
|
TARGET = test-tiled_wm-panel
|
||||||
|
QT = core gui widgets
|
||||||
|
CONFIG += c++2a
|
||||||
|
SOURCES += main.cpp panel.cpp
|
||||||
|
HEADERS += panel.h icon.h ../util.h
|
||||||
|
RESOURCES = panel.qrc
|
9
repos/gems/src/test/tiled_wm_qt6/panel/panel.qrc
Normal file
9
repos/gems/src/test/tiled_wm_qt6/panel/panel.qrc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<RCC version="1.0">
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../style.qss</file>
|
||||||
|
<file>wifi.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
|
||||||
|
<!-- vi: set ft=xml : -->
|
6
repos/gems/src/test/tiled_wm_qt6/panel/target.mk
Normal file
6
repos/gems/src/test/tiled_wm_qt6/panel/target.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
QMAKE_PROJECT_FILE = $(PRG_DIR)/panel.pro
|
||||||
|
QMAKE_TARGET_BINARIES = test-tiled_wm-panel
|
||||||
|
|
||||||
|
qmake_prepared.tag: icon.h
|
||||||
|
|
||||||
|
include $(PRG_DIR)/../target.inc
|
BIN
repos/gems/src/test/tiled_wm_qt6/panel/wifi.png
Normal file
BIN
repos/gems/src/test/tiled_wm_qt6/panel/wifi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
22
repos/gems/src/test/tiled_wm_qt6/style.qss
Normal file
22
repos/gems/src/test/tiled_wm_qt6/style.qss
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Panel, Overlay, App { min-width: 100px; min-height: 100px; }
|
||||||
|
|
||||||
|
QFrame { padding: 5px; }
|
||||||
|
QLabel { color: white; }
|
||||||
|
/*QPushButton { border: none; outline: none; }*/
|
||||||
|
|
||||||
|
Panel {
|
||||||
|
background-color: rgb(51, 93, 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
Panel_button Icon { qproperty-iconSize: 18px; }
|
||||||
|
Panel_button#wifi Icon { qproperty-iconFile: url(:/wifi.png); }
|
||||||
|
|
||||||
|
Overlay {
|
||||||
|
background-color: rgba(25, 69, 105, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
App {
|
||||||
|
background-color: rgb(96, 130, 159);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vi: set ft=css : */
|
25
repos/gems/src/test/tiled_wm_qt6/target.inc
Normal file
25
repos/gems/src/test/tiled_wm_qt6/target.inc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6Widgets
|
||||||
|
|
||||||
|
LIBS = qt6_qmake base libc libm mesa stdcxx qoost
|
||||||
|
|
||||||
|
QT6_COMPONENT_LIB_SO =
|
||||||
|
|
||||||
|
QT6_GENODE_LIBS_APP += ld.lib.so
|
||||||
|
qmake_prepared.tag: $(addprefix build_dependencies/lib/,$(QT6_GENODE_LIBS_APP))
|
||||||
|
|
||||||
|
INC_DIR += $(PRG_DIR)/..
|
||||||
|
|
||||||
|
#
|
||||||
|
# We need Qt headers in a local directory for MOC to work correctly
|
||||||
|
#
|
||||||
|
|
||||||
|
# icon.h from the qoost API package
|
||||||
|
ICON_H = $(call select_from_repositories,include/qoost/icon.h)
|
||||||
|
|
||||||
|
# fall-back to the qoost port directory if that fails
|
||||||
|
ifeq ($(ICON_H),)
|
||||||
|
ICON_H := $(call select_from_ports,qoost)/include/qoost/icon.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
icon.h: $(ICON_H)
|
||||||
|
$(VERBOSE)cp $(ICON_H) .
|
116
repos/gems/src/test/tiled_wm_qt6/util.h
Normal file
116
repos/gems/src/test/tiled_wm_qt6/util.h
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
* \brief Tiled-WM test: utilities
|
||||||
|
* \author Christian Helmuth
|
||||||
|
* \date 2018-09-26
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2020 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _TEST__TILED_WM__UTIL_H_
|
||||||
|
#define _TEST__TILED_WM__UTIL_H_
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/signal.h>
|
||||||
|
#include <base/thread.h>
|
||||||
|
#include <base/log.h>
|
||||||
|
#include <util/string.h>
|
||||||
|
|
||||||
|
/* Qt includes */
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QFrame>
|
||||||
|
|
||||||
|
/* Qoost includes */
|
||||||
|
#include <qoost/qmember.h>
|
||||||
|
|
||||||
|
/* Libc includes */
|
||||||
|
#include <libc/component.h>
|
||||||
|
|
||||||
|
/* qt6_component includes */
|
||||||
|
#include <qt6_component/qpa_init.h>
|
||||||
|
|
||||||
|
using Name = Genode::String<32>;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Genode signal to queued Qt signal proxy
|
||||||
|
*/
|
||||||
|
class Genode_signal_proxy : public QObject,
|
||||||
|
public Genode::Signal_handler<Genode_signal_proxy>
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Genode_signal_proxy(Genode::Entrypoint &sig_ep)
|
||||||
|
:
|
||||||
|
Genode::Signal_handler<Genode_signal_proxy>(
|
||||||
|
sig_ep, *this, &Genode_signal_proxy::handle_genode_signal)
|
||||||
|
{
|
||||||
|
connect(this, SIGNAL(internal_signal()),
|
||||||
|
this, SIGNAL(signal()),
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* called by signal handler / emits internal signal in context of
|
||||||
|
* signal-entrypoint thread */
|
||||||
|
void handle_genode_signal() { Q_EMIT internal_signal(); }
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
/* internal_signal() is Qt::QueuedConnection to signal() */
|
||||||
|
void internal_signal();
|
||||||
|
|
||||||
|
/* finally signal() is emitted in the context of the Qt main thread */
|
||||||
|
void signal();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Qt initialization
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline QApplication & qt6_initialization(Libc::Env &env)
|
||||||
|
{
|
||||||
|
qpa_init(env);
|
||||||
|
|
||||||
|
char const *argv[] = { "qt6_app", 0 };
|
||||||
|
int argc = sizeof(argv)/sizeof(*argv);
|
||||||
|
|
||||||
|
static QApplication app(argc, (char**)argv);
|
||||||
|
|
||||||
|
QFile file(":style.qss");
|
||||||
|
if (!file.open(QFile::ReadOnly)) {
|
||||||
|
qWarning() << "Warning:" << file.errorString()
|
||||||
|
<< "opening file" << file.fileName();
|
||||||
|
} else {
|
||||||
|
qApp->setStyleSheet(QLatin1String(file.readAll()));
|
||||||
|
}
|
||||||
|
|
||||||
|
app.connect(&app, SIGNAL(lastWindowClosed()), SLOT(quit()));
|
||||||
|
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Widget utilities
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct Spacer : QFrame
|
||||||
|
{
|
||||||
|
Q_OBJECT public:
|
||||||
|
|
||||||
|
Spacer(QString const &style_id = "") { setObjectName(style_id); }
|
||||||
|
|
||||||
|
~Spacer() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _TEST__TILED_WM__UTIL_H_ */
|
60
repos/libports/include/qt6_component/qpa_init.h
Normal file
60
repos/libports/include/qt6_component/qpa_init.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* \brief QPA plugin initialization
|
||||||
|
* \author Christian Prochaska
|
||||||
|
* \date 2020-06-28
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU Affero General Public License version 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE__QPA_INIT_H_
|
||||||
|
#define _INCLUDE__QPA_INIT_H_
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/env.h>
|
||||||
|
|
||||||
|
/* libc includes */
|
||||||
|
#include <dlfcn.h> /* 'dlopen' */
|
||||||
|
#include <stdio.h> /* 'fprintf' */
|
||||||
|
#include <stdlib.h> /* 'exit' */
|
||||||
|
#include <unistd.h> /* 'access' */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the QPA plugin
|
||||||
|
*
|
||||||
|
* When Qt loads the plugin again, it will get the same handle.
|
||||||
|
*/
|
||||||
|
static inline void qpa_init(Genode::Env &env)
|
||||||
|
{
|
||||||
|
char const *qpa_plugin = "/qt/plugins/platforms/libqgenode.lib.so";
|
||||||
|
|
||||||
|
void *qpa_plugin_handle = nullptr;
|
||||||
|
|
||||||
|
/* check existence with 'access()' first to avoid ld error messages */
|
||||||
|
if (access(qpa_plugin, F_OK) == 0)
|
||||||
|
qpa_plugin_handle = dlopen(qpa_plugin, RTLD_LAZY);
|
||||||
|
|
||||||
|
if (qpa_plugin_handle) {
|
||||||
|
|
||||||
|
typedef void (*initialize_qpa_plugin_t)(Genode::Env &);
|
||||||
|
|
||||||
|
initialize_qpa_plugin_t initialize_qpa_plugin =
|
||||||
|
(initialize_qpa_plugin_t) dlsym(qpa_plugin_handle,
|
||||||
|
"initialize_qpa_plugin");
|
||||||
|
|
||||||
|
if (!initialize_qpa_plugin) {
|
||||||
|
fprintf(stderr, "Could not find 'initialize_qpa_plugin' \
|
||||||
|
function in QPA plugin\n");
|
||||||
|
dlclose(qpa_plugin_handle);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize_qpa_plugin(env);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _INCLUDE__QPA_INIT_H_ */
|
87
repos/libports/lib/import/import-qt6.inc
Normal file
87
repos/libports/lib/import/import-qt6.inc
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
QT_TOOLS_DIR = /usr/local/genode/tool/23.05/qt6
|
||||||
|
|
||||||
|
ifeq ($(filter-out $(SPECS),arm),)
|
||||||
|
QT_PLATFORM = genode-arm-g++
|
||||||
|
else ifeq ($(filter-out $(SPECS),arm_64),)
|
||||||
|
QT_PLATFORM = genode-aarch64-g++
|
||||||
|
else ifeq ($(filter-out $(SPECS),x86_32),)
|
||||||
|
QT_PLATFORM = genode-x86_32-g++
|
||||||
|
else ifeq ($(filter-out $(SPECS),x86_64),)
|
||||||
|
QT_PLATFORM = genode-x86_64-g++
|
||||||
|
else
|
||||||
|
$(error Error: unsupported platform)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONTRIB_DIR),)
|
||||||
|
QT_DIR = $(call select_from_repositories,src/lib/qt6)
|
||||||
|
QT_API_DIR = $(call select_from_repositories,mkspecs)/..
|
||||||
|
abi_symbol_path = $(wildcard $(call select_from_repositories,lib/symbols/$1))
|
||||||
|
else
|
||||||
|
QT_PORT_DIR := $(call select_from_ports,qt6)
|
||||||
|
QT_DIR = $(QT_PORT_DIR)/src/lib/qt6
|
||||||
|
QT_API_DIR = $(QT_DIR)/genode/api
|
||||||
|
abi_symbol_path = $(wildcard $(addprefix $(QT_API_DIR)/lib/symbols/,$1))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(VERBOSE),)
|
||||||
|
MAKE_VERBOSE="1"
|
||||||
|
else
|
||||||
|
QT6_OUTPUT_FILTER = > /dev/null
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Genode libraries to be linked to Qt applications and libraries
|
||||||
|
#
|
||||||
|
|
||||||
|
QT6_COMPONENT_LIB_SO ?= qt6_component.lib.so
|
||||||
|
QT6_GENODE_LIBS_COMMON += libc.lib.so libm.lib.so stdcxx.lib.so
|
||||||
|
QT6_GENODE_LIBS_APP += $(QT6_GENODE_LIBS_COMMON) $(QT6_COMPONENT_LIB_SO)
|
||||||
|
QT6_GENODE_LIBS_SHLIB += $(QT6_GENODE_LIBS_COMMON)
|
||||||
|
|
||||||
|
#
|
||||||
|
# common 'build_dependencies' rules
|
||||||
|
#
|
||||||
|
|
||||||
|
build_dependencies:
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
|
||||||
|
build_dependencies/include: build_dependencies
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
$(VERBOSE)ln -snf $(QT_API_DIR)/include/* $@/
|
||||||
|
|
||||||
|
build_dependencies/lib: build_dependencies
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
|
||||||
|
build_dependencies/lib/%.lib.so: build_dependencies/lib
|
||||||
|
$(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.abi.so $@
|
||||||
|
|
||||||
|
build_dependencies/lib/%.lib.a: build_dependencies/lib
|
||||||
|
$(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.lib.a $@
|
||||||
|
|
||||||
|
#
|
||||||
|
# rules for generating .lib.so files from port symbol files
|
||||||
|
#
|
||||||
|
|
||||||
|
lib_name = $(notdir $(1:.lib.so=))
|
||||||
|
abi_name = $(notdir $(1:.abi.so=))
|
||||||
|
abi_path = build_dependencies/abi/$(call abi_name,$1)/$(call abi_name,$1).abi.so
|
||||||
|
so_path = build_dependencies/lib/$(call lib_name,$1).lib.so
|
||||||
|
|
||||||
|
BUILD_DEPENDENCIES_QT6_SO_FILES := $(foreach L,$(QT6_PORT_LIBS),$(call so_path,$L))
|
||||||
|
BUILD_DEPENDENCIES_QT6_ABI_FILES := $(foreach L,$(QT6_PORT_LIBS),$(call abi_path,$L))
|
||||||
|
|
||||||
|
$(BUILD_DEPENDENCIES_QT6_ABI_FILES):
|
||||||
|
$(VERBOSE)mkdir -p $(dir $@)
|
||||||
|
$(VERBOSE)$(MAKE) -C $(dir $@) -f $(BASE_DIR)/mk/abi.mk \
|
||||||
|
SYMBOLS=$(call abi_symbol_path,$(call abi_name,$@)) \
|
||||||
|
LIB=$(call abi_name,$@) \
|
||||||
|
BUILD_BASE_DIR=$(BUILD_BASE_DIR) \
|
||||||
|
SHELL=$(SHELL)
|
||||||
|
|
||||||
|
$(BUILD_DEPENDENCIES_QT6_SO_FILES): $(BUILD_DEPENDENCIES_QT6_ABI_FILES)
|
||||||
|
|
||||||
|
.PHONY: qt6_so_files
|
||||||
|
|
||||||
|
qt6_so_files: $(BUILD_DEPENDENCIES_QT6_SO_FILES)
|
||||||
|
$(VERBOSE)for l in $(QT6_PORT_LIBS); do \
|
||||||
|
ln -sf ../abi/$$l/$$l.abi.so build_dependencies/lib/$$l.lib.so; done
|
142
repos/libports/lib/import/import-qt6_cmake.mk
Normal file
142
repos/libports/lib/import/import-qt6_cmake.mk
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
#
|
||||||
|
# The following externally defined variables are evaluated:
|
||||||
|
#
|
||||||
|
# CMAKE_LISTS_DIR: path to the CMakeLists.txt file
|
||||||
|
# CMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories
|
||||||
|
# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core)
|
||||||
|
# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(call select_from_repositories,lib/import/import-qt6.inc)
|
||||||
|
|
||||||
|
#
|
||||||
|
# flags to be passed to CMake
|
||||||
|
#
|
||||||
|
|
||||||
|
GENODE_CMAKE_CFLAGS += \
|
||||||
|
-D__FreeBSD__=12 \
|
||||||
|
-D__GENODE__ \
|
||||||
|
-ffunction-sections \
|
||||||
|
-fno-strict-aliasing \
|
||||||
|
$(CC_OPT_NOSTDINC) \
|
||||||
|
$(CC_MARCH) \
|
||||||
|
$(CC_OPT_PIC) \
|
||||||
|
$(filter-out -I.,$(INCLUDES)) \
|
||||||
|
-I$(CURDIR)/build_dependencies/mkspecs/$(QT_PLATFORM)
|
||||||
|
|
||||||
|
GENODE_CMAKE_LFLAGS_APP += \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),--dynamic-list=$(BASE_DIR)/src/ld/genode_dyn.dl) \
|
||||||
|
$(LD_OPT_NOSTDLIB) \
|
||||||
|
-Wl,-Ttext=0x01000000 \
|
||||||
|
$(CC_MARCH) \
|
||||||
|
-Wl,--dynamic-linker=$(DYNAMIC_LINKER).lib.so \
|
||||||
|
-Wl,--eh-frame-hdr \
|
||||||
|
-Wl,-rpath-link=. \
|
||||||
|
-Wl,-T -Wl,$(LD_SCRIPT_DYN) \
|
||||||
|
-L$(CURDIR)/build_dependencies/lib \
|
||||||
|
-Wl,--whole-archive \
|
||||||
|
-Wl,--start-group \
|
||||||
|
$(addprefix -l:,$(QT6_GENODE_LIBS_APP)) \
|
||||||
|
$(shell $(CC) $(CC_MARCH) -print-libgcc-file-name) \
|
||||||
|
-Wl,--end-group \
|
||||||
|
-Wl,--no-whole-archive
|
||||||
|
|
||||||
|
GENODE_CMAKE_LFLAGS_SHLIB += \
|
||||||
|
$(LD_OPT_NOSTDLIB) \
|
||||||
|
-Wl,-shared \
|
||||||
|
-Wl,--eh-frame-hdr \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \
|
||||||
|
-Wl,-T -Wl,$(LD_SCRIPT_SO) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),--entry=0x0) \
|
||||||
|
-L$(CURDIR)/build_dependencies/lib \
|
||||||
|
-Wl,--whole-archive \
|
||||||
|
-Wl,--start-group \
|
||||||
|
$(addprefix -l:,$(QT6_GENODE_LIBS_SHLIB)) \
|
||||||
|
$(shell $(CC) $(CC_MARCH) -print-libgcc-file-name) \
|
||||||
|
-l:ldso_so_support.lib.a \
|
||||||
|
-Wl,--end-group \
|
||||||
|
-Wl,--no-whole-archive
|
||||||
|
|
||||||
|
##
|
||||||
|
## prepare a directory named 'build_dependencies' where CMake can find needed files
|
||||||
|
##
|
||||||
|
|
||||||
|
build_dependencies/lib/cmake: build_dependencies/lib
|
||||||
|
$(VERBOSE)ln -snf $(QT_API_DIR)/lib/cmake $@
|
||||||
|
|
||||||
|
build_dependencies/metatypes: build_dependencies
|
||||||
|
$(VERBOSE)ln -snf $(QT_API_DIR)/metatypes $@
|
||||||
|
|
||||||
|
build_dependencies/mkspecs: build_dependencies
|
||||||
|
$(VERBOSE)ln -snf $(QT_API_DIR)/mkspecs $@
|
||||||
|
|
||||||
|
cmake_prepared.tag: \
|
||||||
|
build_dependencies/include \
|
||||||
|
build_dependencies/lib/cmake \
|
||||||
|
build_dependencies/lib/libc.lib.so \
|
||||||
|
build_dependencies/lib/libm.lib.so \
|
||||||
|
build_dependencies/lib/egl.lib.so \
|
||||||
|
build_dependencies/lib/mesa.lib.so \
|
||||||
|
build_dependencies/lib/qt6_component.lib.so \
|
||||||
|
build_dependencies/lib/stdcxx.lib.so \
|
||||||
|
build_dependencies/lib/ldso_so_support.lib.a \
|
||||||
|
build_dependencies/metatypes \
|
||||||
|
build_dependencies/mkspecs
|
||||||
|
$(VERBOSE)touch $@
|
||||||
|
|
||||||
|
.PHONY: build_with_cmake
|
||||||
|
|
||||||
|
# 'make' called by CMake uses '/bin/sh', which does not understand '-o pipefail'
|
||||||
|
unexport .SHELLFLAGS
|
||||||
|
|
||||||
|
build_with_cmake: cmake_prepared.tag qt6_so_files
|
||||||
|
$(VERBOSE)cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_PREFIX_PATH="$(CURDIR)/build_dependencies" \
|
||||||
|
-DCMAKE_MODULE_PATH="$(CURDIR)/build_dependencies/lib/cmake/Modules" \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Genode" \
|
||||||
|
-DCMAKE_AR="$(AR)" \
|
||||||
|
-DCMAKE_C_COMPILER="$(CC)" \
|
||||||
|
-DCMAKE_C_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_CXX_COMPILER="$(CXX)" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_APP)" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
--no-warn-unused-cli \
|
||||||
|
$(CMAKE_LISTS_DIR) \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Not every CMake project has an 'install' target, so execute
|
||||||
|
# this target only if a binary to be installed has "install/" in
|
||||||
|
# its path.
|
||||||
|
#
|
||||||
|
ifneq ($(findstring install/,$(CMAKE_TARGET_BINARIES)),)
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(VERBOSE)for cmake_target_binary in $(CMAKE_TARGET_BINARIES); do \
|
||||||
|
$(OBJCOPY) --only-keep-debug $${cmake_target_binary} $${cmake_target_binary}.debug; \
|
||||||
|
$(STRIP) $${cmake_target_binary} -o $${cmake_target_binary}.stripped; \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$${cmake_target_binary}.debug $${cmake_target_binary}.stripped; \
|
||||||
|
ln -sf $(CURDIR)/$${cmake_target_binary}.stripped $(PWD)/bin/`basename $${cmake_target_binary}`; \
|
||||||
|
ln -sf $(CURDIR)/$${cmake_target_binary}.stripped $(PWD)/debug/`basename $${cmake_target_binary}`; \
|
||||||
|
ln -sf $(CURDIR)/$${cmake_target_binary}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS += $(notdir $(CMAKE_TARGET_BINARIES))
|
||||||
|
|
||||||
|
#
|
||||||
|
# build applications with CMake
|
||||||
|
#
|
||||||
|
TARGET ?= $(CMAKE_LISTS_DIR).cmake_target
|
||||||
|
.PHONY: $(TARGET)
|
||||||
|
$(TARGET): build_with_cmake $(QT6_EXTRA_TARGET_DEPS)
|
176
repos/libports/lib/import/import-qt6_qmake.mk
Normal file
176
repos/libports/lib/import/import-qt6_qmake.mk
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
#
|
||||||
|
# The following externally defined variables are evaluated:
|
||||||
|
#
|
||||||
|
# QMAKE_PROJECT_FILE: path to the qmake project file (for applications with target.mk)
|
||||||
|
# QMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories
|
||||||
|
# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core)
|
||||||
|
# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(call select_from_repositories,lib/import/import-qt6.inc)
|
||||||
|
|
||||||
|
QMAKE = build_dependencies/bin/qmake
|
||||||
|
|
||||||
|
#
|
||||||
|
# flags to be passed to qmake via env.sh and mkspecs/common/genode.conf
|
||||||
|
#
|
||||||
|
|
||||||
|
GENODE_QMAKE_CFLAGS += \
|
||||||
|
-D__FreeBSD__=12 \
|
||||||
|
-D__GENODE__ \
|
||||||
|
-ffunction-sections \
|
||||||
|
-fno-strict-aliasing \
|
||||||
|
$(CC_OPT_NOSTDINC) \
|
||||||
|
$(CC_MARCH) \
|
||||||
|
$(CC_OPT_PIC) \
|
||||||
|
$(filter-out -I.,$(INCLUDES)) \
|
||||||
|
-I$(CURDIR)/build_dependencies/include/QtCore/spec/$(QT_PLATFORM)
|
||||||
|
|
||||||
|
GENODE_QMAKE_LFLAGS_APP += \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),--dynamic-list=$(BASE_DIR)/src/ld/genode_dyn.dl) \
|
||||||
|
$(LD_OPT_NOSTDLIB) \
|
||||||
|
-Wl,-Ttext=0x01000000 \
|
||||||
|
$(CC_MARCH) \
|
||||||
|
-Wl,--dynamic-linker=$(DYNAMIC_LINKER).lib.so \
|
||||||
|
-Wl,--eh-frame-hdr \
|
||||||
|
-Wl,-rpath-link=. \
|
||||||
|
-Wl,-T -Wl,$(LD_SCRIPT_DYN) \
|
||||||
|
-L$(CURDIR)/build_dependencies/lib \
|
||||||
|
-Wl,--whole-archive \
|
||||||
|
-Wl,--start-group \
|
||||||
|
$(addprefix -l:,$(QT6_GENODE_LIBS_APP)) \
|
||||||
|
-Wl,--end-group \
|
||||||
|
-Wl,--no-whole-archive
|
||||||
|
|
||||||
|
GENODE_QMAKE_LFLAGS_SHLIB += \
|
||||||
|
$(LD_OPT_NOSTDLIB) \
|
||||||
|
-Wl,-shared \
|
||||||
|
-Wl,--eh-frame-hdr \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \
|
||||||
|
-Wl,-T -Wl,$(LD_SCRIPT_SO) \
|
||||||
|
$(addprefix $(LD_OPT_PREFIX),--entry=0x0) \
|
||||||
|
-L$(CURDIR)/build_dependencies/lib \
|
||||||
|
-Wl,--whole-archive \
|
||||||
|
-Wl,--start-group \
|
||||||
|
$(addprefix -l:,$(QT6_GENODE_LIBS_SHLIB)) \
|
||||||
|
-l:ldso_so_support.lib.a \
|
||||||
|
-Wl,--end-group \
|
||||||
|
-Wl,--no-whole-archive
|
||||||
|
|
||||||
|
#
|
||||||
|
# libgcc must appear on the command line after all other libs
|
||||||
|
# (including those added by qmake) and using the QMAKE_LIBS
|
||||||
|
# variable achieves this, fortunately
|
||||||
|
#
|
||||||
|
GENODE_QMAKE_LIBS = \
|
||||||
|
$(shell $(CC) $(CC_MARCH) -print-libgcc-file-name)
|
||||||
|
|
||||||
|
ifeq ($(CONTRIB_DIR),)
|
||||||
|
GENODE_QMAKE_INCDIR_OPENGL = $(call select_from_repositories,include/GL)/..
|
||||||
|
GENODE_QMAKE_INCDIR_EGL = $(call select_from_repositories,include/EGL)/..
|
||||||
|
else
|
||||||
|
GENODE_QMAKE_INCDIR_OPENGL := $(call select_from_ports,mesa)/include
|
||||||
|
GENODE_QMAKE_INCDIR_EGL := $(call select_from_ports,mesa)/include
|
||||||
|
endif
|
||||||
|
|
||||||
|
GENODE_QMAKE_LIBS_OPENGL = $(CURDIR)/build_dependencies/lib/mesa.lib.so
|
||||||
|
GENODE_QMAKE_LIBS_EGL = $(CURDIR)/build_dependencies/lib/egl.lib.so
|
||||||
|
|
||||||
|
#
|
||||||
|
# export variables for qmake.conf
|
||||||
|
#
|
||||||
|
|
||||||
|
env.sh:
|
||||||
|
$(VERBOSE)rm -f $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_CC='$(CC)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_CXX='$(CXX)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LINK='$(CXX)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_AR='$(AR)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_OBJCOPY='$(OBJCOPY)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_NM='$(NM)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_STRIP='$(STRIP)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_CFLAGS='$(GENODE_QMAKE_CFLAGS)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LFLAGS_APP='$(GENODE_QMAKE_LFLAGS_APP)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LFLAGS_SHLIB='$(GENODE_QMAKE_LFLAGS_SHLIB)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LIBS='$(GENODE_QMAKE_LIBS)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_INCDIR_OPENGL='$(GENODE_QMAKE_INCDIR_OPENGL)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LIBS_OPENGL='$(GENODE_QMAKE_LIBS_OPENGL)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_INCDIR_EGL='$(GENODE_QMAKE_INCDIR_EGL)'" >> $@
|
||||||
|
$(VERBOSE)echo "export GENODE_QMAKE_LIBS_EGL='$(GENODE_QMAKE_LIBS_EGL)'" >> $@
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# prepare a directory named 'build_dependencies' where qmake can find needed files
|
||||||
|
#
|
||||||
|
|
||||||
|
build_dependencies/bin: build_dependencies
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
$(VERBOSE)ln -sf $(QT_TOOLS_DIR)/bin/* $@/
|
||||||
|
|
||||||
|
build_dependencies/lib/libQt6Core.so.6: build_dependencies/lib
|
||||||
|
$(VERBOSE)ln -sf $(QT_TOOLS_DIR)/lib/libQt6Core.so.6 $@
|
||||||
|
|
||||||
|
build_dependencies/libexec: build_dependencies
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
$(VERBOSE)ln -sf $(QT_TOOLS_DIR)/libexec/* $@/
|
||||||
|
|
||||||
|
build_dependencies/mkspecs: build_dependencies
|
||||||
|
$(VERBOSE)mkdir -p $@
|
||||||
|
$(VERBOSE)ln -sf $(QT_API_DIR)/mkspecs/* $@/
|
||||||
|
$(VERBOSE)rm -f $@/modules
|
||||||
|
$(VERBOSE)mkdir $@/modules
|
||||||
|
$(VERBOSE)ln -snf $(QT_API_DIR)/mkspecs/modules/* $@/modules/
|
||||||
|
$(VERBOSE)ln -sf $(QT_PLATFORM)/qconfig.pri $@/
|
||||||
|
$(VERBOSE)ln -sf $(QT_PLATFORM)/qmodule.pri $@/
|
||||||
|
|
||||||
|
qmake_prepared.tag: env.sh \
|
||||||
|
build_dependencies/bin \
|
||||||
|
build_dependencies/include \
|
||||||
|
build_dependencies/lib/libQt6Core.so.6 \
|
||||||
|
build_dependencies/lib/libc.lib.so \
|
||||||
|
build_dependencies/lib/libm.lib.so \
|
||||||
|
build_dependencies/lib/egl.lib.so \
|
||||||
|
build_dependencies/lib/mesa.lib.so \
|
||||||
|
build_dependencies/lib/qt6_component.lib.so \
|
||||||
|
build_dependencies/lib/stdcxx.lib.so \
|
||||||
|
build_dependencies/lib/ldso_so_support.lib.a \
|
||||||
|
build_dependencies/libexec \
|
||||||
|
build_dependencies/mkspecs
|
||||||
|
$(VERBOSE)touch $@
|
||||||
|
|
||||||
|
.PHONY: build_with_qmake
|
||||||
|
|
||||||
|
build_with_qmake: qmake_prepared.tag qt6_so_files
|
||||||
|
|
||||||
|
$(VERBOSE)source env.sh && $(QMAKE) \
|
||||||
|
-spec build_dependencies/mkspecs/$(QT_PLATFORM) \
|
||||||
|
-qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \
|
||||||
|
-nocache \
|
||||||
|
$(QMAKE_PROJECT_FILE) \
|
||||||
|
"CONFIG += force_debug_info" \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
$(VERBOSE)source env.sh && $(MAKE) $(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
$(VERBOSE)for qmake_target_binary in $(QMAKE_TARGET_BINARIES); do \
|
||||||
|
$(OBJCOPY) --only-keep-debug $${qmake_target_binary} $${qmake_target_binary}.debug; \
|
||||||
|
$(STRIP) $${qmake_target_binary} -o $${qmake_target_binary}.stripped; \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$${qmake_target_binary}.debug $${qmake_target_binary}.stripped; \
|
||||||
|
ln -sf $(CURDIR)/$${qmake_target_binary}.stripped $(PWD)/bin/$${qmake_target_binary}; \
|
||||||
|
ln -sf $(CURDIR)/$${qmake_target_binary}.stripped $(PWD)/debug/$${qmake_target_binary}; \
|
||||||
|
ln -sf $(CURDIR)/$${qmake_target_binary}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS += $(notdir $(QMAKE_TARGET_BINARIES))
|
||||||
|
|
||||||
|
#
|
||||||
|
# build applications with qmake
|
||||||
|
#
|
||||||
|
TARGET ?= $(notdir $(QMAKE_PROJECT_FILE)).qmake_target
|
||||||
|
.PHONY: $(TARGET)
|
||||||
|
$(TARGET): build_with_qmake $(QT6_EXTRA_TARGET_DEPS)
|
118
repos/libports/lib/mk/qt6_base.mk
Normal file
118
repos/libports/lib/mk/qt6_base.mk
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
LIBS = qt6_cmake ldso_so_support libc libm stdcxx qt6_component egl mesa base qoost
|
||||||
|
|
||||||
|
INSTALL_LIBS = lib/libQt6Concurrent.lib.so \
|
||||||
|
lib/libQt6Core.lib.so \
|
||||||
|
lib/libQt6Gui.lib.so \
|
||||||
|
lib/libQt6Network.lib.so \
|
||||||
|
lib/libQt6OpenGL.lib.so \
|
||||||
|
lib/libQt6OpenGLWidgets.lib.so \
|
||||||
|
lib/libQt6PrintSupport.lib.so \
|
||||||
|
lib/libQt6Sql.lib.so \
|
||||||
|
lib/libQt6Test.lib.so \
|
||||||
|
lib/libQt6Widgets.lib.so \
|
||||||
|
lib/libQt6Xml.lib.so \
|
||||||
|
plugins/platforms/libqgenode.lib.so \
|
||||||
|
plugins/imageformats/libqjpeg.lib.so \
|
||||||
|
plugins/sqldrivers/libqsqlite.lib.so
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \
|
||||||
|
qt6_libqgenode.tar \
|
||||||
|
qt6_libqjpeg.tar \
|
||||||
|
qt6_libqsqlite.tar
|
||||||
|
|
||||||
|
cmake_prepared.tag: build_dependencies/lib/ld.lib.so
|
||||||
|
|
||||||
|
build: cmake_prepared.tag
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# run cmake
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DQT_SILENCE_CMAKE_GENERATOR_WARNING=ON \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Genode" \
|
||||||
|
-DCMAKE_AR="$(AR)" \
|
||||||
|
-DCMAKE_C_COMPILER="$(CC)" \
|
||||||
|
-DCMAKE_C_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_CXX_COMPILER="$(CXX)" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_APP)" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DQT_QMAKE_TARGET_MKSPEC=$(QT_PLATFORM) \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/qt \
|
||||||
|
-DQT_HOST_PATH="$(QT_TOOLS_DIR)" \
|
||||||
|
-DBUILD_WITH_PCH=OFF \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DQT_BUILD_EXAMPLES=OFF \
|
||||||
|
-DQT_QPA_DEFAULT_PLATFORM=genode \
|
||||||
|
-DFEATURE_cxx20=ON \
|
||||||
|
-DFEATURE_relocatable=OFF \
|
||||||
|
-DFEATURE_evdev=OFF \
|
||||||
|
-DFEATURE_icu=OFF \
|
||||||
|
-DFEATURE_system_harfbuzz=OFF \
|
||||||
|
-DFEATURE_backtrace=OFF \
|
||||||
|
-DFEATURE_glib=OFF \
|
||||||
|
-DFEATURE_zstd=OFF \
|
||||||
|
-DFEATURE_system_pcre2=OFF \
|
||||||
|
-DFEATURE_system_zlib=OFF \
|
||||||
|
-DFEATURE_dbus=OFF \
|
||||||
|
-DFEATURE_libudev=OFF \
|
||||||
|
-DFEATURE_opengl_desktop=ON \
|
||||||
|
-DFEATURE_egl=ON \
|
||||||
|
-DFEATURE_xkbcommon=OFF \
|
||||||
|
-DFEATURE_networkinterface=OFF \
|
||||||
|
-DFEATURE_vulkan=OFF \
|
||||||
|
-DFEATURE_reduce_relocations=OFF \
|
||||||
|
-DFEATURE_pkg_config=OFF \
|
||||||
|
$(QT_DIR)/qtbase \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# build
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# install into local 'install' directory
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# remove shared library existence checks since many libs are not
|
||||||
|
@# present and not needed at build time
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)find $(CURDIR)/install/qt/lib/cmake -name "*.cmake" \
|
||||||
|
-exec sed -i "/list(APPEND _IMPORT_CHECK_TARGETS /d" {} \;
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# strip libs and create symlinks in 'bin' and 'debug' directories
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)for LIB in $(INSTALL_LIBS); do \
|
||||||
|
cd $(CURDIR)/install/qt/$$(dirname $${LIB}) && \
|
||||||
|
$(OBJCOPY) --only-keep-debug $$(basename $${LIB}) $$(basename $${LIB}).debug && \
|
||||||
|
$(STRIP) $$(basename $${LIB}) -o $$(basename $${LIB}).stripped && \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$$(basename $${LIB}).debug $$(basename $${LIB}).stripped; \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/bin/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/debug/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# create tar archives
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)tar chf $(PWD)/bin/qt6_libqgenode.tar $(TAR_OPT) --transform='s/\.stripped//' -C install qt/plugins/platforms/libqgenode.lib.so.stripped
|
||||||
|
$(VERBOSE)tar chf $(PWD)/bin/qt6_libqjpeg.tar $(TAR_OPT) --transform='s/\.stripped//' -C install qt/plugins/imageformats/libqjpeg.lib.so.stripped
|
||||||
|
$(VERBOSE)tar chf $(PWD)/bin/qt6_libqsqlite.tar $(TAR_OPT) --transform='s/\.stripped//' -C install qt/plugins/sqldrivers/libqsqlite.lib.so.stripped
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
all: build
|
||||||
|
endif
|
4
repos/libports/lib/mk/qt6_cmake.mk
Normal file
4
repos/libports/lib/mk/qt6_cmake.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# This is a dummy library description file for the implicit inclusion of
|
||||||
|
# import-qt6_cmake.mk.
|
||||||
|
#
|
9
repos/libports/lib/mk/qt6_component.mk
Normal file
9
repos/libports/lib/mk/qt6_component.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
SRC_CC = qt_component.cc
|
||||||
|
|
||||||
|
LIBS = libc
|
||||||
|
|
||||||
|
SHARED_LIB = yes
|
||||||
|
|
||||||
|
vpath qt_component.cc $(REP_DIR)/src/lib/qt6_component
|
||||||
|
|
||||||
|
CC_CXX_WARN_STRICT =
|
140
repos/libports/lib/mk/qt6_declarative.mk
Normal file
140
repos/libports/lib/mk/qt6_declarative.mk
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6OpenGL libQt6Network libQt6Sql libQt6Test libQt6Widgets
|
||||||
|
|
||||||
|
LIBS = qt6_cmake ldso_so_support libc libm mesa egl qt6_component stdcxx
|
||||||
|
|
||||||
|
INSTALL_LIBS = lib/libQt6LabsAnimation.lib.so \
|
||||||
|
lib/libQt6LabsFolderListModel.lib.so \
|
||||||
|
lib/libQt6LabsQmlModels.lib.so \
|
||||||
|
lib/libQt6LabsSettings.lib.so \
|
||||||
|
lib/libQt6LabsSharedImage.lib.so \
|
||||||
|
lib/libQt6LabsWavefrontMesh.lib.so \
|
||||||
|
lib/libQt6Qml.lib.so \
|
||||||
|
lib/libQt6QmlCompiler.lib.so \
|
||||||
|
lib/libQt6QmlCore.lib.so \
|
||||||
|
lib/libQt6QmlLocalStorage.lib.so \
|
||||||
|
lib/libQt6QmlModels.lib.so \
|
||||||
|
lib/libQt6QmlWorkerScript.lib.so \
|
||||||
|
lib/libQt6QmlXmlListModel.lib.so \
|
||||||
|
lib/libQt6Quick.lib.so \
|
||||||
|
lib/libQt6QuickControls2.lib.so \
|
||||||
|
lib/libQt6QuickControls2Impl.lib.so \
|
||||||
|
lib/libQt6QuickDialogs2.lib.so \
|
||||||
|
lib/libQt6QuickDialogs2QuickImpl.lib.so \
|
||||||
|
lib/libQt6QuickDialogs2Utils.lib.so \
|
||||||
|
lib/libQt6QuickEffects.lib.so \
|
||||||
|
lib/libQt6QuickLayouts.lib.so \
|
||||||
|
lib/libQt6QuickParticles.lib.so \
|
||||||
|
lib/libQt6QuickShapes.lib.so \
|
||||||
|
lib/libQt6QuickTemplates2.lib.so \
|
||||||
|
lib/libQt6QuickTest.lib.so \
|
||||||
|
lib/libQt6QuickWidgets.lib.so \
|
||||||
|
qml/Qt/labs/animation/liblabsanimationplugin.lib.so \
|
||||||
|
qml/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.lib.so \
|
||||||
|
qml/Qt/labs/platform/libqtlabsplatformplugin.lib.so \
|
||||||
|
qml/Qt/labs/qmlmodels/liblabsmodelsplugin.lib.so \
|
||||||
|
qml/Qt/labs/settings/libqmlsettingsplugin.lib.so \
|
||||||
|
qml/Qt/labs/sharedimage/libsharedimageplugin.lib.so \
|
||||||
|
qml/Qt/labs/wavefrontmesh/libqmlwavefrontmeshplugin.lib.so \
|
||||||
|
qml/QtQml/Base/libqmlplugin.lib.so \
|
||||||
|
qml/QtQml/Models/libmodelsplugin.lib.so \
|
||||||
|
qml/QtQml/WorkerScript/libworkerscriptplugin.lib.so \
|
||||||
|
qml/QtQml/XmlListModel/libqmlxmllistmodelplugin.lib.so \
|
||||||
|
qml/QtQml/libqmlmetaplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Basic/impl/libqtquickcontrols2basicstyleimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Fusion/libqtquickcontrols2fusionstyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Fusion/impl/libqtquickcontrols2fusionstyleimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Imagine/libqtquickcontrols2imaginestyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Imagine/impl/libqtquickcontrols2imaginestyleimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Material/impl/libqtquickcontrols2materialstyleimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Universal/libqtquickcontrols2universalstyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/Universal/impl/libqtquickcontrols2universalstyleimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/libqtquickcontrols2plugin.lib.so \
|
||||||
|
qml/QtQuick/Controls/impl/libqtquickcontrols2implplugin.lib.so \
|
||||||
|
qml/QtQuick/Dialogs/libqtquickdialogsplugin.lib.so \
|
||||||
|
qml/QtQuick/Dialogs/quickimpl/libqtquickdialogs2quickimplplugin.lib.so \
|
||||||
|
qml/QtQuick/Effects/libeffectsplugin.lib.so \
|
||||||
|
qml/QtQuick/Layouts/libqquicklayoutsplugin.lib.so \
|
||||||
|
qml/QtQuick/LocalStorage/libqmllocalstorageplugin.lib.so \
|
||||||
|
qml/QtQuick/NativeStyle/libqtquickcontrols2nativestyleplugin.lib.so \
|
||||||
|
qml/QtQuick/Particles/libparticlesplugin.lib.so \
|
||||||
|
qml/QtQuick/Shapes/libqmlshapesplugin.lib.so \
|
||||||
|
qml/QtQuick/Templates/libqtquicktemplates2plugin.lib.so \
|
||||||
|
qml/QtQuick/Window/libquickwindowplugin.lib.so \
|
||||||
|
qml/QtQuick/tooling/libquicktoolingplugin.lib.so \
|
||||||
|
qml/QtQuick/libqtquick2plugin.lib.so \
|
||||||
|
qml/QtTest/libquicktestplugin.lib.so
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \
|
||||||
|
qt6_declarative_qml.tar
|
||||||
|
|
||||||
|
build: cmake_prepared.tag qt6_so_files
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# run cmake
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_PREFIX_PATH="$(CURDIR)/build_dependencies" \
|
||||||
|
-DCMAKE_MODULE_PATH="$(CURDIR)/build_dependencies/lib/cmake/Modules" \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Genode" \
|
||||||
|
-DCMAKE_AR="$(AR)" \
|
||||||
|
-DCMAKE_C_COMPILER="$(CC)" \
|
||||||
|
-DCMAKE_C_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_CXX_COMPILER="$(CXX)" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_APP)" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DQT_QMAKE_TARGET_MKSPEC=$(QT_PLATFORM) \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/qt \
|
||||||
|
$(QT_DIR)/qtdeclarative \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# build
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# install into local 'install' directory
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# remove shared library existence checks since many libs are not
|
||||||
|
@# present and not needed at build time
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)find $(CURDIR)/install/qt/lib/cmake -name "*.cmake" \
|
||||||
|
-exec sed -i "/list(APPEND _IMPORT_CHECK_TARGETS /d" {} \;
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# strip libs and create symlinks in 'bin' and 'debug' directories
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)for LIB in $(INSTALL_LIBS); do \
|
||||||
|
cd $(CURDIR)/install/qt/$$(dirname $${LIB}) && \
|
||||||
|
$(OBJCOPY) --only-keep-debug $$(basename $${LIB}) $$(basename $${LIB}).debug && \
|
||||||
|
$(STRIP) $$(basename $${LIB}) -o $$(basename $${LIB}).stripped && \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$$(basename $${LIB}).debug $$(basename $${LIB}).stripped; \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/bin/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/debug/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# create tar archives
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)tar chf $(PWD)/bin/qt6_declarative_qml.tar $(TAR_OPT) --exclude='*.lib.so' --transform='s/\.stripped//' -C install qt/qml
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
all: build
|
||||||
|
endif
|
4
repos/libports/lib/mk/qt6_qmake.mk
Normal file
4
repos/libports/lib/mk/qt6_qmake.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# This is a dummy library description file for the implicit inclusion of
|
||||||
|
# import-qt6_qmake.mk.
|
||||||
|
#
|
71
repos/libports/lib/mk/qt6_shadertools.mk
Normal file
71
repos/libports/lib/mk/qt6_shadertools.mk
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
QT6_PORT_LIBS = libQt6Core libQt6Gui
|
||||||
|
|
||||||
|
LIBS = qt6_cmake ldso_so_support libc libm egl mesa qt6_component stdcxx
|
||||||
|
|
||||||
|
INSTALL_LIBS = lib/libQt6ShaderTools.lib.so
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS))
|
||||||
|
|
||||||
|
build: cmake_prepared.tag qt6_so_files
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# run cmake
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_PREFIX_PATH="$(CURDIR)/build_dependencies" \
|
||||||
|
-DCMAKE_MODULE_PATH="$(CURDIR)/build_dependencies/lib/cmake/Modules" \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Genode" \
|
||||||
|
-DCMAKE_AR="$(AR)" \
|
||||||
|
-DCMAKE_C_COMPILER="$(CC)" \
|
||||||
|
-DCMAKE_C_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_CXX_COMPILER="$(CXX)" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_APP)" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DQT_QMAKE_TARGET_MKSPEC=$(QT_PLATFORM) \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/qt \
|
||||||
|
$(QT_DIR)/qtshadertools \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# build
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# install into local 'install' directory
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# remove shared library existence checks since many libs are not
|
||||||
|
@# present and not needed at build time
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)find $(CURDIR)/install/qt/lib/cmake -name "*.cmake" \
|
||||||
|
-exec sed -i "/list(APPEND _IMPORT_CHECK_TARGETS /d" {} \;
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# strip libs and create symlinks in 'bin' and 'debug' directories
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)for LIB in $(INSTALL_LIBS); do \
|
||||||
|
cd $(CURDIR)/install/qt/$$(dirname $${LIB}) && \
|
||||||
|
$(OBJCOPY) --only-keep-debug $$(basename $${LIB}) $$(basename $${LIB}).debug && \
|
||||||
|
$(STRIP) $$(basename $${LIB}) -o $$(basename $${LIB}).stripped && \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$$(basename $${LIB}).debug $$(basename $${LIB}).stripped; \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/bin/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/debug/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
all: build
|
||||||
|
endif
|
71
repos/libports/lib/mk/qt6_svg.mk
Normal file
71
repos/libports/lib/mk/qt6_svg.mk
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6Widgets
|
||||||
|
|
||||||
|
LIBS = qt6_cmake ldso_so_support libc libm egl mesa qt6_component stdcxx
|
||||||
|
|
||||||
|
INSTALL_LIBS = lib/libQt6Svg.lib.so
|
||||||
|
|
||||||
|
BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS))
|
||||||
|
|
||||||
|
build: cmake_prepared.tag qt6_so_files
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# run cmake
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_PREFIX_PATH="$(CURDIR)/build_dependencies" \
|
||||||
|
-DCMAKE_MODULE_PATH="$(CURDIR)/build_dependencies/lib/cmake/Modules" \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Genode" \
|
||||||
|
-DCMAKE_AR="$(AR)" \
|
||||||
|
-DCMAKE_C_COMPILER="$(CC)" \
|
||||||
|
-DCMAKE_C_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_CXX_COMPILER="$(CXX)" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$(GENODE_CMAKE_CFLAGS)" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_APP)" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \
|
||||||
|
-DQT_QMAKE_TARGET_MKSPEC=$(QT_PLATFORM) \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/qt \
|
||||||
|
$(QT_DIR)/qtsvg \
|
||||||
|
$(QT6_OUTPUT_FILTER)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# build
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE)
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# install into local 'install' directory
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# remove shared library existence checks since many libs are not
|
||||||
|
@# present and not needed at build time
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)find $(CURDIR)/install/qt/lib/cmake -name "*.cmake" \
|
||||||
|
-exec sed -i "/list(APPEND _IMPORT_CHECK_TARGETS /d" {} \;
|
||||||
|
|
||||||
|
@#
|
||||||
|
@# strip libs and create symlinks in 'bin' and 'debug' directories
|
||||||
|
@#
|
||||||
|
|
||||||
|
$(VERBOSE)for LIB in $(INSTALL_LIBS); do \
|
||||||
|
cd $(CURDIR)/install/qt/$$(dirname $${LIB}) && \
|
||||||
|
$(OBJCOPY) --only-keep-debug $$(basename $${LIB}) $$(basename $${LIB}).debug && \
|
||||||
|
$(STRIP) $$(basename $${LIB}) -o $$(basename $${LIB}).stripped && \
|
||||||
|
$(OBJCOPY) --add-gnu-debuglink=$$(basename $${LIB}).debug $$(basename $${LIB}).stripped; \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/bin/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.stripped $(PWD)/debug/$$(basename $${LIB}); \
|
||||||
|
ln -sf $(CURDIR)/install/qt/$${LIB}.debug $(PWD)/debug/; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
all: build
|
||||||
|
endif
|
7
repos/libports/lib/symbols/qt6_component
Normal file
7
repos/libports/lib/symbols/qt6_component
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
_ZN4Libc9Component9constructERNS_3EnvE T
|
||||||
|
#
|
||||||
|
# Make sure there is an undefined reference to "main". Because Qt6 apps don't
|
||||||
|
# link the posix library (where main is also undefined), we need this so "main"
|
||||||
|
# does not get garbage collected during linking.
|
||||||
|
#
|
||||||
|
main U
|
1
repos/libports/ports/qt6-host.hash
Normal file
1
repos/libports/ports/qt6-host.hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
65bfe06368aa913897c75ac819acb9d1efdf367f
|
8
repos/libports/ports/qt6-host.port
Normal file
8
repos/libports/ports/qt6-host.port
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
LICENSE := GPL
|
||||||
|
VERSION := 6.6.2
|
||||||
|
|
||||||
|
DOWNLOADS := qt6.archive
|
||||||
|
|
||||||
|
URL(qt6) := https://download.qt.io/official_releases/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz
|
||||||
|
SHA(qt6) := 3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d
|
||||||
|
DIR(qt6) := src/lib/qt6
|
1
repos/libports/ports/qt6.hash
Normal file
1
repos/libports/ports/qt6.hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
22e90c4bc425795166ebec55fd1853311862bc99
|
8
repos/libports/ports/qt6.port
Normal file
8
repos/libports/ports/qt6.port
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
LICENSE := GPL
|
||||||
|
VERSION := 6.6.2
|
||||||
|
|
||||||
|
DOWNLOADS := qt6.git
|
||||||
|
|
||||||
|
URL(qt6) := https://github.com/cproc/qt6.git
|
||||||
|
REV(qt6) := issue5325
|
||||||
|
DIR(qt6) := src/lib/qt6
|
48
repos/libports/recipes/api/qt6_base/content.mk
Normal file
48
repos/libports/recipes/api/qt6_base/content.mk
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/import/import-qt6.inc \
|
||||||
|
lib/import/import-qt6_cmake.mk \
|
||||||
|
lib/import/import-qt6_qmake.mk \
|
||||||
|
lib/mk/qt6_cmake.mk \
|
||||||
|
lib/mk/qt6_qmake.mk
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
API_DIR := $(PORT_DIR)/src/lib/qt6/genode/api
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := include \
|
||||||
|
metatypes \
|
||||||
|
mkspecs \
|
||||||
|
lib/cmake \
|
||||||
|
|
||||||
|
MIRROR_SYMBOLS := lib/symbols/libQt6Concurrent \
|
||||||
|
lib/symbols/libQt6Core \
|
||||||
|
lib/symbols/libQt6Gui \
|
||||||
|
lib/symbols/libQt6Network \
|
||||||
|
lib/symbols/libQt6OpenGL \
|
||||||
|
lib/symbols/libQt6OpenGLWidgets \
|
||||||
|
lib/symbols/libQt6PrintSupport \
|
||||||
|
lib/symbols/libQt6Sql \
|
||||||
|
lib/symbols/libQt6Test \
|
||||||
|
lib/symbols/libQt6Widgets \
|
||||||
|
lib/symbols/libQt6Xml \
|
||||||
|
lib/symbols/libqgenode
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
cp -r $(API_DIR)/$@ $@
|
||||||
|
|
||||||
|
content: $(MIRROR_SYMBOLS)
|
||||||
|
|
||||||
|
$(MIRROR_SYMBOLS):
|
||||||
|
mkdir -p lib/symbols
|
||||||
|
cp $(API_DIR)/$@ lib/symbols
|
||||||
|
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/api/qt6_base/hash
Normal file
1
repos/libports/recipes/api/qt6_base/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-07-20 2e4d78a8311cb2ea12f3318ab8e055eeec6cf44d
|
10
repos/libports/recipes/api/qt6_component/content.mk
Normal file
10
repos/libports/recipes/api/qt6_component/content.mk
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := include/qt6_component \
|
||||||
|
lib/symbols/qt6_component
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/libports/recipes/api/qt6_component/hash
Normal file
1
repos/libports/recipes/api/qt6_component/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-02-25 2ab86f26cd18d37d2313fc1a998103d98e2dc37f
|
39
repos/libports/recipes/api/qt6_declarative/content.mk
Normal file
39
repos/libports/recipes/api/qt6_declarative/content.mk
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_LIB_SYMBOLS := libQt6LabsAnimation \
|
||||||
|
libQt6LabsFolderListModel \
|
||||||
|
libQt6LabsQmlModels \
|
||||||
|
libQt6LabsSettings \
|
||||||
|
libQt6LabsSharedImage \
|
||||||
|
libQt6LabsWavefrontMesh \
|
||||||
|
libQt6Qml \
|
||||||
|
libQt6QmlCompiler \
|
||||||
|
libQt6QmlCore \
|
||||||
|
libQt6QmlLocalStorage \
|
||||||
|
libQt6QmlModels \
|
||||||
|
libQt6QmlWorkerScript \
|
||||||
|
libQt6QmlXmlListModel \
|
||||||
|
libQt6Quick \
|
||||||
|
libQt6QuickControls2 \
|
||||||
|
libQt6QuickControls2Impl \
|
||||||
|
libQt6QuickDialogs2 \
|
||||||
|
libQt6QuickDialogs2QuickImpl \
|
||||||
|
libQt6QuickDialogs2Utils \
|
||||||
|
libQt6QuickEffects \
|
||||||
|
libQt6QuickLayouts \
|
||||||
|
libQt6QuickParticles \
|
||||||
|
libQt6QuickShapes \
|
||||||
|
libQt6QuickTemplates2 \
|
||||||
|
libQt6QuickTest \
|
||||||
|
libQt6QuickWidgets
|
||||||
|
|
||||||
|
content: $(MIRROR_LIB_SYMBOLS)
|
||||||
|
|
||||||
|
$(MIRROR_LIB_SYMBOLS):
|
||||||
|
mkdir -p lib/symbols
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/genode/api/lib/symbols/$@ lib/symbols/
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/api/qt6_declarative/hash
Normal file
1
repos/libports/recipes/api/qt6_declarative/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 b019a06ae7a5361afab6fbde1d2f81911936adc7
|
14
repos/libports/recipes/api/qt6_shadertools/content.mk
Normal file
14
repos/libports/recipes/api/qt6_shadertools/content.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_LIB_SYMBOLS := libQt6ShaderTools
|
||||||
|
|
||||||
|
content: $(MIRROR_LIB_SYMBOLS)
|
||||||
|
|
||||||
|
$(MIRROR_LIB_SYMBOLS):
|
||||||
|
mkdir -p lib/symbols
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/genode/api/lib/symbols/$@ lib/symbols/
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/api/qt6_shadertools/hash
Normal file
1
repos/libports/recipes/api/qt6_shadertools/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 b019a06ae7a5361afab6fbde1d2f81911936adc7
|
14
repos/libports/recipes/api/qt6_svg/content.mk
Normal file
14
repos/libports/recipes/api/qt6_svg/content.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_LIB_SYMBOLS := libQt6Svg
|
||||||
|
|
||||||
|
content: $(MIRROR_LIB_SYMBOLS)
|
||||||
|
|
||||||
|
$(MIRROR_LIB_SYMBOLS):
|
||||||
|
mkdir -p lib/symbols
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/genode/api/lib/symbols/$@ lib/symbols/
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/api/qt6_svg/hash
Normal file
1
repos/libports/recipes/api/qt6_svg/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 b019a06ae7a5361afab6fbde1d2f81911936adc7
|
14
repos/libports/recipes/raw/qt6_dejavusans/content.mk
Normal file
14
repos/libports/recipes/raw/qt6_dejavusans/content.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
content: qt6_dejavusans.tar LICENSE
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
qt/lib/fonts/DejaVuSans.ttf:
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/qtbase/src/3rdparty/wasm/$(notdir $@) $@
|
||||||
|
|
||||||
|
qt6_dejavusans.tar: qt/lib/fonts/DejaVuSans.ttf
|
||||||
|
tar --owner=0 --group=0 --numeric-owner --mode='go=' --mtime='1970-01-01 00:00+00' -cf $@ qt
|
||||||
|
rm -rf qt
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/qtbase/src/3rdparty/wasm/DEJAVU-LICENSE $@
|
1
repos/libports/recipes/raw/qt6_dejavusans/hash
Normal file
1
repos/libports/recipes/raw/qt6_dejavusans/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 38b1c2c107e85224612d1997f05e80e65b1e70f0
|
32
repos/libports/recipes/raw/qt6_samegame/content.mk
Normal file
32
repos/libports/recipes/raw/qt6_samegame/content.mk
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
content: qt6_samegame.tar
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
SAMEGAME3_RESOURCES := samegame.qml \
|
||||||
|
Dialog.qml \
|
||||||
|
Button.qml \
|
||||||
|
Block.qml \
|
||||||
|
samegame.js
|
||||||
|
|
||||||
|
SAMEGAME_RESOURCES := background.jpg \
|
||||||
|
blueStone.png \
|
||||||
|
greenStone.png \
|
||||||
|
redStone.png
|
||||||
|
|
||||||
|
samegame:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
samegame/pics:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
$(addprefix samegame/, $(SAMEGAME3_RESOURCES)): samegame
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/qtdeclarative/examples/quick/tutorials/samegame/samegame3/$(notdir $@) $@
|
||||||
|
|
||||||
|
$(addprefix samegame/pics/, $(SAMEGAME_RESOURCES)): samegame/pics
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/qtdeclarative/examples/quick/tutorials/samegame/samegame3/pics/$(notdir $@) $@
|
||||||
|
|
||||||
|
|
||||||
|
qt6_samegame.tar: $(addprefix samegame/, $(SAMEGAME3_RESOURCES)) \
|
||||||
|
$(addprefix samegame/pics/, $(SAMEGAME_RESOURCES))
|
||||||
|
tar --owner=0 --group=0 --numeric-owner --mode='go=' --mtime='1970-01-01 00:00+00' -cf $@ -C samegame .
|
||||||
|
rm -rf samegame/
|
1
repos/libports/recipes/raw/qt6_samegame/hash
Normal file
1
repos/libports/recipes/raw/qt6_samegame/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-14 d1e0a594a9f6c6ed6f6ce1b54afd2ac9ef8c86dd
|
1
repos/libports/recipes/src/qt6_base/api
Normal file
1
repos/libports/recipes/src/qt6_base/api
Normal file
@ -0,0 +1 @@
|
|||||||
|
qt6_base
|
29
repos/libports/recipes/src/qt6_base/content.mk
Normal file
29
repos/libports/recipes/src/qt6_base/content.mk
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/mk/qt6_base.mk
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qtbase
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
MIRROR_FROM_OS := include/pointer/shape_report.h
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_OS)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_OS):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(GENODE_DIR)/repos/os/$@ $(dir $@)
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/src/qt6_base/hash
Normal file
1
repos/libports/recipes/src/qt6_base/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 a283d25ca59402458edd6637d3f6d6d0110462a1
|
15
repos/libports/recipes/src/qt6_base/used_apis
Normal file
15
repos/libports/recipes/src/qt6_base/used_apis
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
base
|
||||||
|
blit
|
||||||
|
expat
|
||||||
|
framebuffer_session
|
||||||
|
gui_session
|
||||||
|
input_session
|
||||||
|
libc
|
||||||
|
mesa
|
||||||
|
os
|
||||||
|
qoost
|
||||||
|
qt6_component
|
||||||
|
report_session
|
||||||
|
so
|
||||||
|
stdcxx
|
||||||
|
timer_session
|
20
repos/libports/recipes/src/qt6_calculatorform/content.mk
Normal file
20
repos/libports/recipes/src/qt6_calculatorform/content.mk
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/app/qt6/examples/calculatorform
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qttools/examples/designer/calculatorform
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.GPL3 $@
|
||||||
|
|
1
repos/libports/recipes/src/qt6_calculatorform/hash
Normal file
1
repos/libports/recipes/src/qt6_calculatorform/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 13465c2fe1317113b33085babc73e5f87501867a
|
6
repos/libports/recipes/src/qt6_calculatorform/used_apis
Normal file
6
repos/libports/recipes/src/qt6_calculatorform/used_apis
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
libc
|
||||||
|
mesa
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
so
|
||||||
|
stdcxx
|
1
repos/libports/recipes/src/qt6_component/api
Normal file
1
repos/libports/recipes/src/qt6_component/api
Normal file
@ -0,0 +1 @@
|
|||||||
|
qt6_component
|
10
repos/libports/recipes/src/qt6_component/content.mk
Normal file
10
repos/libports/recipes/src/qt6_component/content.mk
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/mk/qt6_component.mk \
|
||||||
|
src/lib/qt6_component/qt_component.cc
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/libports/recipes/src/qt6_component/hash
Normal file
1
repos/libports/recipes/src/qt6_component/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-06-19 57ef88b3254475486e091dc8f0f954d2f9528cba
|
3
repos/libports/recipes/src/qt6_component/used_apis
Normal file
3
repos/libports/recipes/src/qt6_component/used_apis
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
base
|
||||||
|
libc
|
||||||
|
so
|
1
repos/libports/recipes/src/qt6_declarative/api
Normal file
1
repos/libports/recipes/src/qt6_declarative/api
Normal file
@ -0,0 +1 @@
|
|||||||
|
qt6_declarative
|
21
repos/libports/recipes/src/qt6_declarative/content.mk
Normal file
21
repos/libports/recipes/src/qt6_declarative/content.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/mk/qt6_declarative.mk
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qtdeclarative
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/src/qt6_declarative/hash
Normal file
1
repos/libports/recipes/src/qt6_declarative/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 0823c7e39fe4c746ee577f1067992139bb73e731
|
6
repos/libports/recipes/src/qt6_declarative/used_apis
Normal file
6
repos/libports/recipes/src/qt6_declarative/used_apis
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
libc
|
||||||
|
mesa
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
so
|
||||||
|
stdcxx
|
27
repos/libports/recipes/src/qt6_launchpad/content.mk
Normal file
27
repos/libports/recipes/src/qt6_launchpad/content.mk
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/app/qt6/qt_launchpad
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
MIRROR_FROM_DEMO := include/launchpad \
|
||||||
|
lib/mk/launchpad.mk \
|
||||||
|
src/lib/launchpad
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_DEMO)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_DEMO):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(GENODE_DIR)/repos/demo/$@ $(dir $@)
|
||||||
|
|
||||||
|
MIRROR_FROM_OS := include/init/child_policy.h
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_OS)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_OS):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(GENODE_DIR)/repos/os/$@ $(dir $@)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/libports/recipes/src/qt6_launchpad/hash
Normal file
1
repos/libports/recipes/src/qt6_launchpad/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 1299305e19d2c766c212224b796691fb690a740e
|
9
repos/libports/recipes/src/qt6_launchpad/used_apis
Normal file
9
repos/libports/recipes/src/qt6_launchpad/used_apis
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
base
|
||||||
|
libc
|
||||||
|
mesa
|
||||||
|
os
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
stdcxx
|
||||||
|
timer_session
|
||||||
|
vfs
|
20
repos/libports/recipes/src/qt6_openglwindow/content.mk
Normal file
20
repos/libports/recipes/src/qt6_openglwindow/content.mk
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/app/qt6/examples/openglwindow
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qtbase/examples/opengl/openglwindow
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.GPL3 $@
|
||||||
|
|
1
repos/libports/recipes/src/qt6_openglwindow/hash
Normal file
1
repos/libports/recipes/src/qt6_openglwindow/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-07 5ef331819960c41bda9d050f7dd8c7f73b76d134
|
5
repos/libports/recipes/src/qt6_openglwindow/used_apis
Normal file
5
repos/libports/recipes/src/qt6_openglwindow/used_apis
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
libc
|
||||||
|
mesa
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
stdcxx
|
9
repos/libports/recipes/src/qt6_samegame/content.mk
Normal file
9
repos/libports/recipes/src/qt6_samegame/content.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := src/app/qt6/examples/samegame
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR) LICENSE
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(GENODE_DIR)/LICENSE $@
|
1
repos/libports/recipes/src/qt6_samegame/hash
Normal file
1
repos/libports/recipes/src/qt6_samegame/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-14 eadc4679251c14144de7ea807f2ffe25d96d437b
|
6
repos/libports/recipes/src/qt6_samegame/used_apis
Normal file
6
repos/libports/recipes/src/qt6_samegame/used_apis
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
libc
|
||||||
|
mesa
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
qt6_declarative
|
||||||
|
stdcxx
|
1
repos/libports/recipes/src/qt6_shadertools/api
Normal file
1
repos/libports/recipes/src/qt6_shadertools/api
Normal file
@ -0,0 +1 @@
|
|||||||
|
qt6_shadertools
|
21
repos/libports/recipes/src/qt6_shadertools/content.mk
Normal file
21
repos/libports/recipes/src/qt6_shadertools/content.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/mk/qt6_shadertools.mk
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qtshadertools
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/src/qt6_shadertools/hash
Normal file
1
repos/libports/recipes/src/qt6_shadertools/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 0823c7e39fe4c746ee577f1067992139bb73e731
|
6
repos/libports/recipes/src/qt6_shadertools/used_apis
Normal file
6
repos/libports/recipes/src/qt6_shadertools/used_apis
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
libc
|
||||||
|
mesa
|
||||||
|
qt6_base
|
||||||
|
qt6_component
|
||||||
|
so
|
||||||
|
stdcxx
|
1
repos/libports/recipes/src/qt6_svg/api
Normal file
1
repos/libports/recipes/src/qt6_svg/api
Normal file
@ -0,0 +1 @@
|
|||||||
|
qt6_svg
|
21
repos/libports/recipes/src/qt6_svg/content.mk
Normal file
21
repos/libports/recipes/src/qt6_svg/content.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIRROR_FROM_REP_DIR := lib/mk/qt6_svg.mk
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_REP_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_REP_DIR):
|
||||||
|
$(mirror_from_rep_dir)
|
||||||
|
|
||||||
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt6)
|
||||||
|
|
||||||
|
MIRROR_FROM_PORT_DIR := src/lib/qt6/qtsvg
|
||||||
|
|
||||||
|
content: $(MIRROR_FROM_PORT_DIR)
|
||||||
|
|
||||||
|
$(MIRROR_FROM_PORT_DIR):
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||||
|
|
||||||
|
content: LICENSE
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
cp $(PORT_DIR)/src/lib/qt6/LICENSE.LGPL3 $@
|
1
repos/libports/recipes/src/qt6_svg/hash
Normal file
1
repos/libports/recipes/src/qt6_svg/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2024-08-13 0823c7e39fe4c746ee577f1067992139bb73e731
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user