Commit 0ed134418ff5de90c7e33a1cd004ec7fa379964f

Thomas de Grivel 2024-12-11T08:27:01

wip kmsg

diff --git a/Makefile b/Makefile
index 137908a..f462bad 100644
--- a/Makefile
+++ b/Makefile
@@ -594,6 +594,16 @@ kc3.index: sources.mk Makefile
 	sort -u < kc3.index.tmp > kc3.index
 	rm kc3.index.tmp
 
+kmsg:
+	${MAKE} gen
+	${MAKE} -C libtommath build
+	${MAKE} -C ucd2c build
+	${MAKE} -C libkc3 build
+	${MAKE} -C ikc3 build
+	${MAKE} -C kc3s build
+	${MAKE} -C gtk4 build
+	${MAKE} -C kmsg
+
 lib_links:
 	${MAKE} lib_links_${ARCH}
 
@@ -1185,6 +1195,7 @@ test_socket_debug:
 	json_asan \
 	json_cov \
 	json_debug \
+	kmsg \
 	lib_links \
 	lib_links_asan \
 	lib_links_debug \
diff --git a/kmsg/kmsg b/kmsg/kmsg
index 2d2e68e..699d4d6 100755
--- a/kmsg/kmsg
+++ b/kmsg/kmsg
@@ -4,9 +4,17 @@ defmodule Kmsg do
 
   require Gtk4
 
+  def activate (app) {
+    window = Gtk4.ApplicationWindow.new(app)
+    Gtk4.Window.set_title(window, "Kmsg")
+    Gtk4.Window.set_default_size(window, (Uw) 1080, (Uw) 720)
+    Gtk4.Window.present(window)
+  }
+
   def main () {
+    Gtk4.init()
     app = Gtk4.Application.new("Kmsg", "io.kmx.kmsg")
-    
+    Gtk4.signal_connect(app, "activate", activate)
     status = Gtk4.Application.run(app)
     Gtk4.Application.delete(app)
   }
diff --git a/test/httpd/Makefile b/test/httpd/Makefile
index b604074..830faf5 100644
--- a/test/httpd/Makefile
+++ b/test/httpd/Makefile
@@ -19,6 +19,8 @@ debug: assets
 run: assets
 	${SRC_TOP}/httpd/.libs/kc3_httpd -C ${SRC_TOP}/test/httpd 127.0.0.1 15004
 
+test: vegeta_local
+
 VEGETA_RATES = 10 20
 
 vegeta_local:
@@ -37,4 +39,4 @@ vegeta_production:
 		vegeta plot > vegeta-result.rate$$RATE.production.html; \
 	done
 
-.PHONY: assets asan cov debug main run
+.PHONY: assets asan cov debug main run test vegeta_local vegeta_production