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:
|
with:
|
||||||
msystem: UCRT64
|
msystem: UCRT64
|
||||||
update: true
|
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
|
- name: Compile
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
meson setup _build
|
meson setup _build
|
||||||
ninja -C _build install
|
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
|
- name: Test
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|||||||
@@ -22,43 +22,68 @@ gnome.compile_resources('cartridges',
|
|||||||
dependencies: blueprints,
|
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 host_machine.system() == 'windows'
|
||||||
if desktop_utils.found()
|
desktop_file = configure_file(
|
||||||
test('Validate desktop file', desktop_utils, args: [desktop_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
|
endif
|
||||||
|
|
||||||
appstream_file = i18n.merge_file(
|
if host_machine.system() != 'windows'
|
||||||
input: configure_file(
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||||
input: 'page.kramo.Cartridges.metainfo.xml.in',
|
if desktop_utils.found()
|
||||||
output: app_id + '.metainfo.xml.in',
|
test('Validate desktop file', desktop_utils, args: [desktop_file])
|
||||||
configuration: conf
|
endif
|
||||||
),
|
endif
|
||||||
output: app_id + '.metainfo.xml',
|
|
||||||
po_dir: '../po',
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
|
||||||
)
|
|
||||||
|
|
||||||
appstreamcli = find_program('appstreamcli', required: false)
|
if host_machine.system() == 'windows'
|
||||||
if appstreamcli.found()
|
appstream_file = configure_file(
|
||||||
test('Validate appstream file',
|
input: 'page.kramo.Cartridges.metainfo.xml.in',
|
||||||
appstreamcli,
|
output: app_id + '.metainfo.xml',
|
||||||
args: ['validate', '--no-net', '--explain', appstream_file],
|
configuration: conf,
|
||||||
workdir: meson.current_build_dir()
|
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
|
endif
|
||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
|
|||||||
@@ -4,7 +4,12 @@ project('cartridges',
|
|||||||
default_options: [ 'warning_level=2', 'werror=false', ],
|
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')
|
gnome = import('gnome')
|
||||||
python = import('python')
|
python = import('python')
|
||||||
|
|
||||||
@@ -42,8 +47,6 @@ if host_machine.system() == 'windows'
|
|||||||
subdir('windows')
|
subdir('windows')
|
||||||
else
|
else
|
||||||
subdir('search-provider')
|
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')
|
subdir('po')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user