mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-25 21:57:47 +00:00
Use -Doffline=false to reduce the install size by over 100Kb
If there's no SuperIO chip then there's no need to support this.
This commit is contained in:
parent
e840e9c23b
commit
5f01678daa
@ -36,6 +36,7 @@ meson .. \
|
|||||||
-Dplugin_platform_integrity=false \
|
-Dplugin_platform_integrity=false \
|
||||||
-Dplugin_tpm=false \
|
-Dplugin_tpm=false \
|
||||||
-Dsystemd=false \
|
-Dsystemd=false \
|
||||||
|
-Doffline=false \
|
||||||
-Dplugin_emmc=false \
|
-Dplugin_emmc=false \
|
||||||
-Dplugin_amt=false \
|
-Dplugin_amt=false \
|
||||||
-Dplugin_mtd=false \
|
-Dplugin_mtd=false \
|
||||||
|
@ -16,5 +16,6 @@ meson build \
|
|||||||
-Dgcab:docs=false \
|
-Dgcab:docs=false \
|
||||||
-Dconsolekit=false \
|
-Dconsolekit=false \
|
||||||
-Dsystemd=false \
|
-Dsystemd=false \
|
||||||
|
-Doffline=false \
|
||||||
-Delogind=true
|
-Delogind=true
|
||||||
ninja -C build test -v
|
ninja -C build test -v
|
||||||
|
@ -56,6 +56,7 @@ MESON_ARGS= -Dgudev=false \
|
|||||||
-Dplugin_tpm=false \
|
-Dplugin_tpm=false \
|
||||||
-Dpolkit=false \
|
-Dpolkit=false \
|
||||||
-Dsystemd=false \
|
-Dsystemd=false \
|
||||||
|
-Doffline=false \
|
||||||
-Dtests=false \
|
-Dtests=false \
|
||||||
-Ddocs=gtkdoc \
|
-Ddocs=gtkdoc \
|
||||||
-Defi_binary=false
|
-Defi_binary=false
|
||||||
|
@ -91,13 +91,15 @@ if get_option('systemd') and build_daemon
|
|||||||
con2.set('motd_dir', motd_dir)
|
con2.set('motd_dir', motd_dir)
|
||||||
|
|
||||||
# replace @bindir@
|
# replace @bindir@
|
||||||
configure_file(
|
if get_option('offline')
|
||||||
input : 'fwupd-offline-update.service.in',
|
configure_file(
|
||||||
output : 'fwupd-offline-update.service',
|
input : 'fwupd-offline-update.service.in',
|
||||||
configuration : con2,
|
output : 'fwupd-offline-update.service',
|
||||||
install: true,
|
configuration : con2,
|
||||||
install_dir: systemdunitdir,
|
install: true,
|
||||||
)
|
install_dir: systemdunitdir,
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
# replace @dynamic_options@
|
# replace @dynamic_options@
|
||||||
configure_file(
|
configure_file(
|
||||||
|
@ -289,6 +289,13 @@ endif
|
|||||||
if valgrind.found()
|
if valgrind.found()
|
||||||
conf.set('HAVE_VALGRIND', '1')
|
conf.set('HAVE_VALGRIND', '1')
|
||||||
endif
|
endif
|
||||||
|
if get_option('offline')
|
||||||
|
if not get_option('systemd')
|
||||||
|
error('-Doffline=true requires -Dsystemd=true')
|
||||||
|
endif
|
||||||
|
conf.set('HAVE_FWUPDOFFLINE', '1')
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
if build_standalone and get_option('plugin_altos')
|
if build_standalone and get_option('plugin_altos')
|
||||||
libelf = dependency('libelf')
|
libelf = dependency('libelf')
|
||||||
|
@ -50,3 +50,4 @@ option('efi_binary', type: 'boolean', value : true, description : 'generate uefi
|
|||||||
option('metainfo', type: 'boolean', value : true, description : 'install the project metainfo.xml information')
|
option('metainfo', type: 'boolean', value : true, description : 'install the project metainfo.xml information')
|
||||||
option('bash_completion', type: 'boolean', value : true, description : 'enable bash completion')
|
option('bash_completion', type: 'boolean', value : true, description : 'enable bash completion')
|
||||||
option('fish_completion', type: 'boolean', value : true, description : 'enable fish completion')
|
option('fish_completion', type: 'boolean', value : true, description : 'enable fish completion')
|
||||||
|
option('offline', type: 'boolean', value : true, description : 'enable installing firmware using a pre-boot systemd target')
|
||||||
|
@ -2423,6 +2423,15 @@ fu_engine_schedule_update(FuEngine *self,
|
|||||||
g_autoptr(FuHistory) history = NULL;
|
g_autoptr(FuHistory) history = NULL;
|
||||||
g_autoptr(GFile) file = NULL;
|
g_autoptr(GFile) file = NULL;
|
||||||
|
|
||||||
|
#ifndef HAVE_FWUPDOFFLINE
|
||||||
|
/* sanity check */
|
||||||
|
g_set_error(error,
|
||||||
|
FWUPD_ERROR,
|
||||||
|
FWUPD_ERROR_NOT_SUPPORTED,
|
||||||
|
"Not supported as compiled without offline support");
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* id already exists */
|
/* id already exists */
|
||||||
history = fu_history_new();
|
history = fu_history_new();
|
||||||
if ((flags & FWUPD_INSTALL_FLAG_FORCE) == 0) {
|
if ((flags & FWUPD_INSTALL_FLAG_FORCE) == 0) {
|
||||||
|
@ -2877,7 +2877,7 @@ fu_plugin_module_func(gconstpointer user_data)
|
|||||||
g_assert_cmpstr(fu_device_get_name(device), ==, "Integrated Webcam™");
|
g_assert_cmpstr(fu_device_get_name(device), ==, "Integrated Webcam™");
|
||||||
g_signal_handlers_disconnect_by_data(self->plugin, &device);
|
g_signal_handlers_disconnect_by_data(self->plugin, &device);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef HAVE_FWUPDOFFLINE
|
||||||
g_test_skip("No offline update support on Windows");
|
g_test_skip("No offline update support on Windows");
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -107,7 +107,7 @@ meson.add_install_script(
|
|||||||
join_paths(get_option('prefix'), get_option('bindir'), 'fwupdagent')))
|
join_paths(get_option('prefix'), get_option('bindir'), 'fwupdagent')))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('systemd')
|
if get_option('systemd') and get_option('offline')
|
||||||
fwupdoffline = executable(
|
fwupdoffline = executable(
|
||||||
'fwupdoffline',
|
'fwupdoffline',
|
||||||
sources : [
|
sources : [
|
||||||
|
Loading…
Reference in New Issue
Block a user