is excellent
, as I see it, as well as your previous one, though still the need to somehow categorize software is needed.
Using as reference my tentative categories above, software of types #1 and #2 can not be hosted, even in an unmodified form, on boot-land, while software of type #3 should be splitted in two sub-categories, #3a (software for which re-distribution is not allowed, that cannot as well be hosted on boot-land) and #3b (software for which re-distribution is allowed only in an unodified form); software of types #4, #5 or #6 poses no problems.
I wonder why there is the need to re-embed the software of types #3b, #4, #5 and #6
I mean, the latter three can be embedded from the beginning, and still we must provide a way for end-user to use his own files of softwares of type #1, #2 and #3a, so something, pardon my technically "caveman" ideas, like a subdirectory in the Winbuilder tree like "\ThirdPartyFiles\" to host them will be needed anyway, so files of type #3b, though hosted on boot-land and downloaded automatically from it, could go there as well.
I am not sure I have understood this:
Can you elaborate on it?
jaclaz
Let's suppose we accept the idea of Extract at Upload Embed at Download (EUED).
Let's call 3rd party files "safe" and "unsafe" in as "to be hosted on boot-land" (B-L).
I'll use Q&A form for clarity:
- Why not to keep "safe" files embedded at B-L? For consistency and visibility reasons.
- Why not to keep all "unsafe" files in one local directory? It's messy, names may duplicate, unfriendly to end-user, etc.
- Why embedding is still needed? For backward compatibility and convenience of developers and end-users.
- How upload works?
WB connects to B-L and verifies embedded files in local script against files hosted on B-L.
WB asks uploader (script developer) about Embedded files not hosted on B-L.
If uploader marks file as "safe" it's uploaded to B-L, i.e. added to hosted files.
Otherwise file is marked as "unsafe" in the script and is not uploaded to B-L.
WB adds Files Reference (FR) with names and properties into the script.
- How download works?
WB reads list of local files (it's new WB configuration file, let's call it "files.ini").
WB saves previous version of script.
WB downloads script
WB resolves script's FR to local files (from files.ini)
WB verifies (via MD5) if "safe" files need to be downloaded from B-L or they can be extracted from saved script.
WB downloads files (marked "safe" at FR) from B-L
WB extracts "unsafe" files from the old version of the script.
WB verifies all FR entries are resolved (uresolved entries cause Error "missing file...").
WB embeds files into the script.
- Why WB should save previous version of the script? Because end-user may have erased original files (uninstalled 3rd party software).
- What are properties of FR entry? FileName, MD5, "safe"-flag, "embedded"-flag, optional "comment"
- Why do we need Files.ini? To let end-user specify location of his local (usually "unsafe") files.
- Should Files.ini entries override other information? Yes, to let end-user more control (for ex. override safe "limited trial" with local "full version").
- What does Files.ini entry specify? ScriptName (or ProjName.ScriptName), FIleName, LocalPath (or LocalPath.LocalFileName)
- What to do if uploader marked "unsafe" file as "safe"? He manually marks file "unsafe" in the script and re-uploads it.
- Is Files.ini one per WB installation? Yes.
- Is FR section always present in the script? Yes, but if missing it's created at upload.
- What happens if script on B-L has "embedded" flag in FR (for ex. uploaded not via WB)? The script can not be downloaded, and normally should be deleted (or relocated) automatically.
- How to force WB to re-download/re-embed embedded file? Manually clear "embedded"-flag in the FR entry.
- What would happen if file is marked "safe" in FR, but not hosted by B-L? Error "Missing Hosted File...".
Final note: the only changes end-user would notice after implementation of EUED would be Files.ini and FR-section in each script.
Alexei