]> Nishi Git Mirror - dataworks.git/commitdiff
add winnt
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 21 Jun 2024 02:15:06 +0000 (02:15 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 21 Jun 2024 02:15:06 +0000 (02:15 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@408 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

.clang-format
Client/client.c
Library/dataworks.c
Makefiles/Platforms/winnt.mk [new file with mode: 0644]
Makefiles/installer.mk
RemoteClient/tcpip.c
Server/tcpip.c

index a5e838a173b769e4b673951c295dac8768600df3..d6e528c778a1cc7332a631fc1d171ba53d782dd7 100644 (file)
@@ -11,5 +11,6 @@ AllowShortBlocksOnASingleLine: Never
 AllowShortLoopsOnASingleLine: true
 SpaceBeforeParens: Never
 AlignEscapedNewlines: DontAlign
+SortIncludes: false
 StatementMacros:
  - __dw_big_endian
index efd5905ab8db253c449a9792b54867639a5260a0..5e412fc42f43299507c5e132f73de8503013f7d0 100644 (file)
@@ -221,7 +221,7 @@ int main(int argc, char** argv) {
                        if(buf[0] == '!') {
                                system(buf + 1);
                                printf("\n");
-                       }else if(buf[0] == '.') {
+                       } else if(buf[0] == '.') {
                                if(__dw_strcaseequ(buf, ".bye") || __dw_strcaseequ(buf, ".quit")) {
                                        printf("Bye.\n");
                                        break;
index 0bb39c6feb8792b46650de641f456ef21e86e515..25de0bdb4c00dc019f8eb84b9a110ec9abeda641 100644 (file)
@@ -61,16 +61,16 @@ const char* dataworks_platform = "Unknown/"
 #endif
 #ifdef __VBCC__
 #ifdef AMIGA
-const char* dataworks_platform = "Amiga/"
+    const char* dataworks_platform = "Amiga/"
 #else
-const char* dataworks_platform = "VBCC/"
+    const char* dataworks_platform = "VBCC/"
 #endif
 #ifdef __M68K__
-    "m68k (m68k)"
+                                    "m68k (m68k)"
 #else
-    "unknown (unknown)"
+                                    "unknown (unknown)"
 #endif
-;
+    ;
 #else
     PLATFORM_M " (" PLATFORM_P ")";
 #endif
diff --git a/Makefiles/Platforms/winnt.mk b/Makefiles/Platforms/winnt.mk
new file mode 100644 (file)
index 0000000..f15db42
--- /dev/null
@@ -0,0 +1,9 @@
+# $Id$
+
+WATCOM_PLATFORM=nt
+include Makefiles/Platforms/watcom.mk
+CFLAGS += -I$$INCLUDE/nt
+EXEC_SUFFIX=.exe
+RCLI=
+SERVLINK_LIB += $$WATCOM/lib386/nt/ws2_32.lib
+RCLILINK_LIB += $$WATCOM/lib386/nt/ws2_32.lib
index 32faa0ea6e7759adf539b3ba4b7c73484476983c..f6f3640e86e7c00288746782556a29eb9470e44d 100644 (file)
@@ -55,6 +55,7 @@ dos-installer:
        echo "!define MUI_HEADERIMAGE_BITMAP \"dataworks.bmp\"" >> install.nsi
        echo "!define MUI_HEADERIMAGE_RIGHT" >> install.nsi
        echo "!define MUI_WELCOMEFINISHPAGE_BITMAP Binary/nsis.bmp" >> install.nsi
+       echo "!define MUI_UNWELCOMEFINISHPAGE_BITMAP Binary/nsis.bmp" >> install.nsi
        echo "!include nsDialogs.nsh" >> install.nsi
        echo "!include LogicLib.nsh" >> install.nsi
        echo "!include x64.nsh" >> install.nsi
@@ -100,6 +101,7 @@ dos-installer:
        echo "SectionGroup /e \"\$$(APP_SET_DESC)\" APP_SET" >> install.nsi
        echo "  Section -PreApp" >> install.nsi
        echo "    CreateDirectory \"\$$INSTDIR\\\bin\"" >> install.nsi
+       echo "    SetShellVarContext all" >> install.nsi
        echo "  SectionEnd" >> install.nsi
        echo "  Section \"\$$(CLIENT_SET_DESC)\" CLIENT_SET" >> install.nsi
        echo "    SetOutPath \"\$$INSTDIR\\\bin\"" >> install.nsi
@@ -146,6 +148,11 @@ dos-installer:
        echo "SectionEnd" >> install.nsi
        echo "Section Uninstall" >> install.nsi
        echo "  SetAutoClose false" >> install.nsi
+       echo "  \$${If} \$${RunningX64}" >> install.nsi
+       echo "    SetRegView 64" >> install.nsi
+       echo "  \$${Else}" >> install.nsi
+       echo "    SetRegView 32" >> install.nsi
+       echo "  \$${EndIf}" >> install.nsi
        echo "  Delete \"\$$INSTDIR\\\bin\\\dataworks.exe\"" >> install.nsi
        echo "  Delete \"\$$INSTDIR\\\bin\\\dataworks_server.exe\"" >> install.nsi
        echo "  Delete \"\$$INSTDIR\\\bin\\\dataworks_remote_client.exe\"" >> install.nsi
index e5caccfb6a9c5552838f1ddb59493e0685dc3cdb..18e1f92df151b39fcff975f1d0dd850bcc47c4d6 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef __MINGW32__
-#include <windows.h>
+#if defined(__MINGW32__) || defined(__WATCOMC__)
+#define USE_WINSOCK
+#endif
+
+#ifdef USE_WINSOCK
 #include <winsock2.h>
+#include <windows.h>
 #include <ws2def.h>
 #include <ws2tcpip.h>
 #include <wspiapi.h>
index 68b09b054ede07fbb2c7c440958d4196f04451de..cc07c1da5337b4d1ff33bca6ab86aae0bc2d57c3 100644 (file)
@@ -44,14 +44,14 @@ extern char** argv;
 extern bool auth;
 extern char* authfile;
 
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) || defined(__WATCOMC__)
 #define USE_WINSOCK
 #endif
 
 #ifdef USE_WINSOCK
 #include <process.h>
-#include <windows.h>
 #include <winsock2.h>
+#include <windows.h>
 #else
 #include <arpa/inet.h>
 #include <netinet/in.h>