Closed hanetzer closed 7 years ago
Hmm. I actually want to solve this differently, by having the previous icon loading code only run on Linux (we also want to avoid it on OSX because it clashes with the bundle-provided high resolution icons).
I'll push a commit soon, then you can base your changes ontop of that.
Also in the future, consider squashing fixup commits (and force-pushing to your branch if required); no need to have these in the official history.
To be honest I have no idea about the squashing and such, really need to brush up on my git-fu. Reason I have a separate header is the potential of adding manifests and version information and whatnot, its just a starting point.
On another note, I've set up the ugliest Makefile
ever, but it works and is much faster than the ad-hoc build script. But, this is mostly a stop-gap, as I'd like to get a windows build to work with cmake alone if possible.
Pushed 6349146e0198c995cadb923a7991576064df7e90
On another note, I've set up the ugliest Makefile ever, but it works and is much faster than the ad-hoc build script. But, this is mostly a stop-gap, as I'd like to get a windows build to work with cmake alone if possible.
Yeah, my script recompiles everything everytime :) I used ccache
internally to work around that, but a Makefile is of course the saner approach.
For x86_64-w64-mingw32-g++
#define _WIN32 1
#define _WIN64 1
#define __WINT_MAX__ 0xffff
#define __WINT_MIN__ 0
#define __WIN32 1
#define __WIN64 1
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define __SIZEOF_WINT_T__ 2
#define WIN32 1
#define WIN64 1
#define __WINT_TYPE__ short unsigned int
#define WINNT 1
#define __WIN64__ 1
and i686-w64-mingw32-g++
#define _WIN32 1
#define __WINT_MAX__ 0xffff
#define __WINT_MIN__ 0
#define __WIN32 1
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define __SIZEOF_WINT_T__ 2
#define WIN32 1
#define __WINT_TYPE__ short unsigned int
#define WINNT 1
the diff:
--- i686.h 2017-03-04 10:14:53.610710212 +0000
+++ x86_64.h 2017-03-04 10:14:42.307376535 +0000
@@ -1,11 +1,15 @@
#define _WIN32 1
+#define _WIN64 1
#define __WINT_MAX__ 0xffff
#define __WINT_MIN__ 0
#define __WIN32 1
+#define __WIN64 1
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define __SIZEOF_WINT_T__ 2
#define WIN32 1
+#define WIN64 1
#define __WINT_TYPE__ short unsigned int
#define WINNT 1
+#define __WIN64__ 1
https://hg.libsdl.org/SDL/rev/cb37776926ad implies that __WINDOWS__
works on both.
There we go. Well, is __WINDOWS__
supplied by SDL or by the compiler? Suppose that works, since SDL.h
is included on the very file in question.
@carstene1ns
Suppose your right. To be frank I don't care about what MSVC supports at all, but I agree #elif is nicer looking and shorter.
@Ancurio well?
Sorry, didn't see that the commit changed. LGTM.
What image is inside the .ico? Is it the same as icon.png
?
@Ancurio yeah, same as ico.png
Not yet integrated into the cmake build, will look into doing that soonish. As of right now this works with your ad-hoc build script you mentioned in #35 with a small bit of tweaking.