View Full Version : Setup Factory Integration
AlanNicoll
03-20-2008, 08:42 AM
The user's guide for Visual Patch talks about seamless integration with Setup Factory. How is this accomplished? I don't see any examples showing how this is done. It appears that you have to understand how Setup Factory works and perform the same operations through actions.
Here is an example of our applications that I am trying to figure out how to handle. It is close to what I anticipate happening.
I have created installation version 1 which consists of about 300 files. Most of these files are shared with other applications. Each file has certain attributes set (read-only) and may be marked as shared for uninstall purposes.
Now I create installation version 2. I add 10 additional shared files and 20 additional unshared files. File attributes have been setup as mentioned above. From what I understand about Setup Factory, when it installs these files, it modifies the registry (if shared) and creates entries in a file for uninstall. Now I want to create a patch file for version 1 to version 2. The registry and uninstall file won't be modified unless I do it manually. That means I have to know what Setup Factory would do and do it myself. But how do I know what to do and whether it needs to be done?
I now create installation version 3. I do things similar to version 2. What do I do to create a patch from version 1 or 2 to version 3?
As you can see, the integration seems far from seamless, unless I have missed something. Are there any examples of how this integration is intended to be handled?
It seems like the products need to be much more tightly integrated in order to get the benefits of using both products.
Lorne
03-20-2008, 02:46 PM
The user's guide for Visual Patch talks about seamless integration with Setup Factory. How is this accomplished? I don't see any examples showing how this is done. It appears that you have to understand how Setup Factory works and perform the same operations through actions.Installing new shared files and adding new files to the original setup's uninstall configuration (.xml) file does complicate things a bit. A couple ways to do it:
You can include them in the patch as new files, and use actions to set up the reference counting and add the appropriate entries to the uninstall configuration file.
You can create a silent installer for any new/shared files using Setup Factory, and launch it from Visual Patch. You'll still need to use actions to add the uninstall configuration file entries, however. (Alternatively you could chain the uninstalls, making the new uninstaller call any others it finds in a given location, or have your users uninstall the update-setup separately from Add or Remove Programs.)
Note that you would have to do the same thing for any new/shared files if you built an update installer using Setup Factory (and you wouldn't benefit from binary differencing).
Providing options to accomplish this automatically is something we'd like to address in a future version.
Here is an example of our applications that I am trying to figure out how to handle. It is close to what I anticipate happening.
I have created installation version 1 which consists of about 300 files. Most of these files are shared with other applications. Each file has certain attributes set (read-only) and may be marked as shared for uninstall purposes.
Now I create installation version 2. I add 10 additional shared files and 20 additional unshared files. File attributes have been setup as mentioned above. From what I understand about Setup Factory, when it installs these files, it modifies the registry (if shared) and creates entries in a file for uninstall. Now I want to create a patch file for version 1 to version 2. The registry and uninstall file won't be modified unless I do it manually. That means I have to know what Setup Factory would do and do it myself.More or less, yes.
But how do I know what to do and whether it needs to be done? You just need to know which files are new to that version, and which of those new files needs to be shared. If you want the files removed on uninstall, you would then use XML actions to add entries to the uninstall configuration file. (See the example code below.)
For the shared files, you would either use Registry entries to set up the reference counting, or use System.RegisterActiveX etc., or use File.Install action to install the file with the SharedSystem option enabled.
I now create installation version 3. I do things similar to version 2. What do I do to create a patch from version 1 or 2 to version 3?The same as for 1 to 2, only with all the files that are new between 1 and 3.
As you can see, the integration seems far from seamless, unless I have missed something.I agree with you, the integration in this case is far less automatic than I would like. Hopefully we'll be able to improve upon that in a future version. (It should really just be a matter of setting a check box.)
Are there any examples of how this integration is intended to be handled?
Here is an example from On Post Patch script, in one of the patches for Visual Patch itself:
-----------------FUNCTION BEGIN--------------------------------------------------------------------------
-- Add any new file to the uninstall using its full path.
function fcnAddFileToUninstall(strFilePathToAdd)
XML.Load(SessionVar.Expand("%AppFolder%\\Uninstall\\uninstall.xml"));
nCount = XML.Count("SUF70UninstallData/UninstallFiles", "*");
SessionVar.Set("%NewFile%",strFilePathToAdd);
bFoundFile = false;
nIndex = 1;
-- See if the file is in the uninstall XML already.
while ((bFoundFile == false) and (nIndex <= nCount)) do
strFilename = XML.GetValue("SUF70UninstallData/UninstallFiles/File:"..nIndex.."/Filename");
-- Get the filename from the filename tag.
if (String.CompareNoCase(strFilename, strFilePathToAdd) == 0) then
bFoundFile = true;
end
nIndex = nIndex + 1;
end
-- Add the file to the XML if it wasn't found.
if (bFoundFile == false) then
strXMLData = SessionVar.Expand([[<File>
<Filename>%NewFile%</Filename>
<DecrementUsageCount>0</DecrementUsageCount>
<UnregisterCOM>0</UnregisterCOM>
<UnregisterFont>0</UnregisterFont>
<FontDesc/>
<BackupFile/>
</File>
]]);
XML.InsertXML("SUF70UninstallData/UninstallFiles/File:1", strXMLData, XML.INSERT_BEFORE);
XML.Save(SessionVar.Expand("%AppFolder%\\Uninstall\\uninstall.xml"));
end
end
---------------END FUNCTION---------------------------------------------------
-- ******** - Version 3.0.1.0 to 3.0.2.0 changes - *********************
if (SessionVar.Expand("%InstalledVersion%") <= "3.0.1.0") then
-- Add the Custom.dic file to the application data folder.
local strAppDataRootFolder = Shell.GetFolder(SHF_APPLICATIONDATA);
local strAppDataProgramVersionFolder = strAppDataRootFolder.."\\IndigoRose\\Visual Patch\\3.0";
local strCustomDic = strAppDataProgramVersionFolder.."\\Custom.dic";
local strCodePrefs = strAppDataProgramVersionFolder.."\\_codeprefs.xml";
-- ***************Add new files to the program's uninstall***********************
-- Add the new "IRScriptEditor.exe" file to the uninstall data if it does't exist.
fcnAddFileToUninstall(SessionVar.Expand("%AppFolder%\\IRScriptEditor.exe"));
-- Add the new "IRScriptEditor.config.xml" file to the uninstall data if it does't exist.
fcnAddFileToUninstall(SessionVar.Expand("%AppFolder%\\IRScriptEditor.config.xml"));
-- Add the new "_at_MSI.xml" file to the uninstall data if it does't exist.
fcnAddFileToUninstall(SessionVar.Expand("%AppFolder%\\Data\\Actions\\_at_MSI.xml"));
-- Add the "Custom.dic" file to the uninstall data if it does't exist.
fcnAddFileToUninstall(SessionVar.Expand(strCustomD ic));
-- Add the "_codeprefs.xml" file to the uninstall data if it does't exist.
fcnAddFileToUninstall(SessionVar.Expand(strCodePre fs));
end
It seems like the products need to be much more tightly integrated in order to get the benefits of using both products.Most patching tools require a fair bit of effort; patching in general is a complicated subject. However I agree that it would be nice if Visual Patch took care of these details for you.
I've made note of this thread in our suggestions database so we can address these points in future design meetings.
ReconADA
04-22-2008, 11:00 AM
Hopefully we'll be able to improve upon that in a future version. (It should really just be a matter of setting a check box.)Any idea on when that will be released?
This is perhaps the worst feature of VP and should be given top priority!
Lorne
04-22-2008, 11:11 AM
Any idea on when that will be released?
This is perhaps the worst feature of VP and should be given top priority!No idea, sorry.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.