Indigo Rose Software
  #1  
Old 03-20-2008
AlanNicoll AlanNicoll is offline
Indigo Rose Customer
 
Join Date: Jan 2007
Posts: 6
Setup Factory Integration

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.
Reply With Quote
  #2  
Old 03-20-2008
Lorne's Avatar
Lorne Lorne is offline
Indigo Rose Staff Member
 
Join Date: Feb 2001
Location: Indigo Rose Software
Posts: 2,588
Quote:
Originally Posted by AlanNicoll View Post
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.

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

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

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

Quote:
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.)
Quote:
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:

Code:
	-----------------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(strCustomDic));
	
	-- Add the "_codeprefs.xml" file to the uninstall data if it does't exist.
	fcnAddFileToUninstall(SessionVar.Expand(strCodePrefs));
end
Quote:
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.
__________________
--[[ Indigo Rose Software Developer ]]
Reply With Quote
  #3  
Old 04-22-2008
ReconADA's Avatar
ReconADA ReconADA is offline
Forum Member
 
Join Date: Mar 2007
Location: Huntsville, AL
Posts: 13
Quote:
Originally Posted by Lorne View Post
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!
Reply With Quote
  #4  
Old 04-22-2008
Lorne's Avatar
Lorne Lorne is offline
Indigo Rose Staff Member
 
Join Date: Feb 2001
Location: Indigo Rose Software
Posts: 2,588
Quote:
Originally Posted by ReconADA View Post
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.
__________________
--[[ Indigo Rose Software Developer ]]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning Setup Factory 7.0 Ted Sullivan Setup Factory 7.0 Discussion 0 09-22-2004 02:01 PM
New Features in Setup Factory 7.0 Ted Sullivan Setup Factory 7.0 Discussion 0 08-12-2004 01:13 PM
HOWTO: Distribute an AutoPlay Application with Setup Factory 6.0 Support AutoPlay Media Studio 4.0 Examples 0 10-25-2002 03:33 PM
FAQ: Setup Factory 5.0 Frequently Asked Questions Support Setup Factory 5.0 0 10-10-2002 10:50 AM


All times are GMT -6. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software