Symbolic Link - problem at uninstall

Comments

2 comments

  • Avatar
    DevHopeful_2012

    I have yet to play with symlinks, so I am guessing here.

    Sounds as though you should check for the existence of another version of your software and the symlink's existence, during the preUninstallationActionList. If both exist, createSymLink in the postUninstallationActionList.

    I can't say that I have done or tested this. My reasoning is that it sounds like the symlink is registered to the component that creates it. The second installation of that component (i.e. component X.2) just skipped it because it already existed. So, uninstalling the first installation, X.1, uninstalls the symlink. Uninstalling X.2 would probably leave this behind. Does that fit with what you are seeing?

    You would also need to add removal of the symlink to the preUninstallationActionList if there are no other versions found to ensure that it is removed.

  • Avatar
    juanjo

    As mentioned by DevHopeful_2012, the link is being automatically registered in the uninstaller. To solve it, you could remove it from the uninstaller after creating it:

    <actionGroup>
       <actionList>
          <createsymlink> 
    `        `<linkname>/usr/local/lib/libmchpusb-1.0.dylib</linkname>
              <target>${installdir}/my_app/Contents/Resources/some_ide/mplablibs/modules/lib/libusb-1.0.0.dylib</target>
          </createsymlink>
          <removeFilesFromUninstaller>
             <files>/usr/local/lib/libmchpusb-1.0.dylib</files>
          </removeFilesFromUninstaller>
       </actionList>
       <rulelist> 
          <platformtest> 
    `        `<type>osx</type> 
          </platformtest> 
    `  `</rulelist>
    </actionGroup>
    

Please sign in to leave a comment.