pe: --compress-icons=3 option added to compress all icons

This commit is contained in:
László Molnár
2006-11-22 15:28:35 +01:00
parent 16b9873fa8
commit d6b33ffd6b
4 changed files with 5 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@ User visible changes for UPX
Changes in 2.91 beta (XX XXX 2006): Changes in 2.91 beta (XX XXX 2006):
* assorted bug fixes * assorted bug fixes
* arm/pe: fix "missing" icon & version info resource problem for wince 5 * arm/pe: fix "missing" icon & version info resource problem for wince 5
* pe: --compress-icons=3 option added to compress all icons
Changes in 2.90 beta (08 Oct 2006): Changes in 2.90 beta (08 Oct 2006):
* LZMA algorithm support for most of the 32-bit and 64-bit file formats; * LZMA algorithm support for most of the 32-bit and 64-bit file formats;
+1
View File
@@ -875,6 +875,7 @@ Extra options available for this executable format:
--compress-icons=1 Compress all but the first icon. --compress-icons=1 Compress all but the first icon.
--compress-icons=2 Compress all icons which are not in the --compress-icons=2 Compress all icons which are not in the
first icon directory. [DEFAULT] first icon directory. [DEFAULT]
--compress-icons=3 Compress all icons.
--compress-resources=0 Don't compress any resources at all. --compress-resources=0 Don't compress any resources at all.
+1 -1
View File
@@ -765,7 +765,7 @@ static int do_option(int optc, const char *arg)
case 631: case 631:
opt->win32_pe.compress_icons = 1; opt->win32_pe.compress_icons = 1;
if (mfx_optarg && mfx_optarg[0]) if (mfx_optarg && mfx_optarg[0])
getoptvar(&opt->win32_pe.compress_icons, 0, 2, arg); getoptvar(&opt->win32_pe.compress_icons, 0, 3, arg);
//printf("compress_icons: %d\n", opt->win32_pe.compress_icons); //printf("compress_icons: %d\n", opt->win32_pe.compress_icons);
break; break;
case 632: case 632:
+2 -1
View File
@@ -1399,7 +1399,8 @@ void PeFile::processResources(Resource *res)
if (res->itype() == RT_GROUP_ICON && iconsin1stdir == 0) if (res->itype() == RT_GROUP_ICON && iconsin1stdir == 0)
iconsin1stdir = get_le16(ibuf + res->offs() + 4); iconsin1stdir = get_le16(ibuf + res->offs() + 4);
bool compress_icon = false, compress_idir = false; bool compress_icon = opt->win32_pe.compress_icons == 3;
bool compress_idir = false;
unsigned iconcnt = 0; unsigned iconcnt = 0;
// some statistics // some statistics