From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-045.btinternet.com (mailomta20-re.btinternet.com [213.120.69.113]) by sourceware.org (Postfix) with ESMTPS id 03F283951C31 for ; Thu, 13 Jan 2022 15:13:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03F283951C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.54.7]) by re-prd-fep-045.btinternet.com with ESMTP id <20220113151356.FCWQ16557.re-prd-fep-045.btinternet.com@re-prd-rgout-004.btmx-prd.synchronoss.net>; Thu, 13 Jan 2022 15:13:56 +0000 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613A901C10562EFD X-Originating-IP: [81.129.146.209] X-OWM-Source-IP: 81.129.146.209 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvvddrtdefgdejfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepueeijeeguddvuedtffeiieelfeffudefkeehgfejffefhedtkeejgeekfedtffefnecukfhppeekuddruddvledrudegiedrvddtleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehlohgtrghlhhhoshhtrdhlohgtrghlughomhgrihhnpdhinhgvthepkedurdduvdelrddugeeirddvtdelpdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopegthihgfihinhdqrghpphhssegthihgfihinhdrtghomhdprhgtphhtthhopehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhk X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (81.129.146.209) by re-prd-rgout-004.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613A901C10562EFD; Thu, 13 Jan 2022 15:13:56 +0000 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup] Show a MessageBox warning if running on a deprecated Windows version Date: Thu, 13 Jan 2022 15:13:30 +0000 Message-Id: <20220113151330.11027-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1198.2 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 15:13:59 -0000 Show a MessageBox warning if we are running on a Windows version which we have deprecated Cygwin support for: - Windows 6.0 (Windows Vista, Windows Server 2008) - 32-bit Windows This warning can be disabled with '--allow-unsupported-windows'. --- Notes: Not sure if this is needed, or maybe this is just annoying to the ~3% of users who are running effected OSes. But maybe we want to annoy them into doing something about it? main.cc | 23 +++++++++++++++++++---- res.rc | 2 ++ resource.h | 2 ++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/main.cc b/main.cc index 162028f..818b01b 100644 --- a/main.cc +++ b/main.cc @@ -330,11 +330,26 @@ WinMain (HINSTANCE h, } /* Check if Cygwin works on this Windows version */ - if (!UnsupportedOption && (OSMajorVersion () < 6)) + if (!UnsupportedOption) { - mbox (NULL, IDS_UNSUPPORTED_WINDOWS_VERSION, - MB_ICONEXCLAMATION | MB_OK); - Logger ().exit (1, false); + if (OSMajorVersion () < 6) + { + mbox (NULL, IDS_UNSUPPORTED_WINDOWS_VERSION, + MB_ICONEXCLAMATION | MB_OK); + Logger ().exit (1, false); + } + + if +#ifdef _X86_ + (TRUE) +#else + (!is_64bit) +#endif + mbox (NULL, IDS_DEPRECATED_WINDOWS_ARCH, + MB_ICONEXCLAMATION | MB_OK); + else if ((OSMajorVersion () == 6) && (OSMinorVersion() < 1)) + mbox (NULL, IDS_DEPRECATED_WINDOWS_VERSION, + MB_ICONEXCLAMATION | MB_OK); } /* Set default DACL and Group. */ diff --git a/res.rc b/res.rc index 83d8339..1b9026a 100644 --- a/res.rc +++ b/res.rc @@ -675,6 +675,8 @@ BEGIN "Setup will not be able to create Cygwin Icons " "in the Start Menu or on the Desktop." IDS_UNSUPPORTED_WINDOWS_VERSION "Cygwin is not supported on this Windows version" + IDS_DEPRECATED_WINDOWS_VERSION "Cygwin support for this Windows version is deprecated, and will be removed in the next major version" + IDS_DEPRECATED_WINDOWS_ARCH "Cygwin support for 32-bit Windows is deprecated, and will be removed in the next major version" IDS_MOUNT_REGISTRY_KEY_FAILED "Couldn't create registry key to store installation path" IDS_NIO_ERROR "Internet Error: %s" IDS_PREREQ_UNSOLVED_PROBLEMS diff --git a/resource.h b/resource.h index 0a10f64..6dfedcc 100644 --- a/resource.h +++ b/resource.h @@ -103,6 +103,8 @@ #define IDS_PROGRESS_DOWNLOADING_FROM 1206 #define IDS_FILE_INUSE_KILL 1207 #define IDS_FILE_INUSE_MSG 1208 +#define IDS_DEPRECATED_WINDOWS_VERSION 1209 +#define IDS_DEPRECATED_WINDOWS_ARCH 1210 // Dialogs -- 2.34.1