Update a lot of files using TWebUpdate

Hello


I am using TWebUpdate to update my applications to the community. Now I would like to delivery some files (a directory with demo archives) but if I use the wizard I have to indicate all files one by one...and sometimes the number of files changes.

Is there a way to add a directory to the update project file to deploy all files?...now I zip all files and notice the user to unzip after update but I would like to deploy all files in a directory directly. Or must I create the .INF file counting the files and building it by code manually?

All the best
ilde

There is currently not a way to specify to deploy just all files in a folder. If you have a lot of files to deploy and you want to deploy these files all at once, I'd recommend to put all these files inside a CAB file and have TWebUpdate deploy & decompress the CAB file.

Thank you...the problem is that I have to include or delete files in the update builder each time I add files to the directories I want to deploy.


I decided to create a sfx file (auto executable zip file extractor) and include it and execute it before the update process ends.

Please, consider to think about that posibilitie

all the best
ilde

That is indeed a possible alternative, although I cannot see how you perform file deleting this way and how much it is different from putting all needed files in a CAB.


As I know a .cab file can not store a directory structure and I want to deploy a directory structure and files. That is why I prefer use zip format.

All the best
ilde

A CAB file can also hold a hierarchical folder structure.

Yes, I use a script to create a cab file with all the directory structure at:


https://stackoverflow.com/questions/28043589/how-can-i-compress-zip-and-uncompress-unzip-files-and-folders-with-bat

but when I include the cab file in the update process it is not uncompressed when downloaded....Should I do any more to uncompress the cab file when it is updated?. Sorry but maybe I am losing something...

All the best
ilde

Did you add the name of the CAB file in the appcomps= section in the WebUpdate .INF control file?

Yes. I add the cab file to the files using the UpdateBuilder and include it in Application Components. I think if i mark it as cab compressi?n it will be compressed twice so the result will be cab file and if i mark it not compressed the cab file will be not uncompressed.


Here is the .inf file:

[update]
newversion=1.1.0.172
localversion=VisualIoTStudio.exe
[action]
msg=You are going to update to the latest Visual IoT Studio version. Made with enthusiasm and love.
[files]
count=2
[file1]
url=http://www.st4makers.com/phocadownload/VisualIoTStudio.CAB
newversion=1.1.0.172
localversion=VisualIoTStudio.exe
descr=Visual IoT Studio main application
compressed=0
[file2]
url=http://www.st4makers.com/phocadownload/projects.cab_NEW
localversion=projects.cab
mandatory=1
[application]
appupdate=1
appname=VisualIoTStudio.exe
silentrestart=1
appcomps=VisualIoTStudio.CAB projects.cab_NEW
[eula]
file=http://www.st4makers.com/phocadownload/readme.txt
[whatsnew]
file=http://www.st4makers.com/phocadownload/changelog.txt

I tried to add into the main cab file but either uncompress the internal cab file.

Any clue?. The only think I could try is to launch the update process twice...once for the main application and other for the demo files application.

all the best
ilde

When you use the file suffix _NEW, the file will be downloaded and just renamed to the filename without suffix _NEW. If you want the CAB file to be decompressed, you must use the .CAB file extension and not .CAB_NEW.

Dear Bruno


finally it worked. Thank you for the help. I have been using the UpdateBuilder. If I mark the checkbox "Include in Application Components" it renames it to a .CAB_NEW. The solution is to uncheck it and write down manually in the "Application components" edit box in the "Global Settings" tab.

Thank you again and congrats for the great component to make our customers updated with our developments!

All the best
ilde