From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH setup] Show a MessageBox warning if running on a deprecated Windows version
Date: Thu, 13 Jan 2022 15:13:30 +0000 [thread overview]
Message-ID: <20220113151330.11027-1-jon.turney@dronecode.org.uk> (raw)
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
next reply other threads:[~2022-01-13 15:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 15:13 Jon Turney [this message]
2022-01-14 9:04 ` Corinna Vinschen
2022-01-14 10:54 ` Adam Dinwoodie
2022-01-14 11:45 ` Corinna Vinschen
2022-01-16 13:46 ` Adam Dinwoodie
2022-01-16 17:55 ` Hamish McIntyre-Bhatty
2022-01-17 10:03 ` Corinna Vinschen
2022-01-17 18:06 ` Brian Inglis
2022-01-18 16:15 ` Jon Turney
2022-01-24 19:57 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220113151330.11027-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).