mirror of
https://github.com/skeeto/w64devkit.git
synced 2026-10-23 06:08:56 +03:00
Strip makensis
NSIS links makensis with -s only if a test program so linked runs, which a cross build cannot do, so makensis.exe shipped with its symbol table and DWARF from its libraries. Strip it after install, as with vimrun.exe. Nothing else NSIS installs carried symbols, and the stubs and plugins are unchanged. makensis.exe shrinks from 1,536,466 to 835,072 bytes in the x64 kit, and from 1,414,912 to 889,856 bytes in the x86 kit. Its loaded sections are unchanged, and it produces byte-identical installers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1074,6 +1074,8 @@ FROM cross AS build-nsis
|
||||
COPY --from=dl-nsis /dl/nsis /dl/nsis
|
||||
COPY src/nsis/ $PREFIX/src/nsis/
|
||||
WORKDIR /dl/nsis
|
||||
# NSIS links makensis with -s only if a test program so linked runs,
|
||||
# which cannot happen when cross-compiling, so strip it after install.
|
||||
RUN QUILT_PATCHES=$PREFIX/src/nsis quilt push -a \
|
||||
&& rm -rf .pc \
|
||||
&& scons -j$(nproc) \
|
||||
@@ -1088,7 +1090,8 @@ RUN QUILT_PATCHES=$PREFIX/src/nsis quilt push -a \
|
||||
SKIPUTILS="NSIS Menu,Makensisw,VPatch/Source/GenPat,MakeLangId,zip2exe" \
|
||||
ZLIB_W32=/deps \
|
||||
install-compiler install-stubs install-includes install-plugins \
|
||||
install-contrib install-utils
|
||||
install-contrib install-utils \
|
||||
&& $ARCH-strip /out$PREFIX/share/nsis/bin/makensis.exe
|
||||
|
||||
# Also provide x86 stubs and plugins in the multilib kit so makensis
|
||||
# can produce 32-bit installers ("Target x86-unicode"). NSIS never
|
||||
|
||||
Reference in New Issue
Block a user