From a783f14eff6efe67e37e4f9d4bdb62a364493923 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Fri, 18 Jul 2008 01:50:52 -0800 Subject: [PATCH] Add an icon file (ugly, but at least it's not the default anymore). And add the manifest that gets us visual styles on the controls under Win32. [git-p4: depot-paths = "//depot/solvespace/": change = 1844] --- Makefile | 11 +++++++++-- icon.ico | Bin 0 -> 29926 bytes win32/manifest.xml | 22 ++++++++++++++++++++++ win32/resource.rc | 6 ++++++ win32/w32main.cpp | 6 ++++-- 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 icon.ico create mode 100644 win32/manifest.xml create mode 100644 win32/resource.rc diff --git a/Makefile b/Makefile index 6330b2a8..da790f57 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,8 @@ SSOBJS = $(OBJDIR)\solvespace.obj \ $(OBJDIR)\generate.obj \ $(OBJDIR)\export.obj \ +RES = $(OBJDIR)\resource.res + LIBS = user32.lib gdi32.lib comctl32.lib advapi32.lib opengl32.lib glu32.lib \ extlib\libpng.lib extlib\zlib.lib @@ -47,8 +49,8 @@ all: $(OBJDIR)/solvespace.exe clean: rm -f obj/* -$(OBJDIR)/solvespace.exe: $(SSOBJS) $(W32OBJS) $(FREEZE) - @$(CC) $(DEFINES) $(CFLAGS) -Fe$(OBJDIR)/solvespace.exe $(SSOBJS) $(W32OBJS) $(FREEZE) $(LIBS) +$(OBJDIR)/solvespace.exe: $(SSOBJS) $(W32OBJS) $(FREEZE) $(RES) + @$(CC) $(DEFINES) $(CFLAGS) -Fe$(OBJDIR)/solvespace.exe $(SSOBJS) $(W32OBJS) $(FREEZE) $(RES) $(LIBS) editbin /nologo /STACK:8388608 $(OBJDIR)/solvespace.exe @echo solvespace.exe @@ -60,3 +62,8 @@ $(W32OBJS): win32/$(@B).cpp $(HEADERS) $(FREEZE): ..\common\win32\$(@B).cpp $(HEADERS) @$(CC) $(CFLAGS) $(DEFINES) -c -Fo$(OBJDIR)/$(@B).obj ..\common\win32\$(@B).cpp + +$(RES): win32/$(@B).rc icon.ico + rc win32/$(@B).rc + mv win32/$(@B).res $(OBJDIR)/$(@B).res + diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..e545e2f2c09f809364be7fccca516a14cadd0813 GIT binary patch literal 29926 zcmeI4zi%By5XUDFAp8hP8Waf$Jz0PvMM9CbCrEZpXKJcdI;e0*Qo5r)QKUnW{{ANojcc| zm*w88B0q@8U{IC+cuC}=*F0 zdOSU&9nvF`A1QuW9$h`tNMKx8{I@6qM=Uol~?D^H4I|(Ak zX(P?@**UT~H=cWWL35g>Z5?{KDXIvGSh+5vmz-W^0bFLso$&BEJJz1&Ia{`{r&{ei zA7_vMVtiVr&dX9$(B$af>F^yrH8zp%dw!}q|1-Tl#yH_zaeTj&Be@pn$?tdN-rH3zz{K>t| zvxgCUU&))^^Y<55@GX95OoyNV?19ArT>#4=d{6)n96(UY0zN2!2M(YtrH2m+z-C$; zpg}1ed{6)n9KZ6o24@0(js6j!*?36u<)qDBur# zPyi1cKmdQ>g93Qq0801+ALz#e2WSX?@D3Ef0|#gvf8c`xc;EmA@drLAfCmoX1S;@B z0a$7A2R&}bO6%i2Bdin^^Xsyk|0&1jRVuA<83iUm)=KG*}hU~geBLAfeNpjQOG4M%sC z7frryLNOiy;(ath?h0-%`WmmW^?m)XIT}@^6lYTz4)~In`?6fmKFiq2Teis z0fg=^Q`DY28V#E+MD?pId5erd~T?RFxz ziJx>oFsVNDW72*$*T+JCngW~MZ^cfP&hO0L^BC3bl0vspdRW=&16|nrrMyqc`;@#- z$x6CyoK{)&a6C7-^q+&@4*-I{yeW^c^%8^ zSYF4bS;v}d$E0$YcN=R*WX))<2{V_coA2%KXy)_xH-m7GlD~2Uas+Y&as+Y&x<;UW zFHk>6U!Q&H;x@ilSj2f(KT~okpR)hm#w``suKbG@fBEITGKN$?XXST|b4sphKjypg znsW0hr~K-{5AzK26-~r{TyJvoqdi=WimtW)%{*AQ{JCiUTYoIyt-L52&FCJ?lwaBZ z)m?udKYm>HL28VZKkJcdJC#4b%5P;Kq}n%r_CKDdsrXym>eR+VbE?koa=z^N$9&5E zPd^H=cq%XFPyD)S#%ub>SDMZCteoSYEMJ;5=g<1(Pjd{rl)L0en@q|^pZrO+ z(S_gUTbH_&jqLyW$YE(m|@=HH_HxAv84KkDVS`!ADgb-rqF{M@nLzU?Jq)Y?`$ z>1fDOJe!|tBeiGF?U!;9;u9Np`6mB7^k@D3kpBTuksNmb literal 0 HcmV?d00001 diff --git a/win32/manifest.xml b/win32/manifest.xml new file mode 100644 index 00000000..9c8871dd --- /dev/null +++ b/win32/manifest.xml @@ -0,0 +1,22 @@ + + + +Parametric 3d CAD tool. + + + + + + diff --git a/win32/resource.rc b/win32/resource.rc new file mode 100644 index 00000000..19e0a82e --- /dev/null +++ b/win32/resource.rc @@ -0,0 +1,6 @@ + +// we need a manifest if we want visual styles; put in numbers since somethings a bit screwy +// with my SDK install (I don't think I've got *.rh right) +1 24 "manifest.xml" + +4000 ICON "../icon.ico" diff --git a/win32/w32main.cpp b/win32/w32main.cpp index cd2e6357..ba36edc0 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -915,8 +915,10 @@ static void CreateMainWindows(void) wc.lpszClassName = "GraphicsWnd"; wc.lpszMenuName = NULL; wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = NULL; - wc.hIconSm = NULL; + wc.hIcon = (HICON)LoadImage(Instance, MAKEINTRESOURCE(4000), + IMAGE_ICON, 32, 32, 0); + wc.hIconSm = (HICON)LoadImage(Instance, MAKEINTRESOURCE(4000), + IMAGE_ICON, 16, 16, 0); if(!RegisterClassEx(&wc)) oops(); HMENU top = CreateGraphicsWindowMenus();