Move to Meson build system

This commit is contained in:
Chris Josten 2021-03-02 01:31:17 +01:00
parent 6db58d07cb
commit ae97f07a41
13 changed files with 132 additions and 33 deletions

15
ober/.gitignore vendored Normal file
View file

@ -0,0 +1,15 @@
.dub
docs.json
__dummy.html
docs/
/aiuo-shutdown
aiuo-shutdown.so
aiuo-shutdown.dylib
aiuo-shutdown.dll
aiuo-shutdown.a
aiuo-shutdown.lib
aiuo-shutdown-test-*
*.exe
*.o
*.obj
*.lst

View file

@ -1,15 +1,19 @@
{
"authors": [
"Chris Josten"
],
"copyright": "Copyright © 2021, Chris Josten",
"dependencies": {
"ddbus": {"path": "/home/chris/Programmeren/D/ddbus"},
"msgpack-d": "~>1.0.3",
"vibe-core": "~>1.13.0"
},
"description": "Automatisch In-Uitschakelen Ober",
"license": "MIT",
"name": "aiuo-shutdown",
"versions": ["WithRPC"]
"name": "mvoau ober",
"authors": "Meson Team",
"copyright": "Copyright © 2018, Meson Team",
"license": [
"MIT"
],
"sourceFiles": [
"source/msgpackrpc/client.d",
"source/msgpackrpc/package.d",
"source/msgpackrpc/protocol.d",
"source/msgpackrpc/server.d",
"source/app.d"
],
"targetType": "executable",
"dependencies": {
"ddbus": "3.0.0"
}
}

15
ober/dub.json.old Normal file
View file

@ -0,0 +1,15 @@
{
"authors": [
"Chris Josten"
],
"copyright": "Copyright © 2021, Chris Josten",
"dependencies": {
"ddbus": {"path": "/home/chris/Programmeren/D/ddbus"},
"msgpack-d": "~>1.0.3",
"vibe-core": "~>1.13.0"
},
"description": "Automatisch In-Uitschakelen Ober",
"license": "MIT",
"name": "aiuo-shutdown",
"versions": []
}

View file

@ -1,14 +0,0 @@
{
"fileVersion": 1,
"versions": {
"ddbus": {"path":"../../../D/ddbus"},
"dunit": "1.0.16",
"eventcore": "0.9.13",
"libasync": "0.8.6",
"memutils": "1.0.4",
"msgpack-d": "1.0.3",
"stdx-allocator": "2.77.5",
"taggedalgebraic": "0.11.19",
"vibe-core": "1.13.0"
}
}

39
ober/meson.build Normal file
View file

@ -0,0 +1,39 @@
project(
'MVOAU Ober', 'd',
version: '1.0.0',
license: 'MIT',
meson_version: '>= 0.52'
)
mvoau_ober_src_dir = include_directories('source/')
mvoau_ober_src = [
'source/msgpackrpc/client.d',
'source/msgpackrpc/package.d',
'source/msgpackrpc/protocol.d',
'source/msgpackrpc/server.d',
'source/app.d'
]
ddbus_dep = dependency('ddbus', version: '3.0.0')
msgpack_d_dep = dependency('msgpack-d', version: '>=1.0.0')
vibe_core_dep = dependency('vibe-core', version: '>=1.13')
mvoau_ober_deps = [ddbus_dep, msgpack_d_dep, vibe_core_dep]
executable('mvoau',
mvoau_ober_src,
include_directories: mvoau_ober_src_dir,
dependencies: [ddbus_dep,
msgpack_d_dep,
vibe_core_dep],
install: true)
dlang = import('dlang')
dlang.generate_dub_file(meson.project_name().to_lower(), meson.source_root(),
authors: 'Meson Team',
copyright: 'Copyright © 2018, Meson Team',
license: meson.project_license(),
sourceFiles: mvoau_ober_src,
targetType: 'executable',
dependencies: mvoau_ober_deps
)

View file

@ -78,6 +78,14 @@ public:
}
}
MessageRouter testRouter = new MessageRouter();
MessagePattern desktopChangePattern = MessagePattern(ObjectPath("/VirtualDesktopManager"), interfaceName("org.kde.KWin.VirtualDesktopManager"), "currentChanged", true);
dbus_bus_add_match(m_dbusCon.conn, "type='signal',sender='org.kde.KWin',interface='org.kde.KWin.VirtualDesktopManager,path='/VirtualDesktopManager',member='currentChanged'", null);
testRouter.setHandler!(void, string)(desktopChangePattern, (string id) {
logf("Desktop changed: %s", id);
});
registerRouter(m_dbusCon, testRouter);
version(WithRPC) {
// Register signal listeners
// FIXME: this does not work yet.
@ -121,8 +129,10 @@ public:
scope (exit) {
// Als we om een of andere redenen deze functie verlaten, laat het slot los!
releaseLock(inhibitLock);
releaseLock(sleepLock);
releaseLock(shutdownLock);
version(WithRPC) {
releaseLock(sleepLock);
releaseLock(shutdownLock);
}
}
int checkCount = CHECK_COUNT;

View file

@ -14,7 +14,7 @@ import vibe.core.core;
import vibe.core.net;
import vibe.core.task;
import protocol;
import msgpackrpc.protocol;
/**
* MessagePack RPC client

View file

@ -1,3 +1,3 @@
module msgpackrpc;
public import client;
public import server;
public import msgpackrpc.client;
public import msgpackrpc.server;

View file

@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/HenkKalkwater/ddbus.git
revision = e4ff08ba9ddcbfde972de86fc9e71c1aeb7b289c
[provide]
dependency_names = ddbus-3.0.0

View file

@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/HenkKalkwater/eventcore.git
revision = 17ade7f9cacfa0fe8d38cc64b22276de4884a620
[provide]
eventcore = eventcore_dep

View file

@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/msgpack/msgpack-d.git
revision = v1.0.3
[provide]
msgpack-d = msgpack_dep

View file

@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/HenkKalkwater/taggedalgebraic.git
revision = 466b9ab32e0a76f0f5cf65afbfc9edd939966b22
[provide]
taggedalgebraic = taggedalgebraic_dep

View file

@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/HenkKalkwater/vibe-core.git
revision = cca1063f88f184b40443863e463695c559e8ef7e
[provide]
vibe-core = vibe_core_dep