From 645989e6024721979e1d05034b46c811d0bfecc8 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 11 Aug 2019 17:46:12 +0200 Subject: [PATCH] Rename makefile.win32 to makefile.windows, among several other changes. (Would surprise me if this compiles without failure, tho) @skipci --- extras/build-tests/windows/build.bat | 6 +- .../build-tests/windows/compilecmd/vs2017.bat | 2 +- makefile.win32 => makefile.windows | 30 ++-- src/windows/Win32New.h | 129 ------------------ src/windows/{win32.c => windows.c} | 0 src/windows/{win32.h => windows.h} | 0 src/windows/{Win32GUI.rc => wingui.c} | 0 7 files changed, 19 insertions(+), 148 deletions(-) rename makefile.win32 => makefile.windows (98%) delete mode 100644 src/windows/Win32New.h rename src/windows/{win32.c => windows.c} (100%) rename src/windows/{win32.h => windows.h} (100%) rename src/windows/{Win32GUI.rc => wingui.c} (100%) diff --git a/extras/build-tests/windows/build.bat b/extras/build-tests/windows/build.bat index 82af7e963..59bffe4b1 100644 --- a/extras/build-tests/windows/build.bat +++ b/extras/build-tests/windows/build.bat @@ -32,7 +32,7 @@ call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat rem The above command will fail, due to missing symbol file rem However the symbol file can only be generated after the above command rem So... we create the symbolfile... -nmake -f makefile.win32 SYMBOLFILE +nmake -f makefile.windows SYMBOLFILE rem And we re-run the exact same command: call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat @@ -40,10 +40,10 @@ if %ERRORLEVEL% NEQ 0 EXIT /B 1 rem Convert c:\dev to c:\projects\unrealircd-deps rem TODO: should use environment variable in innosetup script? -sed -i "s/c:\\dev/c:\\projects\\unrealircd-deps/gi" src\win32\unrealinst.iss +sed -i "s/c:\\dev/c:\\projects\\unrealircd-deps/gi" src\windows\unrealinst.iss rem Build installer file -"c:\Program Files (x86)\Inno Setup 5\iscc.exe" /Q- src\win32\unrealinst.iss +"c:\Program Files (x86)\Inno Setup 5\iscc.exe" /Q- src\windows\unrealinst.iss if %ERRORLEVEL% NEQ 0 EXIT /B 1 rem Show some proof diff --git a/extras/build-tests/windows/compilecmd/vs2017.bat b/extras/build-tests/windows/compilecmd/vs2017.bat index ada4dcf72..e7eca65ac 100644 --- a/extras/build-tests/windows/compilecmd/vs2017.bat +++ b/extras/build-tests/windows/compilecmd/vs2017.bat @@ -1,6 +1,6 @@ rem Build command for Visual Studio 2017 -nmake -f makefile.win32 ^ +nmake -f makefile.windows ^ LIBRESSL_INC_DIR="c:\projects\unrealircd-deps\libressl\include" ^ LIBRESSL_LIB_DIR="c:\projects\unrealircd-deps\libressl\lib" ^ SSLLIB="crypto-44.lib ssl-46.lib" ^ diff --git a/makefile.win32 b/makefile.windows similarity index 98% rename from makefile.win32 rename to makefile.windows index 36fce85a5..5b7126385 100644 --- a/makefile.win32 +++ b/makefile.windows @@ -10,7 +10,7 @@ MT=mt # You are encouraged NOT to set these values here, but instead make a batch file # which passes all these arguments to nmake, like: -# nmake -f makefile.win32 LIBRESSL_INC_DIR="c:\dev\libressl" etc etc... +# nmake -f makefile.windows LIBRESSL_INC_DIR="c:\dev\libressl" etc etc... # Both ways will work, but if you use a batch file it's easier with # upgrading UnrealIRCd as you won't have to edit this makefile again. @@ -289,9 +289,9 @@ ALL: CONF UNREALSVC.EXE UnrealIRCd.exe MODULES CLEAN: -@erase src\*.obj >NUL - -@erase src\win32.res >NUL + -@erase src\windows.res >NUL -@erase src\version.c >NUL - -@erase src\win32\*.obj >NUL + -@erase src\windows\*.obj >NUL -@erase src\modules\*.obj >NUL -@erase src\modules\*.dll >NUL -@erase src\modules\chanmodes\*.dll >NUL @@ -309,16 +309,16 @@ CLEAN: $(LINK) $(DBGLFLAGST) advapi32.lib src/unrealsvc.obj src/windows/unrealsvc.res CONF: - -@copy include\win32\setup.h include\setup.h >NUL + -@copy include\windows\setup.h include\setup.h >NUL $(CC) src/windows/config.c -@config.exe -./UnrealIRCd.exe: $(OBJ_FILES) src/windows/WIN32.RES - $(LINK) $(LFLAGS) $(OBJ_FILES) SRC/windows/WIN32.RES /MAP - -@erase src\win32\win32.res - $(MT) -manifest src\win32\UnrealIRCd.exe.manifest -outputresource:UnrealIRCd.exe;1 +./UnrealIRCd.exe: $(OBJ_FILES) src/windows/windows.res + $(LINK) $(LFLAGS) $(OBJ_FILES) src/windows/windows.res /MAP + -@erase src\windows\windows.res + $(MT) -manifest src\windows\UnrealIRCd.exe.manifest -outputresource:UnrealIRCd.exe;1 !IFNDEF DEBUGEXTRA @echo Standard version built !ELSE @@ -432,10 +432,10 @@ src/crule.obj: src/crule.c $(INCLUDES) src/gui.obj: src/windows/gui.c $(INCLUDES) ./include/resource.h $(CC) $(CFLAGS) src/windows/gui.c -src/rtf.obj: src/windows/rtf.c $(INCLUDES) ./src/windows/win32.h +src/rtf.obj: src/windows/rtf.c $(INCLUDES) ./src/windows/windows.h $(CC) $(CFLAGS) src/windows/rtf.c -src/editor.obj: src/windows/editor.c $(INCLUDES) ./include/resource.h ./src/windows/win32.h +src/editor.obj: src/windows/editor.c $(INCLUDES) ./include/resource.h ./src/windows/windows.h $(CC) $(CFLAGS) src/windows/editor.c src/service.obj: src/windows/service.c $(INCLUDES) @@ -444,8 +444,8 @@ src/service.obj: src/windows/service.c $(INCLUDES) src/windebug.obj: src/windows/windebug.c $(INCLUDES) $(CC) $(CFLAGS) src/windows/windebug.c -src/windows.obj: src/windows/win32.c $(INCLUDES) - $(CC) $(CFLAGS) src/windows/win32.c +src/windows.obj: src/windows/windows.c $(INCLUDES) + $(CC) $(CFLAGS) src/windows/windows.c src/unrealsvc.obj: src/windows/unrealsvc.c $(INCLUDES) $(CC) $(CFLAGSST) src/windows/unrealsvc.c @@ -516,9 +516,9 @@ src/operclass.obj: src/operclass.c $(INCLUDES) ./include/dbuf.h src/updconf.obj: src/updconf.c $(INCLUDES) ./include/dbuf.h $(CC) $(CFLAGS) src/updconf.c -src/windows/win32.res: src/windows/win32gui.rc - $(RC) /l 0x409 /fosrc/windows/win32.res /i ./include /i ./src \ - /d NDEBUG src/windows/win32gui.rc +src/windows/windows.res: src/windows/wingui.rc + $(RC) /l 0x409 /fosrc/windows/windows.res /i ./include /i ./src \ + /d NDEBUG src/windows/wingui.rc src/windows/unrealsvc.res: src/windows/unrealsvc.rc $(RC) /l 0x409 /fosrc/windows/unrealsvc.res /i ./include /i ./src \ diff --git a/src/windows/Win32New.h b/src/windows/Win32New.h deleted file mode 100644 index d15034468..000000000 --- a/src/windows/Win32New.h +++ /dev/null @@ -1,129 +0,0 @@ -typedef struct { - unsigned int CurrLoclUsers; - unsigned int CurrGlobUsers; - unsigned int MaxLoclUsers; - unsigned int MaxGlobUsers; - unsigned int NumUsers; // Eh ?? - unsigned int Invisible; - unsigned int connections; - unsigned int NumIRCops; - unsigned int LocalClients; // Eh?? - unsigned int LocalServers; - unsigned int chans; - unsigned int Servers; - - /* ToBe Added - int TSsync stuff .... dont know what yet - */ -} WINSTATS, *pWINSTATS; - -typedef struct RichLine -{ - BYTE *Data; - WORD Len; - struct RichLine *Prev, *Next; -} aRichLine; - -typedef struct AllRichLines - { - aRichLine *First, *Current; - int NumLines; - } INFRICHLINE; - - - -/********************************************************** -********** Graphy Header (C) David Flynn 2000 ************/ - -#define SS_NORM 0x0001 // spincube window styles -#define SS_SLOW 0x0002 -#define SS_FAST 0x0003 - -#define CCHSTYLE 20 // size of style string, i.e. "SS_ERASE" - -#define NUM_GRAPH_STYLES 2 - - -#define GRAPH_EXTRA 4 // number of extra bytes for spincube class - - -#define IDS_REGCLASSFAIL 16 -#define IDS_UNREGFAIL 17 -#define IDS_DLGBOXFAIL 18 -#define IDS_ALLOCFAIL 19 -#define IDS_CREATEDCFAIL 20 -#define IDS_CREATEBITMAPFAIL 21 -#define GWL_GRAPHDATA 0 -// offset of control's instance data - -#define GRAPHCLASS "Graph" -#define GRAPHDESCRIPTION "An animated control" -#define GRAPHDEFAULTTEXT ":-)" -#define GRAPH_EVENT 1 -#define UPDATE_TIMER 2 -#define UPDATE_INTERVAL /*60000*/ 30 - -typedef struct -{ - HDC hdcCompat; // the DC that will contain our off-screen - // image - //HBITMAP hbmSave; // Save previous selected bitmap - //HBITMAP hbmCompat; // The bitmap that will contain the actual - // image, i.e. we will always do our - // drawing on this bmp & then blt the - // result to the screen. - BOOL InitDraw; //Did we draw once yet? - int width; // Width of monitor (= size of history) - int cpupointer; // pointer to cpu history - - HDC DCBack; - HBITMAP BMBack; - HBITMAP OldBack; - HDC DCDblBuff; - HBITMAP BMDblBuff; - HBITMAP OldDblBuff; - - HBITMAP Background; - HBITMAP CPUMap; - SIZE WindowSize; - BOOL Border; - BOOL Grid; - - COLORREF BorderColor; - COLORREF BackColor; - COLORREF GridColor; - COLORREF CPUColor; - COLORREF AVGCPUColor; - COLORREF MEMColor; - char cpuhistory[2048]; - char BackgroundPath[256]; -char CPUMapPath[256]; - int iOptions; // Contains the current options for this - // ctrl, i.e. erase background. - -} GRAPHINFO, *PGRAPHINFO; - - - -/******************************************************************************\ -* FUNCTION PROTOTYPES -\******************************************************************************/ - -LRESULT CALLBACK GraphWndProc (HWND, UINT, WPARAM, LPARAM); - - - - - - - -DWORD Reserved,dataType,dataLen=8192; - - - -// DoubleBuffer Stuff -void DrawMonitor(HDC hdc, RECT r,HWND); - - -void CreateDblBuff(HWND); -void FreeDblBuff(void); diff --git a/src/windows/win32.c b/src/windows/windows.c similarity index 100% rename from src/windows/win32.c rename to src/windows/windows.c diff --git a/src/windows/win32.h b/src/windows/windows.h similarity index 100% rename from src/windows/win32.h rename to src/windows/windows.h diff --git a/src/windows/Win32GUI.rc b/src/windows/wingui.c similarity index 100% rename from src/windows/Win32GUI.rc rename to src/windows/wingui.c