You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2022/12/08 13:14:45 UTC

[netbeans-native-installers] 15/19: Revert PR4025 "Open clean up code base to remove Windows 95 & 98 support.." due to compile time constant changes.

This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit e10fbb5bf822aa4bb6bd4307906a40ffdc7cb266
Author: Neil C Smith <ne...@apache.org>
AuthorDate: Fri Aug 12 09:13:41 2022 +0100

    Revert PR4025 "Open clean up code base to remove Windows 95 & 98 support.." due to compile time constant changes.
    
    This reverts commit 20818f45e3296e33838612592ff10c9f2157c083.
---
 launcher/windows/src/ExtractUtils.c |  1 +
 launcher/windows/src/Main.c         | 31 ++++++++++++++++++-------------
 launcher/windows/src/SystemUtils.c  |  5 +++++
 launcher/windows/src/SystemUtils.h  |  1 +
 4 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
index 5eb8316..edbfa55 100644
--- a/launcher/windows/src/ExtractUtils.c
+++ b/launcher/windows/src/ExtractUtils.c
@@ -60,6 +60,7 @@ void skipStub(LauncherProperties * props) {
         WCHAR * os;
         props->status = EXIT_CODE_STUB;        
         os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
+        if(is9x()) os = appendStringW(os, L"Windows 9x");
         if(isNT()) os = appendStringW(os, L"Windows NT");
         if(is2k()) os = appendStringW(os, L"Windows 2000");
         if(isXP()) os = appendStringW(os, L"Windows XP");
diff --git a/launcher/windows/src/Main.c b/launcher/windows/src/Main.c
index e7b7b75..5a819ee 100644
--- a/launcher/windows/src/Main.c
+++ b/launcher/windows/src/Main.c
@@ -634,22 +634,27 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hi, LPSTR lpCmdLine, int nCmd
     globalInstance = hInstance;
     UNREFERENCED_PARAMETER(lpCmdLine);
     initWow64();
-    if(!createEvents()) {
-        status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
+    if(is9x()) {
+        MessageBoxA(0, "Windows 9X platform is not supported", "Message", MB_OK);
+        status = EXIT_CODE_SYSTEM_ERROR;
     } else {
-        LauncherProperties * props = createLauncherProperties();
-        createLauncherThread(props);
-        if(!createGui(props, hInstance, hi, nCmdShow)) {
-            status = EXIT_CODE_GUI_INITIALIZATION_ERROR;
+        if(!createEvents()) {
+            status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
         } else {
-            messageLoop(props);
-            WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+            LauncherProperties * props = createLauncherProperties();
+            createLauncherThread(props);
+            if(!createGui(props, hInstance, hi, nCmdShow)) {
+                status = EXIT_CODE_GUI_INITIALIZATION_ERROR;	        
+            } else {	        
+                messageLoop(props);
+                WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+            }
+            
+            status = props->status;
+            exitCode = props->exitCode;
+            printStatus(props);
+            freeLauncherProperties(&props);
         }
-
-        status = props->status;
-        exitCode = props->exitCode;
-        printStatus(props);
-        freeLauncherProperties(&props);
     }
     FREE(currentProgressSize);
     FREE(totalProgressSize);
diff --git a/launcher/windows/src/SystemUtils.c b/launcher/windows/src/SystemUtils.c
index 983ea13..c8b423e 100644
--- a/launcher/windows/src/SystemUtils.c
+++ b/launcher/windows/src/SystemUtils.c
@@ -36,6 +36,11 @@ void getOSVersion(DWORD *id, DWORD *major, DWORD *minor, DWORD *productType) {
     return;
 }
 
+DWORD is9x() {
+    DWORD id, major, minor, type;
+    getOSVersion(& id, & major, & minor, & type);
+    return (id == VER_PLATFORM_WIN32_WINDOWS) ? 1 : 0;
+}
 DWORD isNT() {    
     DWORD id, major, minor, type;
     getOSVersion(& id, & major, & minor, & type);
diff --git a/launcher/windows/src/SystemUtils.h b/launcher/windows/src/SystemUtils.h
index bdbffc5..69437f8 100644
--- a/launcher/windows/src/SystemUtils.h
+++ b/launcher/windows/src/SystemUtils.h
@@ -24,6 +24,7 @@
 extern "C" {
 #endif
 
+DWORD is9x();
 DWORD isNT();
 DWORD isXP();
 DWORD is2k();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists