Another problem I am confronted with is how to zip files and give the archive a name (or additional information)
Button1: selects Files
Field1: Name for the new Archive (ex. Test)
Field2: Version for the new Archive (ex. 1.0.0)
Field3: FileDirectory
Field4: ListFiles
I don´t know how to pass this information (of the fields) to the archive creation process.
Code of Button1:
Code: Select all
local tNewFiles
answer files "Select the Files you wish to add to the Archive:" with type "WAD Files|wad|WAD" \
put it into tNewModFiles
put tNewFiles into field "FileDirectory"
put tNewModFiles into field "ListFiles"
Code: Select all
put field "ArchiveName" into tArchiveName
open file tNewFiles for binary read
revZipSetProgressCallback "myZipProgressHandler"
revZipOpenArchive tNewModFiles, "write"
revZipAddItemWithFile tArchive, "ListFiles", "tNewModFiles"
revZipCloseArchive tNewModFiles
Regards,
Masterchief