From 0955c7b05bdb50ae180e9ab5f9bfb3c8489a0242 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 5 Jul 2018 11:22:20 -0400 Subject: [PATCH setup 1/2] Add --no-version-check option This suppresses the warning that a newer version of setup is available. This is intended to be used by shortcuts and scripts that run setup in a 'setup' package. This would also suppress any future auto-update feature. --- ini.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ini.cc b/ini.cc index 7afeba2..78684a7 100644 --- a/ini.cc +++ b/ini.cc @@ -62,6 +62,7 @@ IniList setup_ext_list (setup_exts, setup_exts + (sizeof(setup_exts) / sizeof(*setup_exts))); static BoolOption NoVerifyOption (false, 'X', "no-verify", "Don't verify setup.ini signatures"); +static BoolOption NoVersionCheckOption (false, '\0', "no-version-check", "Suppress checking if a newer version of setup is available"); extern int yyparse (); @@ -401,7 +402,8 @@ do_ini_thread (HINSTANCE h, HWND owner) setup_version); if (ini_setup_version.size ()) { - if (version_compare (setup_version, ini_setup_version) < 0) + if ((version_compare (setup_version, ini_setup_version) < 0) + && !NoVersionCheckOption) note (owner, IDS_OLD_SETUP_VERSION, setup_version, ini_setup_version.c_str ()); } -- 2.17.0