From: Ken Brown Date: Thu, 5 Jul 2018 15:22:20 +0000 (-0400) Subject: Add --no-version-check option X-Git-Tag: release_2.892~8 X-Git-Url: https://cygwin.com/git/?a=commitdiff_plain;h=0955c7b05bdb50ae180e9ab5f9bfb3c8489a0242;p=cygwin-apps%2Fsetup.git 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. --- diff --git a/ini.cc b/ini.cc index 7afeba22..78684a71 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 ()); }