diff --git a/Makefile b/Makefile index 6330b2a..da790f5 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 0000000..e545e2f Binary files /dev/null and b/icon.ico differ diff --git a/win32/manifest.xml b/win32/manifest.xml new file mode 100644 index 0000000..9c8871d --- /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 0000000..19e0a82 --- /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 cd2e635..ba36edc 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();