Elvas Tower: Store latest version number in registry - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Store latest version number in registry Rate Topic: -----

#1 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 06:10 AM

Trello card: https://trello.com/c...ber-in-registry

Quote

Storing the latest version number in the registry has been requested by content creators, so that their installers can validate the user's version of Open Rails is compatible with the content

This will be stored per-user, next to the existing content folders storage, which installers already modify to add content

The version will be stored in a machine-readable format (so that it may be updated automatically) and human-readable text for display purposes

The current version of code produces data in "HKEY_CURRENT_USER\SOFTWARE\OpenRails\ORTS\Version" that looks like this:

https://james-ross.co.uk/temp/Screenshot%202021-08-30%20150044.png

The unlabelled QWORDs are 64-bit (8 byte) serialisations of the version number; sixteen bits (2 bytes) for each component. You can see the 1.4 and 1.3.1.1921 in the hex (0x) numbers above (0x781 = 1921). They should be compared numerically with the target version numbers in the same 64-bit format.

#2 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,436
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 09:37 AM

I'm assuming this only applies to those who use the OR update function. I looked at the location named above and found no version folder in the registry. I have always downloaded and manually installed various versions of OR, never using the updater...having first installed and setup the latest stable version to set the registry. Is there a downside to not using the updater?

#3 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 02:06 PM

 R H Steele, on 30 August 2021 - 09:37 AM, said:

I'm assuming this only applies to those who use the OR update function. I looked at the location named above and found no version folder in the registry. I have always downloaded and manually installed various versions of OR, never using the updater...having first installed and setup the latest stable version to set the registry. Is there a downside to not using the updater?

Sorry, I wasn't clear: this will apply to all copies of the Stable Version and Testing Version, no matter whether you use the installer, built-in updater, or zip files.

The code is currently only in Unstable Version, where it does not do anything (same goes for if you build it yourself).

#4 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,436
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 02:23 PM

James, http://www.elvastower.com/forums/public/style_emoticons/default/sign_thank_you.gifhttp://www.elvastower.com/forums/public/style_emoticons/default/hi.gif

#5 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,347
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 09:09 PM

FWIW, for a while I was testing several versions at the same time. I don't do that now but perhaps others do.

#6 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,436
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 30 August 2021 - 10:03 PM

Dave, Ive always had several versions at once, the last stable version, then --- a couple of testing versions ("U" versions), one or two Monogame Versions, and the Ultimate version. Never had any problems.

#7 User is offline   RR1 

  • Hostler
  • Group: Status: Active Member
  • Posts: 74
  • Joined: 03-March 13
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 31 August 2021 - 04:05 AM

 Weter, on 30 August 2021 - 06:00 PM, said:

So, if someone runs another, say, testing version, that registry entries will be overwritten with that version numbers?
And what about a case, when someone having a number of versions at the same time?

Looking at James's post, the registry version names are all unique so it looks to me (if I'm interpreting this correctly) like all OR versions can happily co-exist.

#8 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 31 August 2021 - 07:36 AM

 Weter, on 30 August 2021 - 06:00 PM, said:

So, if someone runs another, say, testing version, that registry entries will be overwritten with that version numbers?
And what about a case, when someone having a number of versions at the same time?


 RR1, on 31 August 2021 - 04:05 AM, said:

Looking at James's post, the registry version names are all unique so it looks to me (if I'm interpreting this correctly) like all OR versions can happily co-exist.

Yes, the different versions (Stable and Testing) are kept separate.

But also, "Storing the latest version number" - this code will only change what is stored if you run a newer version (by version number).

So, if you switch between multiple Stable or Testing versions, the registry entry will contain the newest of each.

#9 User is offline   steved 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,847
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 31 August 2021 - 08:54 AM

 R H Steele, on 30 August 2021 - 10:03 PM, said:

Dave, Ive always had several versions at once, the last stable version, then --- a couple of testing versions ("U" versions), one or two Monogame Versions, and the Ultimate version. Never had any problems.


Can you tell me where to download the Ultimate version.
Never heard of that one.

#10 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,436
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 31 August 2021 - 10:51 AM

 steved, on 31 August 2021 - 08:54 AM, said:

Can you tell me where to download the Ultimate version.
Never heard of that one.



Ultimate version is a fork of the main branch of the OR code, it is maintained by "perpetualkid" at GitHub...I have not kept up with this fork.
Regards, Gerry
Ultimate Ver. -- Fork of OR code

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users