From 532dfd54b10c3df5a98316ab692aa0d6a153ea2f Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Thu, 5 May 2022 12:19:22 -0500 Subject: [PATCH] trivial: install fwupd.exe into bindir for Windows In Windows we'll be placing everything in the same directory so that libraries can be resolved. --- contrib/ci/build_windows.sh | 7 ++++--- contrib/setup-win32.nsi.in | 17 ++++++++--------- meson.build | 2 ++ src/meson.build | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/contrib/ci/build_windows.sh b/contrib/ci/build_windows.sh index 6ae30f155..8bdb848b5 100755 --- a/contrib/ci/build_windows.sh +++ b/contrib/ci/build_windows.sh @@ -20,8 +20,9 @@ python3 -m pip install --user "meson >= 0.60.0" meson .. \ --cross-file=../contrib/mingw64.cross \ --prefix=/ \ - --libexecdir="" \ - --bindir="" \ + --sysconfdir="etc" \ + --libexecdir="bin" \ + --bindir="bin" \ -Dbuild=all \ -Ddocs=none \ -Dhsi=false \ @@ -60,7 +61,7 @@ mkdir -p $DESTDIR/setup makensis -NOCD $build/contrib/setup-win32.nsi #so that it's actually executable -cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll . +cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll bin #remove static archives find -type f -print0 -name "*.dll.a" | xargs rm -f diff --git a/contrib/setup-win32.nsi.in b/contrib/setup-win32.nsi.in index e74ca34ae..0a87c5af3 100644 --- a/contrib/setup-win32.nsi.in +++ b/contrib/setup-win32.nsi.in @@ -64,15 +64,14 @@ Section "fwupd" File "/etc/pki/tls/certs/ca-bundle.crt" # fwupd - File "dfu-tool.exe" - File "jcat-tool.exe" - File "fwupdtool.exe" - File "libfwupd-2.dll" - File "libfwupdplugin-@FWUPD_PLUGINVER@.dll" - File "libgcab-1.0-0.dll" - File "libxmlb-2.dll" - File "libjcat-1.dll" - File "libgusb-2.dll" + File "bin/jcat-tool.exe" + File "bin/fwupdtool.exe" + File "bin/libfwupd-2.dll" + File "bin/libfwupdplugin-@FWUPD_PLUGINVER@.dll" + File "bin/libgcab-1.0-0.dll" + File "bin/libxmlb-2.dll" + File "bin/libjcat-1.dll" + File "bin/libgusb-2.dll" SetOutPath "$INSTDIR\fwupd-plugins-@FWUPD_PLUGINVER@" File /r "fwupd-plugins-@FWUPD_PLUGINVER@/libfu_plugin_*.dll" SetOutPath "$INSTDIR\etc\fwupd" diff --git a/meson.build b/meson.build index d8bd9fdc7..4e893834e 100644 --- a/meson.build +++ b/meson.build @@ -183,12 +183,14 @@ if host_machine.system() == 'windows' datadir = get_option('datadir') installed_test_bindir = get_option('libexecdir') installed_test_datadir = get_option('datadir') + daemon_dir = get_option('libexecdir') else datadir = join_paths(prefix, get_option('datadir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) localstatedir = join_paths(prefix, get_option('localstatedir')) installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name()) installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name()) + daemon_dir = join_paths(libexecdir, 'fwupd') endif mandir = join_paths(prefix, get_option('mandir')) localedir = join_paths(prefix, get_option('localedir')) diff --git a/src/meson.build b/src/meson.build index 6e427dabf..989c590ef 100644 --- a/src/meson.build +++ b/src/meson.build @@ -224,7 +224,7 @@ executable( '-DFU_OFFLINE_DESTDIR=""', ], install : true, - install_dir : join_paths(libexecdir, 'fwupd') + install_dir : daemon_dir ) endif