diff options
author | Keith Packard <keithp@keithp.com> | 2014-06-18 02:15:04 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-18 14:18:38 -0700 |
commit | c93c4efefee0dbf6d193466efd6761d9a1849ae9 (patch) | |
tree | 1a7005588ab1b3966b2ea23e0ac065e75b6052b2 | |
parent | 3f4e765c05ddbae83ca0c0176572cd698f285d08 (diff) |
icon: Construct .exe files to hold windows icons for file associations
It appears that creating an executable with an icon resource is the
only way to display icons for files. Fortunately, that's not all that
hard.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | icon/.gitignore | 1 | ||||
-rw-r--r-- | icon/Makefile.am | 19 | ||||
-rw-r--r-- | icon/altus-metrum.rc | 1 | ||||
-rw-r--r-- | icon/micro-peak.rc | 1 | ||||
-rw-r--r-- | icon/telegps.rc | 1 | ||||
-rw-r--r-- | icon/windows-stub.c | 2 |
7 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 15d2c82d..2f8a5ee1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,7 @@ fat: cd libaltos && $(MAKE) all cd altoslib && $(MAKE) all cd altosuilib && $(MAKE) all + cd icon && $(MAKE) fat cd altosui && $(MAKE) fat cd micropeak && $(MAKE) fat cd telegps && $(MAKE) fat diff --git a/icon/.gitignore b/icon/.gitignore index e89555de..40cf2f3e 100644 --- a/icon/.gitignore +++ b/icon/.gitignore @@ -4,3 +4,4 @@ telegps-*.png *.ico *.icns *.build +*.exe diff --git a/icon/Makefile.am b/icon/Makefile.am index b1c00f4b..61a16914 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -34,7 +34,7 @@ res: all-local: $(ICO_FILES) $(ICNS_FILES) clean-local: - $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns + $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns *.o *.exe $(AM_FILES): altusmetrum.build @@ -71,3 +71,20 @@ TeleGPS.icns: $(MAC_TG_FILES) MicroPeak.icns: $(MAC_MP_FILES) png2icns $@ $(MAC_MP_FILES) + +MINGCC32=i686-w64-mingw32-gcc +MINGWINDRES=i686-w64-mingw32-windres + +SUFFIXES=.rc .exe + +fat: all micro-peak.exe altus-metrum.exe telegps.exe + +altus-metrum.o: altus-metrum.ico +micro-peak.o: micro-peak.ico +telegps.o: telegps.ico + +.rc.o: + $(MINGWINDRES) $*.rc $@ + +.o.exe: + $(MINGCC32) -o $@ windows-stub.c $*.o diff --git a/icon/altus-metrum.rc b/icon/altus-metrum.rc new file mode 100644 index 00000000..bbd03604 --- /dev/null +++ b/icon/altus-metrum.rc @@ -0,0 +1 @@ +101 ICON "altus-metrum.ico" diff --git a/icon/micro-peak.rc b/icon/micro-peak.rc new file mode 100644 index 00000000..4efe777d --- /dev/null +++ b/icon/micro-peak.rc @@ -0,0 +1 @@ +101 ICON "micro-peak.ico" diff --git a/icon/telegps.rc b/icon/telegps.rc new file mode 100644 index 00000000..7f5957f9 --- /dev/null +++ b/icon/telegps.rc @@ -0,0 +1 @@ +101 ICON "telegps.ico" diff --git a/icon/windows-stub.c b/icon/windows-stub.c new file mode 100644 index 00000000..8df3e0aa --- /dev/null +++ b/icon/windows-stub.c @@ -0,0 +1,2 @@ +__stdcall +WinMain(int a, int b, int c, int d) { return 0; } |