From: nishi Date: Fri, 21 Jun 2024 02:15:06 +0000 (+0000) Subject: add winnt X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9107db7ec2a7608340f12eb796d73cc9b8ce19ff;p=dataworks.git add winnt git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@408 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/.clang-format b/.clang-format index a5e838a..d6e528c 100644 --- a/.clang-format +++ b/.clang-format @@ -11,5 +11,6 @@ AllowShortBlocksOnASingleLine: Never AllowShortLoopsOnASingleLine: true SpaceBeforeParens: Never AlignEscapedNewlines: DontAlign +SortIncludes: false StatementMacros: - __dw_big_endian diff --git a/Client/client.c b/Client/client.c index efd5905..5e412fc 100644 --- a/Client/client.c +++ b/Client/client.c @@ -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; diff --git a/Library/dataworks.c b/Library/dataworks.c index 0bb39c6..25de0bd 100644 --- a/Library/dataworks.c +++ b/Library/dataworks.c @@ -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 index 0000000..f15db42 --- /dev/null +++ b/Makefiles/Platforms/winnt.mk @@ -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 diff --git a/Makefiles/installer.mk b/Makefiles/installer.mk index 32faa0e..f6f3640 100644 --- a/Makefiles/installer.mk +++ b/Makefiles/installer.mk @@ -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 diff --git a/RemoteClient/tcpip.c b/RemoteClient/tcpip.c index e5caccf..18e1f92 100644 --- a/RemoteClient/tcpip.c +++ b/RemoteClient/tcpip.c @@ -34,9 +34,13 @@ #include #include -#ifdef __MINGW32__ -#include +#if defined(__MINGW32__) || defined(__WATCOMC__) +#define USE_WINSOCK +#endif + +#ifdef USE_WINSOCK #include +#include #include #include #include diff --git a/Server/tcpip.c b/Server/tcpip.c index 68b09b0..cc07c1d 100644 --- a/Server/tcpip.c +++ b/Server/tcpip.c @@ -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 -#include #include +#include #else #include #include