|
#1
|
|||
|
|||
|
Zip Plugin does not create path in created Zip file
Environment: TU 2.0.1.0, windows XP
When I run the following code, I do get a zip file created, but none of the files have any path information shown when I open the file using WinZip. Code:
local BackupArchive = "..\\upgrade\\backups\\beta2tobeta3.zip";
StatusDlg.Show();
Zip.Add(BackupArchive, backup_file_list, true);
local error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error during backup of upgrade files", "The Email CONTROL! upgrade cannot continue because the following error occurred: ".._tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
StatusDlg.Hide();
g_ScriptErrorDetected = true;
Application.ExitScript();
end
"C:\temp\ecdebeta2\ECDE_5.0\templates\..\..\ECDE_5 .0\docs\WebHelp\RoboHHRE.lng" Since the IncludeFolderNames option does not seem to work in this case and there are no errors reported, does anyone have any suggestions how I can get the path information included in this zip archive using the Zip plugin? Thanks. -Ken |
|
#2
|
||||
|
||||
|
Hi Ken,
Actually the IncludeFolderNames parameter does work, but it only works when adding files using wildcards. Here is some information from the help file that should explain it in more detail: //****************** IncludeFolderNames: (boolean) Whether to preserve the relative directory structure in the archive when adding files with wildcards: true - Include folder names so the structure can be recreated. (Default) false - Don't include any relative folder names. (The Zip archive will have no internal directory structure.) For example, given two files located at: C:\MyFolder\One.txt C:\MyFolder\MyInsideFolder\Two.txt If the file table references {"C:\\MyFolder\\*.*"} and IncludeFolderNames and Recurse are set to true, the Zip archive structure would be: One.txt MyInsideFolder\Two.txt If IncludeFolderNames is set to false, the Zip archive structure would be: One.txt Two.txt Note: If no wildcards are used, no relative folder names will be preserved. //****************** So what the IncludeFolderNames parameter will do is include the relative path information, based on a base path. Why did you want to store the full path information in the ZIP file? Was it to be used by TrueUpdate again or did you want your users? If you were going to use it in TrueUpdate, you could create an INI file that contains the files and their full paths, which you would then use when you extract the files.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#3
|
|||
|
|||
|
Thanks for the clarifying reply, Mark. I am creating the ZIP file to backup the set of files I plan to modify during the update, so as to achieve some form of rollback in case of failure. After the update is complete, I had hoped that the customer could rummage around through the file using WINZIP in case they need to examine or restore an individual file.
I am under the impression that this odd behavior (of not including the relative or full pathnames in the archive) is intentional. Could there be a TU enhancement request filed to make it operate more like 'tar' and other archive tools with respect to Add/Extract roundtrips using relative (preferred) or full pathnames? I could work around this by writing a Java application and using the Zip classes in the JVM, but I had hoped staying more with the native TU product so I had better integration for progress meters and logging. Thanks again. -Ken |
|
#4
|
||||
|
||||
|
Hi Ken,
Well if you are trying to backup an entire directory (i.e. C:\Program Files\My Product\*.*) then the ZIP file will contain path information relative to the base directory (i.e. C:\Program Files\My Product\). How are you populating backup_file_list? Would it be possible to use a wildcard-based table? I have added your idea as a suggestion for the ZIP plugin.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to create file path from Dialog.FileBrowse to string | mumu | AutoPlay Media Studio 5.0 | 1 | 06-03-2004 09:12 AM |
| HOWTO: Create a Project Template | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-28-2002 02:49 PM |
| HOWTO: "Hide" Externally Referenced Files | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-23-2002 04:19 PM |
| INFO: Recovering a Project File From a Built Application | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-10-2002 09:44 AM |
| 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 07:19 AM.






Linear Mode

