]> Git repositories of Nishi - tewi.git/commitdiff
fix vc6
authorNishi <nishi@nishi.boats>
Thu, 3 Oct 2024 20:59:55 +0000 (20:59 +0000)
committerNishi <nishi@nishi.boats>
Thu, 3 Oct 2024 20:59:55 +0000 (20:59 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@249 8739d7e6-ffea-ec47-b151-bdff447c6205

Platform/vc6.mk
Server/Makefile
Server/gui.c
Server/gui.rc
Server/main.c
Server/tw_version.h
Tool/option.c
bcc.sh
vc6.sh

index d080ed43897f2f7e318716d5cf8133b3da4624b6..e6cb67523c063b69545561915557f6dedf7c18a7 100644 (file)
@@ -13,4 +13,4 @@ EXEC =
 STATIC = lib
 LIBSUF = .dll
 OBJ = obj
-PREOBJS = tewi_vc6.res gui_vc6.res
+PREOBJS = vc6.res
index 3f250f0bb4938b384e5fe91eb2a00e97cc44627a..7ed240957ca36072c9555bb8f2a71e9f263c2d68 100644 (file)
@@ -48,20 +48,19 @@ tewi.pkg: tewi.self
 tewi.res: tewi.rc ../Binary/tewi.ico
        $(WINDRES) tewi.rc -O coff -o $@
 
-tewi_vc6.res: tewi.rc ../Binary/tewi.ico
-       rc /fo$@ tewi.rc
-
 tewi_bcc.res: tewi.rc ../Binary/tewi.ico
        brc32 -r -fo$@ tewi.rc
 
 gui.res: gui.rc gui.h
        $(WINDRES) gui.rc -O coff -o $@
 
-gui_vc6.res: gui.rc gui.h
-       rc /fo$@ gui.rc
-
 gui_bcc.res: gui.rc gui.h
        brc32 -r -fo$@ gui.rc
 
+vc6.res: tewi.rc gui.rc
+       cat tewi.rc gui.rc > concat.rc
+       rc /fo$@ concat.rc
+       rm -f concat.rc
+
 clean:
-       rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj
+       rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj concat.rc
index 2f7a8e61f2a9cf4ae3c1529820fce944731bfc93..84f81a5abcb3d874a2860320edce3d033a998421 100644 (file)
@@ -59,6 +59,10 @@ LRESULT CALLBACK VersionDialog(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp){
                hdc = BeginPaint(hWnd, &ps);
                ShowBitmapSize(hWnd, hdc, "TEWILOGO", size.left, size.top, WINWIDTH(size), WINWIDTH(size));
                EndPaint(hWnd, &ps);
+       }else if(msg == WM_CTLCOLORDLG || msg == WM_CTLCOLORSTATIC){
+               HDC dc = (HDC)wp;
+               SetBkMode(dc, TRANSPARENT);
+               return GetSysColorBrush(COLOR_MENU);
        }else{
                return FALSE;
        }
@@ -79,7 +83,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp){
                int ev = HIWORD(wp);
                if(trig == GUI_BUTTON_ABOUT){
                        if(ev == BN_CLICKED){
-                               DialogBox(hInst, "VERSIONDLG", hWnd, VersionDialog);
+                               DialogBox(hInst, "VERSIONDLG", hWnd, (DLGPROC)VersionDialog);
                        }
                }else if(trig == GUI_BUTTON_START){
                        if(ev == BN_CLICKED){
index 11383d138ea043b8e4f5e3b12a329f74672518ef..41bfc5b9de96168b00b1eb8d17ecbd7a88dbf5b1 100644 (file)
@@ -4,15 +4,14 @@
 #include "gui.h"
 #include "tw_version.h"
 
-PBTEWI BITMAP "../Binary/pbtewi.bmp"
+PBTEWI BITMAP "..\\Binary\\pbtewi.bmp"
 TEWILOGO BITMAP "../Binary/tewi.bmp"
 
 VERSIONDLG DIALOG 0, 0, 200, 50
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Version Information"
 {
-       LTEXT "Tewi HTTPd version " TW_VERSION, GUI_TEWI_NAME, 42, 5, 192, 50
+       LTEXT TW_VERSION_TEXT, GUI_TEWI_NAME, 42, 5, 192, 50
        LTEXT "Original by Nishi <nishi@nishi.boats>", GUI_TEWI_ORIGINAL, 42, 5 + 8, 192, 50
-       LTEXT "Compilation date: " __DATE__ " " __TIME__, GUI_TEWI_DATE, 42, 5 + 8 + 8, 192, 50
        DEFPUSHBUTTON "&OK", IDOK, 75, 35, 50, 10
 }
index fcbd0dad091b47fd865adb2493e429007d4fe0ae..9d2965d4f7880aee139193631d290058d0ceeb47 100644 (file)
@@ -7,6 +7,7 @@
 #ifdef __BORLANDC__
 
 #pragma resource "tewi_bcc.res"
+
 #pragma resource "gui_bcc.res"
 
 #endif
index 99b548a8d42c91a295364a9227fb58b9aa7259d6..cff9e077d0a70ccaa2fd28635ca0ffc24f62a344 100644 (file)
@@ -8,6 +8,7 @@ extern "C" {
 #endif
 
 #define TW_VERSION "2.03D\0"
+#define TW_VERSION_TEXT "Tewi HTTPd version 2.03D"
 
 const char* tw_get_version(void);
 const char* tw_get_platform(void);
index 1dc06503e4a6f1badc8f015938f88c8a721c5062..360be8190eef895198cb86b90401c39af7a3a1b1 100644 (file)
@@ -53,6 +53,7 @@ int main(int argc, char** argv) {
 #endif
 #ifdef BUILD_GUI
                        printf(" -lcomctl32");
+                       printf(" -luser32");
 #endif
                }else if(strcmp(argv[3], "WINDOWS_WATCOM") == 0){
 #ifdef USE_WINSOCK1
@@ -62,6 +63,7 @@ int main(int argc, char** argv) {
 #endif
 #ifdef BUILD_GUI
                        printf(" comctl32.lib");
+                       printf(" user32.lib");
 #endif
                }
        }
diff --git a/bcc.sh b/bcc.sh
index 7a92a46925739f12b7ad673424316580921cc2d0..a81f8a44cac7a6b3209b53d7c555651245a09877 100755 (executable)
--- a/bcc.sh
+++ b/bcc.sh
@@ -28,10 +28,12 @@ for i in "$@"; do
        elif [ "$i" = "-shared" ]; then
                options="$options -tWD"
                shared=1
+       elif [ "$i" = "-mwindows" ]; then
+               options="$options -tW"
        elif [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
                options="$options -`echo "$i" | sed "s/^-//g"`"
        elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
-               if [ ! "$i" = "-lwsock32" ]; then
+               if [ ! "$i" = "-lwsock32" -a ! "$i" = "-luser32" -a ! "$i" = "-lcomctl32" ]; then
                        libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
                fi
        elif [ "$dowhat" = "output" ]; then
diff --git a/vc6.sh b/vc6.sh
index abd3c023b48e2300b30862afe8d4a8ae2949856a..f7cb0536c30a13ab4d8953e9664981228c2ba220 100755 (executable)
--- a/vc6.sh
+++ b/vc6.sh
@@ -6,6 +6,7 @@ outfile="a.out"
 dowhat=""
 options="/I../VC6Compat"
 obj=0
+win=0
 source=""
 libraries=""
 link=""
@@ -26,9 +27,14 @@ for i in "$@"; do
                :
        elif [ "$i" = "-shared" ]; then
                options="$options /LD"
+       elif [ "$i" = "-mwindows" ]; then
+               win=1
        elif [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
                options="$options /`echo "$i" | sed "s/^-//g"`"
        elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
+               if [ "$i" = "-luser32" ]; then
+                       libraries="$libraries gdi32.lib"
+               fi
                libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
        elif [ "$dowhat" = "output" ]; then
                dowhat=""
@@ -48,6 +54,11 @@ fi
 if [ ! "$libraries" = "" ]; then
        link="/link /nodefaultlib:libc $libraries"
 fi
+if [ "$obj" = "0" ]; then
+       if [ "$win" = "1" ]; then
+               link="$link /SUBSYSTEM:windows"
+       fi
+fi
 construct="cl /nologo $options $source $link"
 echo "Run: $construct"
 $construct