Trying to build any installer that includes an uninstaller with makensis on a big-endian system fails with an error "invalid icon size (possibly compressed icon)".
My setup was like this, but it's easy to reproduce on similar configurations:
- PowerPC running Mac OS X 10.5
- nsis 2.40
- Examples/example2 as test case
The following (and attached) patch fixed the issue for me:
--- icon.cpp.orig 2008-10-14 18:51:52.000000000 +0200
+++ icon.cpp 2008-10-14 18:51:57.000000000 +0200
@@ -397,7 +397,7 @@
size = *(LPDWORD)seeker;
seeker += sizeof(DWORD);
- if (real_size < size)
+ if (real_size < FIX_ENDIAN_INT32(size))
{
throw runtime_error("invalid icon size (possibly compressed icon)");
}