Fix Windows builds
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -34,14 +34,14 @@ jobs:
|
||||
with:
|
||||
msystem: UCRT64
|
||||
update: true
|
||||
install: mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-python-gobject mingw-w64-ucrt-x86_64-python-yaml mingw-w64-ucrt-x86_64-python-requests mingw-w64-ucrt-x86_64-python-pillow mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-ca-certificates mingw-w64-ucrt-x86_64-meson git
|
||||
install: mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-python-gobject mingw-w64-ucrt-x86_64-python-yaml mingw-w64-ucrt-x86_64-python-requests mingw-w64-ucrt-x86_64-python-pillow mingw-w64-ucrt-x86_64-ca-certificates mingw-w64-ucrt-x86_64-meson git
|
||||
|
||||
- name: Compile
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
meson setup _build
|
||||
ninja -C _build install
|
||||
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
|
||||
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-meson git
|
||||
|
||||
- name: Test
|
||||
shell: msys2 {0}
|
||||
|
||||
@@ -22,43 +22,68 @@ gnome.compile_resources('cartridges',
|
||||
dependencies: blueprints,
|
||||
)
|
||||
|
||||
desktop_file = i18n.merge_file(
|
||||
input: configure_file(
|
||||
input: 'page.kramo.Cartridges.desktop.in',
|
||||
output: app_id + '.desktop.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(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])
|
||||
if host_machine.system() == 'windows'
|
||||
desktop_file = configure_file(
|
||||
input: 'page.kramo.Cartridges.desktop.in',
|
||||
output: app_id + '.desktop.in',
|
||||
configuration: conf,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
)
|
||||
else
|
||||
desktop_file = i18n.merge_file(
|
||||
input: configure_file(
|
||||
input: 'page.kramo.Cartridges.desktop.in',
|
||||
output: app_id + '.desktop.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
)
|
||||
endif
|
||||
|
||||
appstream_file = i18n.merge_file(
|
||||
input: configure_file(
|
||||
input: 'page.kramo.Cartridges.metainfo.xml.in',
|
||||
output: app_id + '.metainfo.xml.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.metainfo.xml',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
||||
)
|
||||
if host_machine.system() != 'windows'
|
||||
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||
if desktop_utils.found()
|
||||
test('Validate desktop file', desktop_utils, args: [desktop_file])
|
||||
endif
|
||||
endif
|
||||
|
||||
appstreamcli = find_program('appstreamcli', required: false)
|
||||
if appstreamcli.found()
|
||||
test('Validate appstream file',
|
||||
appstreamcli,
|
||||
args: ['validate', '--no-net', '--explain', appstream_file],
|
||||
workdir: meson.current_build_dir()
|
||||
if host_machine.system() == 'windows'
|
||||
appstream_file = configure_file(
|
||||
input: 'page.kramo.Cartridges.metainfo.xml.in',
|
||||
output: app_id + '.metainfo.xml',
|
||||
configuration: conf,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
||||
)
|
||||
else
|
||||
appstream_file = i18n.merge_file(
|
||||
input: configure_file(
|
||||
input: 'page.kramo.Cartridges.metainfo.xml.in',
|
||||
output: app_id + '.metainfo.xml.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.metainfo.xml',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
||||
)
|
||||
endif
|
||||
|
||||
if host_machine.system() != 'windows'
|
||||
appstreamcli = find_program('appstreamcli', required: false)
|
||||
if appstreamcli.found()
|
||||
test('Validate appstream file',
|
||||
appstreamcli,
|
||||
args: ['validate', '--no-net', '--explain', appstream_file],
|
||||
workdir: meson.current_build_dir()
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
install_data(
|
||||
|
||||
@@ -4,7 +4,12 @@ project('cartridges',
|
||||
default_options: [ 'warning_level=2', 'werror=false', ],
|
||||
)
|
||||
|
||||
i18n = import('i18n')
|
||||
# Translations are broken on Windows for multiple reasons
|
||||
# gresources don't work and MSYS2 seems to have also broken the gettext package
|
||||
if host_machine.system() != 'windows'
|
||||
i18n = import('i18n')
|
||||
endif
|
||||
|
||||
gnome = import('gnome')
|
||||
python = import('python')
|
||||
|
||||
@@ -42,8 +47,6 @@ if host_machine.system() == 'windows'
|
||||
subdir('windows')
|
||||
else
|
||||
subdir('search-provider')
|
||||
# Translations are broken on Windows for multiple reasons
|
||||
# gresources don't work and MSYS2 seems to have also broken the gettext package
|
||||
subdir('po')
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user