allow not embedding resources

This commit is contained in:
Nick Chan committed 2023-02-10 22:34:29 +08:00
1 parent c2c3f527c6
commit 96cadc4105
4 files changed
+91 -5

No files matched your search

+38
View File
@@ -279,6 +279,44 @@ int optparse(int argc, char* argv[]) {
return -1;
}
}
if (!(
checkrain_option_enabled(host_flags, host_option_dfuhelper_only) ||
checkrain_option_enabled(host_flags, host_option_enter_recovery) ||
checkrain_option_enabled(host_flags, host_option_exit_recovery) ||
checkrain_option_enabled(host_flags, host_option_reboot_device)))
{
#ifdef NO_CHECKRAIN
if (checkra1n_len == 0 && ext_checkra1n == NULL)
{
LOG(LOG_FATAL, "checkra1n omitted in build but no override specified");
return -1;
}
if (!(checkrain_option_enabled(host_flags, host_option_pongo_exit) || checkrain_option_enabled(host_flags, host_option_pongo_exit)))
{
#ifdef NO_BINPACK
if (binpack_dmg_len == 0)
{
LOG(LOG_FATAL, "binpack omitted in build but no override specified");
return -1;
}
#endif
#ifdef NO_RAMDISK
if (ramdisk_dmg_len == 0)
{
LOG(LOG_FATAL, "ramdisk omitted in build but no override specified");
return -1;
}
#endif
#ifdef NO_KPF
if (checkra1n_kpf_pongo_len == 0)
{
LOG(LOG_FATAL, "kernel patchfinder omitted in build but no override specified");
return -1;
}
#endif
}
#endif
}
for (index = optind; index < argc; index++)
{