Automatic Updater for application

This forum is for eXpress++ general support.
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Automatic Updater for application

#11 Post by unixkd »

A service always ran that was responsible for sending the emails.
Hi Roger

Can you share with us the SERVICE program routine responsible for sending the emails ?

Thanks

Joe

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Automatic Updater for application

#12 Post by Victorio »

Hi all,

My update system :
On FTP is folder UPDATE, where I uploading all new files, EXE, DLL,DBF... and also one text file VERSION.TXT where is informations about new version

User run application, and this connect to FTP and check VERSION.TXT and compare with local VERSION.TXT,
if on FTP is newer version, run UPDATER.EXE and main application shut down. (asynchonous Runshell)
UPDATER connect to FTP and download all files from UPDATE to local folder UPDATE
And then rewrite all files in root main application to new from UPDATE, also with subfolders and his content.
Also, UPDATER.EXE before close run again main application.
This is also perfect when I have implement in main application system for udpate for own date, time, for example in night, and user leave application open, and updater run in specific time.

This works fine several years, problems is only with UPDATER.EXE which also need DLL runtime and cannot rewrite it when UPDATER.EXE is running.
Because I need also update DLL for new version eXpress++ , or xb2net, sqlexpress etc, after not complet update program not work correctly.

Evertything will work fine when I modify UPDATER which use DLL in own directory. At this moment I do not know how do it, only create some batch file , where will be change work directory for updater
and also need copy all dlls runtime for this directory. I'm just afraid this will not work on Windows 2003 or 2012 servers where I have some problems with running BAT files.
It would be perfect if the path to the DLL files could be incorporated directly into the Xbase exe, but I mean, this is impossible.

It's a shame that in Xbase cannot create only one EXE module which do not need any other files dll.

I use Innosetup too, it is perfect tool to installation pack, or manual update , but I have not full control with it.

Also when update application on Clients PC, I also create LOG files, which are uploaded to FTP and then I have information about all clients who updated his app or who have some problems with update
and update not end complete.

At this moment I working on this :
how from main application run updater.exe loaded in own directory with own DLLs, and also before it, copy DLLs to this directory.
and after this modify updater.exe after udpate run main application with own dlls in root directory.
and if will be problem with run bat file on Windows 2012 server, I must create updater in C++ as single exe files that not need any DLL, or search other solution.

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Automatic Updater for application

#13 Post by Victorio »

I'm watching to XPPLOAD.EXE , and this can help me, if there are parameters as path

XPPLOAD [<options>] [version] [[<path>]<file1>] [<file2>] [@<list-file>]

but if this can use, I must first "send" xppload.exe to all users before I can use it.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Automatic Updater for application

#14 Post by Tom »

Be careful!

XppLoad.exe is also a part of the Xbase++-installation. It shows you the versions of all installed components and lists the dependencies. Type "xppload version" at the command prompt.

Roger's XppLoad is a tool to load another, bigger Xbase++-program and show a kind of splashscreen while this happens. To do this, XppLoad creates a kind of semaphore file and stays running as long as this file exists. This has almost nothing to do with updating, and XppLoad also loads all the runtimes of Xbase++. It does not load eXpress++-DLLs.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Automatic Updater for application

#15 Post by rdonnay »

Be careful!

XppLoad.exe is also a part of the Xbase++-installation.
I completely forgot that I wrote that old program in the year 2000.
I don't think that Xbase++ had an Xppload.exe at the time.

I recall writing it for Michael Rudrich because his application took so long to load across a slow network.
Later, I discovered that compressing EXEs and DLLs with UPX actually made an application load faster because CPU's were faster than networks and it could decompress files faster than loading across the network.

I don't think that a program like that old one is very useful today because networks are so much faster now.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Automatic Updater for application

#16 Post by Auge_Ohr »

hi,

XppLoad is not save as it does not include "Version" in every *.DLL

you can use Xbase++ Function DllInfo() to get Information about *.DLL
than you (perhaps) get Info in "FileDescription"
greetings by OHR
Jimmy

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Automatic Updater for application

#17 Post by Victorio »

Please , how can I determine, which DLL files are necessary to run application ? Without look to all PRG files, where can be #include ....DLL .
I need this to create minimal pack for application to send users, because actually runtime has about 51 files.
Is this possible ?

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Automatic Updater for application

#18 Post by Tom »

Hi, Victorio.

Put your app and all the DLLs you think your app needs (at least DCLIPX.DLL from eXpress++ and the contens of ...\XPPW32\RUNTIME) in a folder. Start your app from there (at the prompt) and make sure it comes to a point where the DBEs are loaded. Then try to delete the contens of this folder. All files that cannot be deleted ("access denied") are loaded by your app. The others not. Add: Make sure there is no PATH active to the runtime DLLs from Alaska, eXpress++ and other components while you do this.

A more elegant way is to use tools that show loaded DLLs and dependencies.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Automatic Updater for application

#19 Post by Victorio »

Hi Tom,
I tryed this , but it is not work for all DLLs, when I use DLLLOAD() in program. For example when I have in program snDll := DllLoad('DESDLL.DLL')
But this I can determine simply with text search DLLLOAD, in my app only two dll are loaded with this function, thats no problem.
Is it sure, that all DLL except called via DLLLOAD are "opened" , when program start and DBE are loaded ?

Also I must try it on PC, where no path to runtime, and also xbase++ development, or modify PATH to prevent system found dlls.

what you mean :
"A more elegant way is to use tools that show loaded DLLs and dependencies." ?

I am searching some tool like this, but not found any.

Viktor

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Automatic Updater for application

#20 Post by Tom »

Hi, Viktor.

This way ensures all static DLLs used by your app are known - and most of the runtime DLLs are static (linked with LIB/PRAGMA or internal). Once the DBEs are loaded, those DLLs are loaded aswell. If you use DlllLoad, you have to check your code in addition.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply