Add Meson bits for tests, icon and desktop file
authorThomas White <taw@physics.org>
Sun, 11 Mar 2018 09:41:45 +0000 (10:41 +0100)
committerThomas White <taw@physics.org>
Sun, 11 Mar 2018 09:41:45 +0000 (10:41 +0100)
colloquium.desktop [deleted file]
data/colloquium.desktop [new file with mode: 0755]
meson.build
tests/meson.build [new file with mode: 0644]

diff --git a/colloquium.desktop b/colloquium.desktop
deleted file mode 100755 (executable)
index 4bb8010..0000000
+++ /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 (executable)
index 0000000..4bb8010
--- /dev/null
@@ -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
index 664b7f0..a37374b 100644 (file)
@@ -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 (file)
index 0000000..d970f87
--- /dev/null
@@ -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)