# Our own small apps, written in Lua and run by c8-lua (toolkit/lua):
# each a folder with main.lua, its desktop entry and its icon, and any
# other .lua files it requires. Nothing is compiled; build.sh builds
# toolkit/lua first, as the apps need c8-lua to run.
project(
'c8-lua-apps',
version: '0.1.0',
license: 'CC0-1.0',
meson_version: '>=1.3.0',
)
appdir = get_option('prefix') / get_option('datadir') / 'c8-lua' / 'apps'
modules = { 'editor': ['rtf.lua', 'md.lua'] }
foreach app : ['calculator', 'clock', 'editor', 'merge', 'mines', 'notes',
'reversi']
install_data(app / 'main.lua', install_dir: appdir / app)
foreach module : modules.get(app, [])
install_data(app / module, install_dir: appdir / app)
endforeach
desktop = configure_file(
input: app / 'app.desktop.in',
output: app + '.desktop',
configuration: {
'bindir': get_option('prefix') / get_option('bindir'),
'appdir': appdir,
},
)
id = run_command('sed', '-n', 's/^StartupWMClass=//p',
app / 'app.desktop.in', check: true).stdout().strip()
install_data(desktop, install_dir: get_option('datadir') / 'applications',
rename: id + '.desktop')
install_data(app / 'icon.svg',
install_dir: get_option('datadir') / 'icons/hicolor/scalable/apps',
rename: id + '.svg')
endforeach
import('gnome').post_install(update_desktop_database: true)