Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ install_data(
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
)

compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file', compile_schemas, args: ['--strict', '--dry-run', meson.current_source_dir()])
endif

#========================
# metainfo confuses windows, and icons are handled differently there
Expand Down Expand Up @@ -71,10 +67,7 @@ if not windows
install_dir: get_option('datadir') / 'applications',
)

desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils, args: [desktop_file])
endif



#========================
Expand All @@ -96,9 +89,4 @@ if not windows
install_dir: get_option('datadir') / 'metainfo',
)

appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test('Validate appstream file', appstreamcli, args: ['validate', '--pedantic', '--no-net', '--explain', appstream_file])
endif

endif
20 changes: 11 additions & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ correct_app_path = '/io/github/elly_code/' + app_name
legacy_app_id = 'io.github.ellie_commons.' + app_name
legacy_app_path = '/io/github/ellie_commons/' + app_name

vala_flags = []
development = get_option('development')
legacy_rdnn = get_option('legacy-rdnn')
windows = get_option('windows')
Expand All @@ -25,27 +24,27 @@ if legacy_rdnn
app_path = legacy_app_path

#TODO: Remove once appcenter has latte
vala_flags += ['--define', 'LATTE']
add_project_arguments('--define', 'LATTE', language: 'vala')
else
app_id = correct_app_id
alternate_app_id = legacy_app_id
app_path = correct_app_path
endif

if development
app_id += '.devel'
vala_flags += ['--define', 'DEVEL']
vala_flags += ['--define', 'LATTE']
app_id += '.devel'
add_project_arguments('--define', 'DEVEL', language: 'vala')
add_project_arguments('--define', 'LATTE', language: 'vala')
endif

#================================
# Cool icon variants
icon_variant = get_option('icon-variant')

if icon_variant == 'halloween'
vala_flags += ['--define', 'HALLOWEEN']
add_project_arguments('--define', 'HALLOWEEN', language: 'vala')
else
vala_flags += ['--define', 'DEFAULT']
add_project_arguments('--define', 'DEFAULT', language: 'vala')
endif

#================================
Expand All @@ -59,7 +58,7 @@ if build_machine.system() == 'windows'
endif

if windows
vala_flags += ['--define', 'WINDOWS']
add_project_arguments('--define', 'WINDOWS', language: 'vala')
endif

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (app_name), language:'c')
Expand All @@ -70,7 +69,7 @@ add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (app_name), language:'c')

# https://gitlab.gnome.org/GNOME/vala/-/issues/1413#note_1707480
if meson.get_compiler ('c').get_id () == 'clang'
add_project_arguments('-Wno-incompatible-function-pointer-types', language: 'c')
add_project_arguments('-Wno-incompatible-function-pointer-types', language: 'c')
endif


Expand All @@ -96,6 +95,9 @@ if windows
subdir('windows')
endif

subdir('tests')


gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
Expand Down
1 change: 0 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ executable(
config_file,
sources,
dependencies: dependencies,
vala_args: vala_flags,
win_subsystem: 'windows',
install : true
)
52 changes: 48 additions & 4 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,59 @@
#
# TESTS
#

#========================
# Linter and Appstream stuff

vala_linter = find_program('io.elementary.vala-lint', required: false)
if vala_linter.found()
test('lint',
vala_linter,
args: [meson.project_source_root() / 'src'],
is_parallel: true)
endif

compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('schema',
compile_schemas,
args: ['--strict', '--dry-run', meson.project_source_root() / 'data'],
is_parallel: true)
endif

# Windows cares not for Appstream
if not windows
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('desktop',
desktop_utils,
args: [desktop_file],
is_parallel: true)
endif

appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test('metainfo',
appstreamcli,
args: ['validate', '--pedantic', '--no-net', '--explain', appstream_file],
is_parallel: true)
endif
endif


#========================
# Services


########### META:
# Linter
# Appstream files and co
# Storage: Load and save

### Services

# Build some services and enums. Do random manipulations and compare


#### UI
#========================
# Widgets
# build specific widgets:

# Textview
Expand Down