This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Symlinks in speedfolders
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2011
07:20 AM
Symlinks in speedfolders
I would like to use a speedfolder to install my project because my product has a reasonably complicated directory structure. Within the directory structure there are some symlinks which point to different areas - for instance within the 'lib' directory there are symlinks which point to actual libraries because they logically live as a separate module in a different directory (but still all under the main project directory)
I have tried using a speedfolder to install the product, but I find that symlinks are not preserved. Instead I end up with two copies of the same object, rather than one copy and a symlink. Is there a way to get speedfolders to recognise symlinks? The UNIX tar command can do this without problems, and I imagine that InstallAnywhere would be far more powerful than that.
Thanks in advance for any help that you can offer.
I have tried using a speedfolder to install the product, but I find that symlinks are not preserved. Instead I end up with two copies of the same object, rather than one copy and a symlink. Is there a way to get speedfolders to recognise symlinks? The UNIX tar command can do this without problems, and I imagine that InstallAnywhere would be far more powerful than that.
Thanks in advance for any help that you can offer.
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2011
08:31 AM
SpeedFolders are jar files, so I'm not sure if jar has support for storing symlinks (instead of files pointed by those links) or maybe if it has, then IA doesn't pass the correct parameters when creating the .jar files. What you may want is to use the Expand Archive action which supports .tar files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2011
09:12 AM
Thank you for the reply. Jar file do not support symlinks (on the basis that not all platforms support them), so that explains why it doesn't work. I'm interested in your comment about tar files. The documentation and the GUI both say that supported file types are:
• ZIP files (.zip)
• Java archives (.jar)
• WAR files (.war)
• Enterprise archives (.ear)
Which does not include tar files. I have found that tar files can be made to work, but I have been reluctant to use them because I have not found a support claim for them. Do you have any insight on this? Also, the way that I got a tar to work was to rename it as a zip file. Do you know of a way to add a tar file and still retain the .tar extension?
• ZIP files (.zip)
• Java archives (.jar)
• WAR files (.war)
• Enterprise archives (.ear)
Which does not include tar files. I have found that tar files can be made to work, but I have been reluctant to use them because I have not found a support claim for them. Do you have any insight on this? Also, the way that I got a tar to work was to rename it as a zip file. Do you know of a way to add a tar file and still retain the .tar extension?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2011
10:17 AM
Oh, I might have been wrong about .tar files then. But what could prevent you from using zip instead of tar? I personally use something like:
whereas y does exactly that, stores symlinks as such in the resulting .zip file.
zip -9vryT filename.zip parent_folder/
whereas y does exactly that, stores symlinks as such in the resulting .zip file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2011
10:28 AM
That's a good idea. This works quite well using command line zip on my Linux machine, however it doesn't work using the "Expand Archive" function of InstallAnywhere. Instead of symlinks, it creates files whose contents are the file name which the symlink should have pointed at.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 31, 2011
09:58 AM
For what it's worth, to work around this limitation, I turn symbolic links into .SYMLINK files which contain the link text. For instance:
I convert this way:
Then I have a bit of Java code which scans the install dir for .SYMLINK files, for each file it reads the contents and use "ln -s ..." to create the right symlink. Not very elegant but it works.
ls -l
lrwxrwxrwx ... foo -> bar
I convert this way:
ls -l
-rw-r--r-- ... foo.SYMLINK
cat foo.SYMLINK
bar
Then I have a bit of Java code which scans the install dir for .SYMLINK files, for each file it reads the contents and use "ln -s ..." to create the right symlink. Not very elegant but it works.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 31, 2011
10:36 AM
It's a clever way to work around the problem. I'm of the opinion that the problem shouldn't be there in the first place. "tar" has been doing symlinks for over 20 years and I would expect a product with the words "Anywhere" and "2010" in it's title to be able to cope too. Perhaps we may get better in 2011?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 01, 2011
01:17 AM
IMHO the problem is Java. Jave is missing a few features like symlinks, chmod, getpid() (although there's a trick to get the pid)... Sure, these features are not always available on all operating systems; but saying "if it's not available on all OS it's not in Java" is seriously limiting Java as a system tool (and byt the way I think all OS have getpid()). Java for applications: OK. Installers: could be better.
That being said, InstallAnywhere does an impressive job demonstrating that Java can be used to make installers anyway.
Now InstallAnywhere could indeed provide some "actions", or even just code sample, to deal with symlinks and other OS oddities. Well, that's what is forum is for, isn't it? 😉
That being said, InstallAnywhere does an impressive job demonstrating that Java can be used to make installers anyway.
Now InstallAnywhere could indeed provide some "actions", or even just code sample, to deal with symlinks and other OS oddities. Well, that's what is forum is for, isn't it? 😉