bright, fresh software
Downloads  |  Buy

Get client version and server version

Post a reply

:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is OFF
Smilies are ON
Topic review
   

Expand view Topic review: Get client version and server version

Re: Get client version and server version

Post by Guest » December 29th, 2011, 8:47 am

There are several files with the application and each has its version. I only change some of them on every update. Sometimes I only need to update an xml file for a new version and this version is only kept in client.wyc and server.wyc. Every dll or exe file only keeps its own version. The version kept in client.wyc ad server.wyc is the real version of this application. With the above feature I requested, I can show this 'Real' application version in the about dialog. This 'Real' version is different with the embedded version in dll or exe file.

Please let me know if there is any better idea. Thanks!

Re: Get client version and server version

Post by Wyatt » December 28th, 2011, 11:00 am

The best way to check for updates is to use the AutomaticUpdater's built-in behavior. That is, the asyncronous update checking (i.e. your app isn't "frozen" when it's checking for updates).

The ability to get the "installed" version from the client.wyc file is complicated. We could do it, but let me explain what it would entail:

  • The AutomaticUpdater starts wyUpdate.exe as a background process.
  • The AutomaticUpdater starts talking to wyUpdate and asking it what the "installed version" is.
  • wyUpdate responds with the installed version number.

In other words, it's not the speediest method of getting the current version. Is there any reason you're not embedding the current version in your app (like an about dialog box, the AssemblyDetails, etc.)?

Re: Get client version and server version

Post by Guest » December 28th, 2011, 7:55 am

Sorry I didn't explain clearly.
My meaning is to get the client and server version at run time. I know I can parse it from client.wyc and server.wyc directly, but it will be more convenient if this feature is implemented in AutomaticUpdater. Is it possible? Thanks!

Re: Get client version and server version

Post by Wyatt » December 26th, 2011, 5:43 pm

This feature (checking for updates) is already a part of the AutomaticUpdater.

Re: Get client version and server version

Post by Guest » December 26th, 2011, 4:06 am

Thanks for your reply.
Is it possible to make this feature as properties in AutomaticUpdater control? This control is popular and convenient for .net development.

Re: Get client version and server version

Post by Wyatt » December 23rd, 2011, 2:38 am

In some reason I need to get the current client version info from the client.wyc, is it possible?


We're introducing a "client.wyc" reader with wyBuild 2.6.15, so you'll be able to view all the internals of the client.wyc file. If you mean "how do I get it at runtime?" then your only option is to parse the client.wyc file. See the wyUpdate source code.


Furthermore, is there a way to actively query the server version instead of waiting the events notification (exp: UpdateAvailable)?


Yes, download the *.wys file from your server and parse the result.

Re: Get client version and server version

Post by Guest » December 22nd, 2011, 8:17 pm

Thanks for your reply!

The new Version scenario is fine.
In some reason I need to get the current client version info from the client.wyc, is it possible?
Furthermore, is there a way to actively query the server version instead of waiting the events notification (exp: UpdateAvailable)?

Re: Get client version and server version

Post by Wyatt » December 22nd, 2011, 1:06 pm

Hey Jones,

The new version is available using the Version property in either the UpdateSuccessful and UpdateAvailable events. All other times you'll either have to cache the version number (your existing version and the new version).


Does this make sense?

Get client version and server version

Post by Jones » December 22nd, 2011, 9:04 am

Is there any way to get client version and server version before update? I checked AutomaticUpdater.Version value, it's always null. Thanks for feedback in advanced!

Top