From dae6bbe380d431ce85b25f713653ff22b84ff3ff Mon Sep 17 00:00:00 2001 From: twanvl Date: Wed, 18 Jun 2008 15:37:35 +0000 Subject: [PATCH] Make windows 9x (ascii) build nag when run on other windows versions. The idea is to prevent people from using the win9x fix when there are built issues with the Unicode version. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@983 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/main.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index af4c127e..59e0e810 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,6 +65,21 @@ void write_stdout(const String& str) { } } +// ----------------------------------------------------------------------------- : Checks + +void nag_about_ascii_version() { + #if !defined(UNICODE) && defined(__WXMSW__) + // windows 2000/XP/Vista/... users shouldn't use the 9x version + OSVERSIONINFO info; + info.dwOSVersionInfoSize = sizeof(info); + GetVersionEx(&info); + if (info.dwMajorVersion >= 5) { + handle_warning(_("This build of Magic Set Editor is intended for Windows 95/98/ME systems.\n") + _("It is recommended that you download the appropriate MSE version for your Windows version.")); + } + #endif +} + // ----------------------------------------------------------------------------- : Initialization int MSE::OnRun() { @@ -83,6 +98,7 @@ int MSE::OnRun() { settings.read(); the_locale = Locale::byName(settings.locale); check_updates(); + nag_about_ascii_version(); // interpret command line if (argc > 1) {