|
#1
|
|||
|
|||
|
Can I force an update/replacement of a file?
I sometimes create multiple builds under the same version number, i.e. 1.0.2 may have several builds (with or without minor changes - I know I shouldn't but nevertheless...)
Currently my pacth lets users locate the desired directory, then uses this code: Code:
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", SelectedFolder);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", SelectedFolder);
etc....
1) Remove the first two lines above (and eliminate the if statement accordingly) 2) Choose "force install" on the file properties for my exe file. Will that replace the previous exe with the new one? Is there a way to verify the exe and version, but ignore the MD5? (That way I could be sure they are overwriting the proper version of the exe without worrying about the specific build!) Thanks.... |
|
#2
|
||||
|
||||
|
Quote:
Quote:
...you could use some session variable other name if you wanted).Quote:
Quote:
![]() If your exe file hasn't changed, all you really need to do is add another key file, or select a different one, so Visual Patch can tell the difference between those two versions.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#3
|
|||
|
|||
|
Lorne -
I don't think you understood my issue about my files. When using "VisualPatch.CheckFolderVersion", if the file on the client machine (v1.0.0) is not identical to MY copy of v1.0.0 (which was used to create the patch), then patching does not occur. They may have v1.0.0 (a), and I may have v1.0.0 (b), which is not indicated in the version number assigned to the actual exe. I want to override this, but still be sure the client file is v1.0.0. Does that explain it better? |
|
#4
|
||||
|
||||
|
Quote:
You can enable "force install" to achieve this, although without differential binary patching the size of the patch file will most likely increase. However, if you define a version that matches the one on the client machine, it will be able to patch it fine. Quote:
The file version of the exe can still be used, if you want. Just mark the exe as a key file and Visual Patch will be able to identify (a) from (b) based on the MD5 signature. Quote:
__________________
--[[ Indigo Rose Software Developer ]] |
|
#5
|
|||
|
|||
|
Lorne -
I'm trying to do this without keeping a million little versions, so I doubt I'll include every single build into the patch. That is why I basically need to do this: 1) After the user selects a folder, find the Key file (myapp.exe) 2) Get the (client) Key file version (1.0.0) 3) Compare the version to what is allowed in the patch (1.0.0, 1.0.1, etc) 4) Then force the update... I can't use "VisualPatch.CheckFolderVersion" because it sees the difference in the builds. What can I do? |
|
#6
|
|||
|
|||
|
Ok, I kept digging and this is what I've come up with.
In the screen where the user selectes the app folder: Code:
local SelectedFolder = SessionVar.Expand("%SelectedFolder%");
whfiles = File.Find(SelectedFolder, Filename, false, false, nil, nil);
if (whfiles) then
whfilever = File.GetVersionInfo(whfiles[1]);
if (String.CompareFileVersions(whfilever.FileVersion, "#OLDESTVERSION#")>-1) then
if (String.CompareFileVersions(whfilever.FileVersion, "#NEWESTVERSION#")==-1) then
g_InstalledVersion=whfilever.FileVersion;
else
g_InstalledVersion=nil;
end
end
end
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", SelectedFolder);
etc.....
|
|
#7
|
||||
|
||||
|
Quote:
If you want to build a full-history patch without having to worry about all the different older versions, use the 'Force install' option. You can still check the exe file version if you want, but I'd personally just use a different file as a key file. (Make sure the exe is not a key file or Visual Patch will reject all installations with the b, c, d, e, etc. versions of that file.) It might be worth noting that you don't have to build a single, full-history patch. You could do separate projects for these special cases if you wanted. Or do one full-history patch, that uses the 'Force install' option, and another "previous version to current version" patch. Do one of those every time you make a change (even if the version number doesn't change). That becomes an even better option if you use TrueUpdate, since it can automate the process of choosing which patch to use, making it more advantageous to have many smaller patches instead of one big patch. Depending on the size of the file in question, if you have a lot of releases the 'Force install' option is probably your best bet since for a full history patch the individual diffs will start to add up, and Visual Patch might end up using the whole file anyway. (Even if each diff is only 1% of the original file's compressed size, once you have 100 of them it makes more sense to just include the original file.)
__________________
--[[ Indigo Rose Software Developer ]] |
|
#8
|
||||
|
||||
|
Nothing looks wrong at a quick glance. If you use 'Force install' and don't make the exe a key file, it should work.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#9
|
|||
|
|||
|
Are you saying not use the exe as a Key file because the built-in 'file locator methods' will not find it?
'Cause my whole solution is this: 1) Let VP look for the exe based on current folder - if not found then 2) Check Registry for key - if not found then 3) Allow User to select Folder and only look for valid versions This way, I can keep the key file the exe and most times VP will find it ok. Only when the unusual situation occurs (build b or c, etc) will the User locate the folder and then we'll patch based strictly on Version. I know the patch files will be larger due to 'force install', but this way the patch is more flexible.... |
|
#10
|
||||
|
||||
|
Quote:
__________________
--[[ Indigo Rose Software Developer ]] |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best way to share custom buttons with the group? | mwreyf1 | AutoPlay Media Studio 6.0 | 10 | 09-03-2009 05:01 AM |
| http://yourfilelink.com - 50MB max upload, free! | Intrigued | General Chat | 14 | 09-26-2006 09:44 AM |
| Error 3038: Could not seek in compressed file | Rikard | Setup Factory 7.0 Discussion | 2 | 05-25-2006 12:55 PM |
| Can search allow manual browse even if file is found? | RichardShaw | Setup Factory 5.0 | 2 | 08-28-2000 07:08 PM |
| Install only into one of several directories with specific existing file? | RichardShaw | Setup Factory 5.0 | 0 | 08-17-2000 03:29 PM |
All times are GMT -6. The time now is 04:16 AM.







...you could use some session variable other name if you wanted).
Linear Mode

