Skip to content

Commit

Permalink
Generate version information for ULWGL_VERSIONS.json
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed Mar 8, 2024
1 parent dbecebe commit 7fb4bbf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
40 changes: 33 additions & 7 deletions ULWGL/meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
sed = find_program('sed')
git = find_program('git')

ulwgl_run = custom_target('ulwgl_run',
input : 'ulwgl-run.in',
output : 'ulwgl-run',
command : [
sed,
'-e', 's|##INSTALL_PATH##|' + get_option('prefix') / get_option('datadir') / meson.project_name() + '|g',
'@INPUT@'
],
capture : true,
install : true,
install_dir : get_option('bindir'),
)

install_data(
[
'ulwgl_consts.py',
'ulwgl_dl_util.py',
'ulwgl_log.py',
'ulwgl_plugins.py',
'ulwgl_util.py',
'ULWGL_VERSION.json',
],
install_dir: get_option('datadir') / meson.project_name(),
)
Expand All @@ -16,14 +31,25 @@ install_data(
install_dir: get_option('datadir') / meson.project_name(),
install_mode: 'rwxr-xr-x',
)
sed = find_program('sed')
ulwgl_run = custom_target('ulwgl_run',
input : 'ulwgl-run.in',
output : 'ulwgl-run',
command : [sed, 's|##INSTALL_PATH##|' + get_option('prefix') / get_option('datadir') / meson.project_name() + '|g', '@INPUT@'],

ulwgl_desc = run_command(
git, '-C', meson.source_root(), 'describe', '--always', '--long', '--tags', check: true
).stdout().strip()
reaper_desc = run_command(
git, '-C', meson.source_root() / 'subprojects/reaper', 'describe', '--always', '--long', '--tags', check: true
).stdout().strip()
ulwgl_version = custom_target(
input : 'ULWGL_VERSION.json.in',
output : 'ULWGL_VERSION.json',
command : [
sed,
'-e', 's|##ULWGL_VERSION##|' + ulwgl_desc + '|g',
'-e', 's|##REAPER_VERSION##|' + reaper_desc + '|g',
'@INPUT@'
],
capture : true,
install : true,
install_dir : get_option('bindir'),
install_dir: get_option('datadir') / meson.project_name(),
)

subdir('ULWGL-Launcher')
12 changes: 6 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
project('ulwgl',
['cpp'],
license : 'GPL-3.0-only'
license : 'GPL-3.0-only',
license_files : ['LICENSE'],
)

reaper_options = [
'prefix=' + get_option('prefix'),
'bindir=' + get_option('prefix') / get_option('datadir') / meson.project_name(),
]
reaper = subproject('reaper',
default_options : reaper_options
default_options : [
'prefix=' + get_option('prefix'),
'bindir=' + get_option('prefix') / get_option('datadir') / meson.project_name(),
],
)

subdir('ULWGL')
3 changes: 3 additions & 0 deletions subprojects/reaper.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ directory = reaper
url = https://github.com/Plagman/reaper.git
revision = head
depth = 1

[provide]
program_names = reaper

0 comments on commit 7fb4bbf

Please sign in to comment.