aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-27 11:57:40 +0100
committerRon Yorston <rmy@pobox.com>2018-03-27 12:19:30 +0100
commitb7555409f60b9506cc3edb9fa3224dc051c027c6 (patch)
tree15cc1fc80214f37069eccde7c096c2ba0c4bc1ca
parent9440270c25553cccf941d838cd9b58ca28729741 (diff)
downloadbusybox-w32-b7555409f60b9506cc3edb9fa3224dc051c027c6.tar.gz
busybox-w32-b7555409f60b9506cc3edb9fa3224dc051c027c6.tar.bz2
busybox-w32-b7555409f60b9506cc3edb9fa3224dc051c027c6.zip
Allow icon resources to be included in the binary
Include two styles of icon from the GNOME Adwaita theme. These are enabled by default and add 30 Kbytes to the size of the binary.
-rw-r--r--Config.in25
-rw-r--r--Makefile4
-rw-r--r--configs/mingw32_defconfig10
-rw-r--r--configs/mingw64_defconfig10
-rw-r--r--win32/icon/COPYING_CCBYSA37
-rw-r--r--win32/icon/Kbuild.src15
-rw-r--r--win32/icon/README9
-rw-r--r--win32/icon/aterm.icobin0 -> 15086 bytes
-rw-r--r--win32/icon/dummy.c0
-rw-r--r--win32/icon/icon.rc8
-rw-r--r--win32/icon/sterm.icobin0 -> 15086 bytes
11 files changed, 83 insertions, 5 deletions
diff --git a/Config.in b/Config.in
index a18d26720..4697f2a4d 100644
--- a/Config.in
+++ b/Config.in
@@ -401,6 +401,31 @@ config FEATURE_PRNG_ISAAC
401 401
402endchoice 402endchoice
403 403
404config FEATURE_ICON
405 bool "Include application icon in binary"
406 default y
407 depends on PLATFORM_MINGW32
408 help
409 Microsoft Windows applications can contain icons which are used in
410 various places in the user interface. Each icon adds 15 Kbytes to
411 the size of the binary.
412
413choice
414 prompt "Application icon"
415 default FEATURE_ICON_ALL
416 depends on FEATURE_ICON
417
418config FEATURE_ICON_ATERM
419 bool "Adwaita terminal"
420
421config FEATURE_ICON_STERM
422 bool "Adwaita terminal (symbolic)"
423
424config FEATURE_ICON_ALL
425 bool "All available icons"
426
427endchoice
428
404comment 'Build Options' 429comment 'Build Options'
405 430
406config STATIC 431config STATIC
diff --git a/Makefile b/Makefile
index 7e9ead1e3..44807cd9d 100644
--- a/Makefile
+++ b/Makefile
@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm
297STRIP = $(CROSS_COMPILE)strip 297STRIP = $(CROSS_COMPILE)strip
298OBJCOPY = $(CROSS_COMPILE)objcopy 298OBJCOPY = $(CROSS_COMPILE)objcopy
299OBJDUMP = $(CROSS_COMPILE)objdump 299OBJDUMP = $(CROSS_COMPILE)objdump
300WINDRES = $(CROSS_COMPILE)windres
300PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config 301PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
301AWK = awk 302AWK = awk
302GENKSYMS = scripts/genksyms/genksyms 303GENKSYMS = scripts/genksyms/genksyms
@@ -331,7 +332,7 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
331 332
332export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ 333export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
333 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ 334 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
334 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ 335 CPP AR NM STRIP OBJCOPY OBJDUMP WINDRES MAKE AWK GENKSYMS PERL UTS_MACHINE \
335 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 336 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
336 337
337export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 338export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
@@ -463,6 +464,7 @@ scripts_basic: include/autoconf.h
463# Objects we will link into busybox / subdirs we need to visit 464# Objects we will link into busybox / subdirs we need to visit
464core-y := \ 465core-y := \
465 applets/ \ 466 applets/ \
467 win32/icon/ \
466 468
467libs-y := \ 469libs-y := \
468 archival/ \ 470 archival/ \
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig
index 8128764a8..d2cc9bdb4 100644
--- a/configs/mingw32_defconfig
+++ b/configs/mingw32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Busybox version: 1.29.0.git 3# Busybox version: 1.29.0.git
4# Thu Mar 15 10:05:34 2018 4# Tue Mar 27 11:35:09 2018
5# 5#
6CONFIG_HAVE_DOT_CONFIG=y 6CONFIG_HAVE_DOT_CONFIG=y
7# CONFIG_PLATFORM_POSIX is not set 7# CONFIG_PLATFORM_POSIX is not set
@@ -19,7 +19,6 @@ CONFIG_SHOW_USAGE=y
19CONFIG_FEATURE_VERBOSE_USAGE=y 19CONFIG_FEATURE_VERBOSE_USAGE=y
20CONFIG_FEATURE_COMPRESS_USAGE=y 20CONFIG_FEATURE_COMPRESS_USAGE=y
21CONFIG_LFS=y 21CONFIG_LFS=y
22# CONFIG_GLOBBING is not set
23# CONFIG_PAM is not set 22# CONFIG_PAM is not set
24# CONFIG_FEATURE_DEVPTS is not set 23# CONFIG_FEATURE_DEVPTS is not set
25# CONFIG_FEATURE_UTMP is not set 24# CONFIG_FEATURE_UTMP is not set
@@ -38,6 +37,13 @@ CONFIG_BUSYBOX_EXEC_PATH=""
38# CONFIG_FEATURE_CLEAN_UP is not set 37# CONFIG_FEATURE_CLEAN_UP is not set
39# CONFIG_FEATURE_SYSLOG is not set 38# CONFIG_FEATURE_SYSLOG is not set
40# CONFIG_PLATFORM_LINUX is not set 39# CONFIG_PLATFORM_LINUX is not set
40# CONFIG_GLOBBING is not set
41CONFIG_FEATURE_PRNG_SHELL=y
42# CONFIG_FEATURE_PRNG_ISAAC is not set
43CONFIG_FEATURE_ICON=y
44# CONFIG_FEATURE_ICON_ATERM is not set
45# CONFIG_FEATURE_ICON_STERM is not set
46CONFIG_FEATURE_ICON_ALL=y
41 47
42# 48#
43# Build Options 49# Build Options
diff --git a/configs/mingw64_defconfig b/configs/mingw64_defconfig
index d96dc4540..4d990d0bb 100644
--- a/configs/mingw64_defconfig
+++ b/configs/mingw64_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Busybox version: 1.29.0.git 3# Busybox version: 1.29.0.git
4# Thu Mar 15 10:21:09 2018 4# Tue Mar 27 11:35:09 2018
5# 5#
6CONFIG_HAVE_DOT_CONFIG=y 6CONFIG_HAVE_DOT_CONFIG=y
7# CONFIG_PLATFORM_POSIX is not set 7# CONFIG_PLATFORM_POSIX is not set
@@ -19,7 +19,6 @@ CONFIG_SHOW_USAGE=y
19CONFIG_FEATURE_VERBOSE_USAGE=y 19CONFIG_FEATURE_VERBOSE_USAGE=y
20CONFIG_FEATURE_COMPRESS_USAGE=y 20CONFIG_FEATURE_COMPRESS_USAGE=y
21CONFIG_LFS=y 21CONFIG_LFS=y
22# CONFIG_GLOBBING is not set
23# CONFIG_PAM is not set 22# CONFIG_PAM is not set
24# CONFIG_FEATURE_DEVPTS is not set 23# CONFIG_FEATURE_DEVPTS is not set
25# CONFIG_FEATURE_UTMP is not set 24# CONFIG_FEATURE_UTMP is not set
@@ -38,6 +37,13 @@ CONFIG_BUSYBOX_EXEC_PATH=""
38# CONFIG_FEATURE_CLEAN_UP is not set 37# CONFIG_FEATURE_CLEAN_UP is not set
39# CONFIG_FEATURE_SYSLOG is not set 38# CONFIG_FEATURE_SYSLOG is not set
40# CONFIG_PLATFORM_LINUX is not set 39# CONFIG_PLATFORM_LINUX is not set
40# CONFIG_GLOBBING is not set
41CONFIG_FEATURE_PRNG_SHELL=y
42# CONFIG_FEATURE_PRNG_ISAAC is not set
43CONFIG_FEATURE_ICON=y
44# CONFIG_FEATURE_ICON_ATERM is not set
45# CONFIG_FEATURE_ICON_STERM is not set
46CONFIG_FEATURE_ICON_ALL=y
41 47
42# 48#
43# Build Options 49# Build Options
diff --git a/win32/icon/COPYING_CCBYSA3 b/win32/icon/COPYING_CCBYSA3
new file mode 100644
index 000000000..fc45d7818
--- /dev/null
+++ b/win32/icon/COPYING_CCBYSA3
@@ -0,0 +1,7 @@
1This work is licenced under the Creative Commons Attribution-Share Alike 3.0
2United States License. To view a copy of this licence, visit
3http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
4Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
5
6When attributing the artwork, using "GNOME Project" is enough.
7Please link to http://www.gnome.org where available.
diff --git a/win32/icon/Kbuild.src b/win32/icon/Kbuild.src
new file mode 100644
index 000000000..bde74091f
--- /dev/null
+++ b/win32/icon/Kbuild.src
@@ -0,0 +1,15 @@
1# Makefile for busybox
2#
3# Copyright (C) 2018 by R M Yorston <rmy@pobox.com>
4#
5# Licensed under GPLv2, see file LICENSE in this source tree.
6
7obj-y :=
8
9obj-$(CONFIG_FEATURE_ICON) += icon.o
10
11quiet_cmd_windres = WINDRES $@
12 cmd_windres = $(WINDRES) $< $@
13
14win32/icon/icon.o: win32/icon/icon.rc .config
15 $(call cmd,windres)
diff --git a/win32/icon/README b/win32/icon/README
new file mode 100644
index 000000000..33a245386
--- /dev/null
+++ b/win32/icon/README
@@ -0,0 +1,9 @@
1The icons are based on those for GNOME terminal in the Adwaita theme.
2
3They were generated by importing the 16x16, 32x32 and 48x48 PNG files
4into GIMP as separate layers then exporting as a single .ico file.
5
6The original files are dual-licensed under either the GNU LGPL v3 or
7Creative Commons Attribution-Share Alike 3.0 United States License.
8
9The .ico files are licensed under the latter.
diff --git a/win32/icon/aterm.ico b/win32/icon/aterm.ico
new file mode 100644
index 000000000..e680216a2
--- /dev/null
+++ b/win32/icon/aterm.ico
Binary files differ
diff --git a/win32/icon/dummy.c b/win32/icon/dummy.c
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/win32/icon/dummy.c
diff --git a/win32/icon/icon.rc b/win32/icon/icon.rc
new file mode 100644
index 000000000..d91c4a482
--- /dev/null
+++ b/win32/icon/icon.rc
@@ -0,0 +1,8 @@
1#include "../../include/autoconf.h"
2
3#if CONFIG_FEATURE_ICON_ATERM || CONFIG_FEATURE_ICON_ALL
41 ICON "aterm.ico"
5#endif
6#if CONFIG_FEATURE_ICON_STERM || CONFIG_FEATURE_ICON_ALL
72 ICON "sterm.ico"
8#endif
diff --git a/win32/icon/sterm.ico b/win32/icon/sterm.ico
new file mode 100644
index 000000000..b9125b34d
--- /dev/null
+++ b/win32/icon/sterm.ico
Binary files differ