View Full Version : release dependent support files
08-27-2009, 02:52 AM
Is it possible to make a support file release dependent? I'm working with several releases and want to include certain support files into certain releases only.
I want to create a full release that restores a database. The client release doesn't need this restore functionality, so it doesn't need the database as a support file.
For components and redistributable this works perfect by using release flags, but I don't see any possibility to do this for support files.
08-27-2009, 03:23 AM
Gosh! I just realized that this is exactly what I need.
I added some support files as "Advanced Files" yesterday, and I realized that they needed to be different for each release I have in my Basic MSI project.
I don't see any Release Flag associated with these support files.
08-27-2009, 07:55 AM
I don't think there is any support for adding release flags to support files. However, the automation interface lets you add and delete support files to your project. Perhaps you could somehow automate adding and deleting the required files before your builds. For more information, see AddSetupFile, DeleteSetupFile, ISWiSetupFile in the help.
08-27-2009, 09:01 AM
Thank you for your reply Debbie.
Isn't there a workaround to achieve the same instead of using the automation interface? For now, I've added the backup file as a component to my Basic MSI project, using release flags to make it release dependent.
However, the file still exists on my system after the installation. I tried to set the Destination to SUPPORTDIR, but that was to optimistic :) Is there any possibility to remove the file after the installation?
08-27-2009, 09:37 AM
Perhaps you could try removing the backup file through a custom action. Note that the backup file should not be the key file of its component. (If it were the key file, repair would probably start at some point, and Windows Installer would try to replace that file.)
btw, 1-L1NXG is the tracking code for this feature request (ability to add release flags to support files).
08-27-2009, 10:34 AM
Can you give me some feedback on this custom action? Suppose I'm using an InstallScript for my custom action, what command should I use to delete the file. And which sequence should I select to remove the file at the end of the setup?
08-27-2009, 01:27 PM
Well, the more I think about your scenario, the more I think that using the component for your backup file could be problematic in the future. It could cause problems for maintenance, and it might make it tough to create upgrades. If you were using the automation interface, you could add and delete the file as a support file to the appropriate releases before building. That's the only safe way I can think of to resolve the issue.
09-15-2009, 12:33 PM
I don't understand what this "automation interface" is thatyou all are referring to, but...
I have an InstallScript project. Am I understanding that there is no way to have one set of Support Files for 1 release and a second set of Support Files for another? (for example: a 32 bit release that has all of the 32bit components of files in it and a 64 bit release that has all of the 64 bit components, and both contain the components that don't care about the platform>
06-10-2011, 07:56 AM
I'm a latecomer to this thread, but I have to agree that adding the ability to use release flags for support files would be a great addition to the software. I could sure use this feature in my project files. But until then, all my releases install all of the support files to the temp folder no matter if they're needed or not, and there's nothing good I can do about it.
10-27-2011, 05:31 PM
Since we didn't get release flags for support files yet in IS 2012 (if this is planned for SP1, PLEASE let us know - I can avoid setting up a bunch of workarounds and just wait for the release) ...
Debbie, you mentioned using the automation interface to add/delete support files per release. To clarify, do you mean the Prebuild and Postbuild Commands under the Events tab for a Release? Also, will this work in a pure Installscript project, or just in basic MSI / IS MSI ? If so, could someone please provide sample code showing the adding/deleting of 2 files to support files in this way.
10-28-2011, 12:46 AM
If your release-dependent support files are not too big, you can add both to your project. both files will then be temporarily unpacked to the temp folder while the setup is running.
Then implement a simple mechanism to use one or the other at runtime, depending on the ISReleaseFlags property.
Obviously, this works fine for MSI projects. We have done it and it works fine.
I don't know how to do that in a pure InstallScript project, but there must be a way!
10-28-2011, 08:26 AM
The help library has some sample code snippets that may be useful. Here are links:
AddSetupFile Method (http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield18helplib/IHelpAutoAddSetupFile.htm)
DeleteSetupFile Method (http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield18helplib/IHelpAutoDeleteSetupFile.htm)
ISWiSetupFile Object (http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield18helplib/IHelpAutoISWiSetupFile.htm)
ISWiSetupFiles Collection (http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield18helplib/IHelpAutoISWiSetupFiles.htm)
ISWiProject Object (http://helpnet.flexerasoftware.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield18helplib/IHelpAutoISWiProject.htm)
I recommend giving that a try.
10-28-2011, 10:49 AM
Thanks, Debbie, I'll look into your suggestions. The automation interface is not what I thought it was, and looks to be capable of supporting what I need to accomplish.
Reureu - to answer your question, I need to swap out sets of 100+ MB files, so it's not practical for us to include them all in every build. There are also some other much smaller support files where I'm using your method though.
10-28-2011, 05:31 PM
If you're using a more recent version of InstallShield, and you just need to swap between similar files, you might also be able to do it with Path Variable Overrides. You can set one or more path variables to a different location for each release (see the Build tab in IS2011 or later), causing a different set of files to be pulled in to each release's build.
10-31-2011, 10:58 AM
Thanks for the tip Michael. Some of the files are similarly named, so this could work. For the files that only need to be in one release, I could create tiny dummy files of the same name for the other folders.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.