Is this safe to symlink and distribute Qt libs in Windows?
-
I'm going to make my own Qt SDK for the new version of Qt. I've compiled Qt Creator and Qt Libraries + Documentation. Now I'm making the installer. The problem is that it's just too big (3.09 GB) which has unwanted redundancy amount of about 1.34 GB "discussed here":http://qt-project.org/forums/viewthread/23426/ . Following "Wilk's suggestion":http://qt-project.org/forums/viewreply/108943/ , I'm planning to remove redundancy with symlinks of Windows (mklink).
Is it possible to reduce size with symlinks in Windows? Well, I do a test myself. It seems to work. I can see different between sizes after compressing with 7zip. With mklink, size of archive is 16.4 MB (17,279,798 bytes) and without , is 32.0 MB (33,640,491 bytes). Though paths are relative (and AFAIK should be). Is that supposed to work on a machine other than my PC (the one that links are created)
Test case is this:
@
e:\workspace\t2\l1>mklink Qt5V8.dll ....\t1\l1\Qt5V8.dll
symbolic link created for Qt5V8.dll <<===>> ....\t1\l1\Qt5V8.dlle:\workspace\t2\l1>mklink Qt5V8d.dll ....\t1\l1\Qt5V8d.dll
symbolic link created for Qt5V8d.dll <<===>> ....\t1\l1\Qt5V8d.dll
@ -
New observations:
- Extracting the 7z archive soft links with relative paths in the same directory that original files are compressed and its subdirectories, works. Symlinks are there. They have a non-zero size.
- Extracting it anyway, all links have a 0 size. (Seems broken)
-
Symbolic Links are supported since Windows Vista, but not on the still pretty popular (at least for one more year) Windows XP. Also note that Symbolic Links probably can be created on local NTFS partitions only. You should at least implement a fallback (e.g. deepcopy the file), if the Symlink failed to create...
-
How did the old Microsoft® Windows® installer solve it?
-
I'm going to write my own script to make symlinks at installation time. Since I have no experience with Pascal, I'm gonna write a batch file to get it to work. If symlinking failed, there will be no chance other than copying everything.
-
[quote author="DerManu" date="1357772621"]How did the old Microsoft® Windows® installer solve it?[/quote]
Did the old Microsoft® Windows® installer solve it?