How to handle the updates

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

How to handle the updates

Post by Otto »

To all,
Till now I used an application “FlashUpdate” to handle the updates of my programs.
“FlashUpdate” is no longer available and causes problems with some antivirus software.
Does someone know a good solution for updateing?

Thanks in advance.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: How to handle the updates

Post by driessen »

Otto,

Your question is not easy to answer. But I'm gonna give it a try.

You need to know that this procedure is used to update DBF-files.

First of all I have an update-folder with all my DBF-files. Each record contains 1 record. All fields have the default value.

My update-application opens a file in the standard data-folder and it opens the same file in the update-folder containing the default record.

The recordlayout of both files is compared.

If there is no difference in the recordlayout, both files are closed and the procedure continious with the next file.

If there is a difference in the recordlayout, the old file is renamed to a temporary name and a new file is created with the same recordlayout as the one in the update-record. Then all the non-deleted records of the temporary files are copied to the new file. The new fields get the default value of the file in the update-folder. Finally all files are closed and the temporary file is deleted after which the file is reindexed.

The result : the new file contains all the data in a new recordlayout.

If a file does not exist in the data-folder, a new empty file is created.

This procedure is repeated for all the files.

I hope my explanation is understandable.

If any questions, don't hesitate to ask.

Good luck.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Jonathan Hodder
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: How to handle the updates

Post by Jonathan Hodder »

To all,
Till now I used an application “FlashUpdate” to handle the updates of my programs.
“FlashUpdate” is no longer available and causes problems with some antivirus software.
Does someone know a good solution for updateing?
I think Otto wants to update programs as well.

I use our ftp site.
The customer uses the 'tray' program which executes the actual program they want.
The tray program has built into it to check the date time from the ftp site.
The update has options: done as background; when customer selects the updated program; periodically
(ie days in future); not at all.
Customer is given the option yesno to load or not bother when triggered.

I had to adjust the ftp date as the ftp server was a few hours behind us and I had to bring it up to local time.
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: How to handle the updates

Post by Otto »

Hello Michel, hello Jonathan,

thank you for your help.
Michel I use a similar technique as you describe for updating the dbf structure.
What I would be interested is how you handle the situation if a dbf-file is in use?

Yes Jonathan, I am searching for a solution how to update my program.
I am not quite sure how I could handle similar to the dbf-files the problem if the exe file is in use?

To integrate a RSS feed on a small window as Reinaldo tries to build would also be a good service.
http://forums.fivetechsupport.com/viewt ... =3&t=17158

At the moment I use a text-file which I download from the server and show in a MsgBox if there are updates online.

But then I have to ask the user to close the program click on download etc. It would be fine if this would work without user interaction.

Maybe you have a solution.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Jonathan Hodder
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: How to handle the updates

Post by Jonathan Hodder »

Yes update as a windows service is the ultimate.
But then at some stage I might like to put everything on Linux or Choris.

Rick has found a way to create a service - ask him or investigate that topic.

But then this is good too.
To integrate a RSS feed on a small window as Reinaldo tries to build would also be a good service.
I follow this topic with interest.
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: How to handle the updates

Post by driessen »

Otto,

What do I do is any DBF-file is in use ?

I show a message which tells which user is still using my application. These users has to stop the application. An update can only be executed if no one is using the application.

By updating programs, do you mean that a new version has to copied locally if an update has been installed ?

If yes, I do it this way.

First of all, I have small launch-executable which compares size, date and time of my main application on the server and on the local PC. If there is any difference, the main program is copied from the server to the local PC after which the main program is started.

The fist thing the main program does, is comparing size, date and time of the launch-executable on the server and on the local PC. If there is any difference, the launch-executable is copied from the server to the local PC after which the main program continious.

I hope I could help you.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: How to handle the updates

Post by Otto »

Hello Michel,

>I show a message which tells which user is still using my application.
How can you say which user is using the file?
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: How to handle the updates

Post by TimStone »

Right now I have a program that is located on the server which can be manually run to download the updates to the server. It has both a data file manager package for the server and an updated client .exe file. It comes in a zip package which is then unzipped and saved on that machine.

Currently, when starting the client software, our central server is checked for an update, and if one is found a message is displayed on the client that it is available.

In the upcoming update we want to install a service at the server that will download the files automatically and unpack them. It will then trigger an alert for each client workstation. When entering the program, I then expect to check to see if a new update is available, and if so, it will be copied from the server where it was downloaded, and then the program will start. This only takes a few seconds, so it won't create a problem. This could be done by setting the shortcut to a startup program which checks for the update, copies it if it is found, and then runs the main client executable.

I expect to get this in place in about two weeks ... many other things to do right now.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: How to handle the updates

Post by driessen »

Otto,

I don't know which files are opened by which user.

I always use all my files (40) at the start of my application.

One file contains a record per user. The field UACTIVE is set to .T. if the users starts the application, it is set to .F. if the users quits the application.

So, I have to loop through the file and looking for UACTIVE being .T. Those users are still using my application and of course they have opened the files.

Then I can ask them to quit the program.

There is also a second possibility.

Every user has a timer running, doing a procedure every 10 seconds. One of the functions in this procedure (besides alarms, etc.) is checking if the administrator has asked them to quit the software (the administrator has a button to ask to everybody to quit the application). If so, the user can answer to the administrator that it is impossible to quit right now. If he can quit, he has 1 minut to save his data because the application will be quited a few seconds later.

I hope that you understand what I mean.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: How to handle the updates

Post by Armando »

Mr. Otto & All:

Take a look to Biel's blog, there is an excelent solution using FTP.

http://bielsys.blogspot.com/2009/04/act ... ca-de.html

With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: How to handle the updates

Post by Otto »

Hello Armando,
Thank you so much. This is exactly what I was looking for.
Best regards,
Otto

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: How to handle the updates

Post by Armando »

Otto:

Thanks to Biel, it's creator.

Best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Post Reply