From 943ee7396bad49a9df5ecd7d03c35f453ba230cd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 11 Mar 2018 10:41:45 +0100 Subject: Add Meson bits for tests, icon and desktop file --- colloquium.desktop | 10 ---------- data/colloquium.desktop | 10 ++++++++++ meson.build | 11 +++++++++++ tests/meson.build | 15 +++++++++++++++ 4 files changed, 36 insertions(+), 10 deletions(-) delete mode 100755 colloquium.desktop create mode 100755 data/colloquium.desktop create mode 100644 tests/meson.build diff --git a/colloquium.desktop b/colloquium.desktop deleted file mode 100755 index 4bb8010..0000000 --- a/colloquium.desktop +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env xdg-open -[Desktop Entry] -GenericName=Presentation -Name=Colloquium -Comment=Presentation tool -Exec=colloquium -Icon=colloquium -Terminal=false -Type=Application -Categories=GTK;Office;Presentation diff --git a/data/colloquium.desktop b/data/colloquium.desktop new file mode 100755 index 0000000..4bb8010 --- /dev/null +++ b/data/colloquium.desktop @@ -0,0 +1,10 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +GenericName=Presentation +Name=Colloquium +Comment=Presentation tool +Exec=colloquium +Icon=colloquium +Terminal=false +Type=Application +Categories=GTK;Office;Presentation diff --git a/meson.build b/meson.build index 664b7f0..a37374b 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,7 @@ gtkdep = dependency('gtk+-3.0') cc = meson.get_compiler('c') mdep = cc.find_library('m', required : false) +# Main program executable('colloquium', ['src/colloquium.c', 'src/narrative_window.c', @@ -35,5 +36,15 @@ executable('colloquium', dependencies : [gtkdep, mdep], install : true) +# Data files, icon, desktop file etc install_data(['data/demo.sc', 'data/sky.png', 'data/canvas.png'], install_dir : datadir) + +install_data(['data/colloquium.desktop'], + install_dir : get_option('datadir')+'/applications') + +install_data(['data/colloquium.svg'], + install_dir : get_option('datadir')+'/icons/hicolor/scalable/apps') + +# Tests +subdir('tests') diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..d970f87 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,15 @@ +basic_rendering = ['../src/render.c', '../src/frame.c', + '../src/sc_parse.c', '../src/imagestore.c', + '../src/sc_interp.c'] + +e = executable('storycode_test', 'storycode_test.c', '../src/sc_parse.c', + dependencies : [gtkdep]) +test('Simple StoryCode parsing', e) + +e = executable('render_test', 'render_test.c', basic_rendering, + dependencies : [gtkdep]) +test('Simple rendering', e) + +e = executable('render_test_sc1', 'render_test_sc1.c', basic_rendering, + dependencies : [gtkdep]) +test('Simple StoryCode rendering', e) -- cgit v1.2.3