Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is this safe to symlink and distribute Qt libs in Windows?
Forum Updated to NodeBB v4.3 + New Features

Is this safe to symlink and distribute Qt libs in Windows?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soroush
    wrote on last edited by
    #1

    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.dll

    e:\workspace\t2\l1>mklink Qt5V8d.dll ....\t1\l1\Qt5V8d.dll
    symbolic link created for Qt5V8d.dll <<===>> ....\t1\l1\Qt5V8d.dll
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      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)
      1 Reply Last reply
      0
      • M Offline
        M Offline
        MuldeR
        wrote on last edited by
        #3

        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...

        My OpenSource software at: http://muldersoft.com/

        Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

        Go visit the coop: http://youtu.be/Jay...

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerManu
          wrote on last edited by
          #4

          How did the old Microsoft® Windows® installer solve it?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            soroush
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              soroush
              wrote on last edited by
              #6

              [quote author="DerManu" date="1357772621"]How did the old Microsoft® Windows® installer solve it?[/quote]

              Did the old Microsoft® Windows® installer solve it?

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved