From d9684fd53b295411b967fb32cb257b980cb18f2e Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Sun, 18 Sep 2011 15:43:13 +0000 Subject: [PATCH] Added icon for ipxrouter. --- Makefile | 5 ++++- ipxrouter-16.png | Bin 0 -> 180 bytes ipxrouter-32.png | Bin 0 -> 263 bytes ipxrouter.ico | Bin 0 -> 5430 bytes src/ipxrouter.rc | 1 + src/router-exe.c | 8 +------- 6 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 ipxrouter-16.png create mode 100644 ipxrouter-32.png create mode 100644 ipxrouter.ico create mode 100644 src/ipxrouter.rc diff --git a/Makefile b/Makefile index 4581022..1fec891 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ ipxconfig.exe: src/ipxconfig.cpp dpwsockx.dll: src/directplay.o src/log.o src/dpwsockx_stubs.o src/common.o $(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o dpwsockx.dll src/directplay.o src/log.o src/common.o src/dpwsockx_stubs.o src/dpwsockx.def -lwsock32 -ipxrouter.exe: src/router-exe.o src/router.o src/interface.o src/common.o src/log.o +ipxrouter.exe: src/router-exe.o src/router.o src/interface.o src/common.o src/log.o src/ipxrouter-rc.o $(CC) $(CFLAGS) -static-libgcc -mwindows -o ipxrouter.exe $^ -lws2_32 -liphlpapi src/ipxwrapper_stubs.s: src/ipxwrapper_stubs.txt @@ -79,6 +79,9 @@ src/mswsock_stubs.s: src/mswsock_stubs.txt src/dpwsockx_stubs.s: src/dpwsockx_stubs.txt perl mkstubs.pl src/dpwsockx_stubs.txt src/dpwsockx_stubs.s 3 +src/ipxrouter-rc.o: src/ipxrouter.rc + windres src/ipxrouter.rc -O coff -o src/ipxrouter-rc.o + %.dll: src/stubdll.o src/%_stubs.o src/log.o src/common.o src/%.def $(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o $@ $^ diff --git a/ipxrouter-16.png b/ipxrouter-16.png new file mode 100644 index 0000000000000000000000000000000000000000..ce899a2fa7e26194a53a0bd32a29b437f26ada3a GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`)t)YnAr`%RCk1jHP~dUC{803| zb6NYFx+9_D-G?F^F1YuupK e)9==73^8x))Lp?G`X(Ld3ujP)Z3^jxUxF6L@9JnX$M0ZglKMRgv_xBbeTvtIt?o5a{JGDs`X%R3{JHh( zo*TS%*T?+Y<9rQ$SQwf-|H72) zMywCB8NUMMXVhilB%HUtKa8Jm`27C#+!h>90=>N%s`BXV`8xW{@iaW#ItymdISNmlY^;Ruosru=C#MYnmb@jb^;Hi3VZiSor z=3mMNxqjXrMrV0n;xxx{rDEnvj@+XUFnHkb66ZY(dG?Ycah(GXUgjl+9*n`j)iJop n%Xp?ezwvtfAj(@5EDI&YTMC7nI|?sP6rRtbKc#SeG{(OHeuL6J literal 0 HcmV?d00001 diff --git a/src/ipxrouter.rc b/src/ipxrouter.rc new file mode 100644 index 0000000..baa8f5f --- /dev/null +++ b/src/ipxrouter.rc @@ -0,0 +1 @@ +50 ICON "../ipxrouter.ico" diff --git a/src/router-exe.c b/src/router-exe.c index 897cada..019f697 100644 --- a/src/router-exe.c +++ b/src/router-exe.c @@ -25,8 +25,6 @@ struct reg_global global_conf; -static HMODULE netshell_dll = NULL; - #define APPWM_TRAY (WM_APP+1) #define MNU_EXIT 101 @@ -142,11 +140,7 @@ static void init_ui() { die("CreateWindow: ", w32_error(GetLastError())); } - if(!(netshell_dll = LoadLibrary("netshell.dll"))) { - die("Error loading netshell.dll: ", w32_error(GetLastError())); - } - - HICON icon = LoadIcon(netshell_dll, MAKEINTRESOURCE(162)); + HICON icon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(50), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); if(!icon) { die("Error loading icon: ", w32_error(GetLastError())); }