I have been making an installer for an application bundle that includes Cygwin.
As this application is fairly complex, and symlinks are common in Linux installations, Cygwin uses them too, but they are broken with NSIS, and instead files are copied. The resulting bundle works, but is way bigger than is needed. I have tried running as administrator and with different compression options, but nothing seems to make any difference.
Has anyone else encountered an issue like this?
If you are saying that
File mystuff\cygwin\*does not preserve special NTFS attributes then yes, this is expected. NSIS does not query the file system for such things, it just opens the file for normal reading and stores the file content and path in the installer.Cygwin's symlinks use something called NTFS Reparse Points as symlinks (https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks, https://en.wikipedia.org/wiki/NTFS_reparse_point)
It seems that, much like Linux symlinks, applications that aren't aware of symlinks might just end up duplicating files rather than preserving the links. Unfortunately I can't really provide any insight beyond what those links show, apart from saying that NSIS seems to duplicate files. This isn't really my area of expertise.
I've found a Cygwin-specific workaround (using a different type of symlink), so this isn't a problem for me anymore, and I do recognise that this is definitely a corner case. That said, if I can help somehow I'll be happy to lend a hand,