Jump to content


Photo

Technically read the Version Number


  • Please log in to reply
15 replies to this topic

#1 OLLI_S

OLLI_S

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 16 December 2018 - 05:47 AM

Hello,

 

I play The Dark Mod and I really love it (also loved the original Thief series).

Great work!

 

I help building up a security-tool that checks your system for installed applications and that reports wich of your applications have known vulnerabilities.

The tool also tells you when there are new versions of your installed applications available.

So it is more than a simple update-manager.

 

The tool is called VulnDetect and it is an replacement for Secunia PSI.

And I help keeping the database up-to-date and by adding new apps to the database.

I am also the community moderator in the VulnDetect forums.

 

I added The Dark Mod to the database.

But we have a problem getting the correct version information from the EXE file.

 

The version number of The Dark Mod is 2.06.

From the EXE-File I can read the following information:

File name and path:     E:\The Dark Mod\TheDarkModx64.exe
Product Name:           The Dark Mod
Internal Name:          The Dark Mod
Original Filename:      TheDarkMod.exe

File Description:       The Dark Mod
Company:                Broken Glass Studios
Legal Copyright:        Copyright (C) 2004 id Software, Copyright (C) 2004-2012 Broken Glass Studios
Legal Trademarks:       
Comments:               

File Version String:    1, 0, 9, 0
File Version:           1.0.0.1
Product Version String: 1, 0, 0, 1
Product Version:        1.0.0.1

So is there a way where I can get the version number 2.06?

Maybe from an other file or from the registry?

 

Thank you for your help!

 

Best regards

 

OLLI


Edited by OLLI_S, 16 December 2018 - 05:50 AM.


#2 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 16 December 2018 - 05:56 AM

I guess we should start maintaining the exe version resource, huh?

 

I believe it's sys\win32\rc\Radiant.rc



#3 OLLI_S

OLLI_S

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 16 December 2018 - 06:58 AM

I guess we should start maintaining the exe version resource, huh?

 

Would be helpful if you store the version number in the EXE file.

Almost all other apps store the version info properly in the EXE.

So I can count in that you add this in the next version of The Dark Mod?

 

I believe it's sys\win32\rc\Radiant.rc

 

This is in the souece?

I don't have the source and normal users that install the game also don't have it.

 

Thank you for helping.

 

Best regards

 

OLLI


Edited by OLLI_S, 16 December 2018 - 06:59 AM.


#4 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1406 posts

Posted 16 December 2018 - 07:29 AM

Could someone explain why do we need to fix this?

 

I have never heard any complaints about TDM exe not having proper version embedded. I hope Grayman could say better if there were such complains.

And the common idea is to avoid platform-specific stuff unless it gives some noticeable benefit. Stuff like resources, manifests, registry, etc are platform-specific and unnecessary.

 

Right now the normal way of checking version is:

1) Run TDM.

2) Look at the version at the bottom.

3) Also you may look at the very beginning of the console messages.

Using step 3, it is even possible to automate checking version, although I'm not sure if it provides any benefits.



#5 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 16 December 2018 - 08:28 AM

No, he's talking about the existing RC_VERSION resource that currently says 1.0.9 (doom3 exe version?)

I guess we should keep it up to date (preferred) or remove completely



#6 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1406 posts

Posted 16 December 2018 - 09:03 AM

No, he's talking about the existing RC_VERSION resource that currently says 1.0.9 (doom3 exe version?)

I guess we should keep it up to date (preferred) or remove completely

Ok, I'd like to know what says in favor of the first option (i.e. keep it up to date).

 

I see the following problem if we try to keep it up to date:

We will regularly forget to change this version (since no one ever needs/uses/sees it), so it will often be close to correct but wrong.

In my opinion it is much better to show version 1.0.9 (which is obviously trash) than e.g. version 2.06 instead of 2.08 (which is wrong but looks plausible).



#7 OLLI_S

OLLI_S

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 16 December 2018 - 09:18 AM

If VulnDetect (and also other update managers) display 1.0.9 but on your website and in the game itself you show 2.06 then this could confuse the user.

Or they might think that the update manager is doing something wrong (because we show the wrong version number).

 

In my eyes it is very useful to see that there is an update of The Dark Mod available, so I can patch it when I have time and not when I want to play.

Otherwise I start the game and have to wait for all updates to be finished.

 

VulnDetect should help users keeping their system up-to-date.

So we try to have many apps in our database and I thought it is a good idea to add The Dark Mod because I really love it.


Edited by OLLI_S, 16 December 2018 - 09:22 AM.


#8 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 16 December 2018 - 09:25 AM

Ok, I'd like to know what says in favor of the first option (i.e. keep it up to date).

Off the top of my head, it's the easiest way to check the executable version when it does not start or loads correctly (missing dll, GLSL compile errors, etc)

 

 

 

I see the following problem if we try to keep it up to date:

We will regularly forget to change this version (since no one ever needs/uses/sees it), so it will often be close to correct but wrong.

In my opinion it is much better to show version 1.0.9 (which is obviously trash) than e.g. version 2.06 instead of 2.08 (which is wrong but looks plausible).

It's better to show nothing than 1.0.9

You can remove that line altogether



#9 STiFU

STiFU

    Uber member

  • Development Role
  • PipPipPipPip
  • 3511 posts

Posted 16 December 2018 - 09:54 AM

Aren't we incrementing the version anyway? So it's just a matter of putting the appropriate preprocessor define in the right place, isn't it?

#10 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1406 posts

Posted 16 December 2018 - 11:45 PM

Aren't we incrementing the version anyway? So it's just a matter of putting the appropriate preprocessor define in the right place, isn't it?

Yes, there is one define in TDM source code (and I guess one more place elsewhere).

If the resource file can be tricked into using this define, it would be great solution.



#11 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12808 posts

Posted 17 December 2018 - 12:28 PM

Did you want the version number in a specific place in the exe?

 

Because it's certainly there; otherwise we wouldn't know what to paint on the main menus.

 

And--no--no one's complained about this.



#12 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 17 December 2018 - 01:34 PM

Did you want the version number in a specific place in the exe?

 

Because it's certainly there; otherwise we wouldn't know what to paint on the main menus.

 

 

No, this is about the standard Windows way of letting the system know the executable version without running the exe or anything like that.

 

https://docs.microso...ileversioninfoa

 

 

And--no--no one's complained about this.

Until now, and I think it's a reasonable request



#13 STiFU

STiFU

    Uber member

  • Development Role
  • PipPipPipPip
  • 3511 posts

Posted 17 December 2018 - 03:28 PM

The version number resides in Radiant.rc. The file version can be easily set via

#include "framework/licensee.h"
FILEVERSION TDM_VERSION_MAJOR,0,TDM_VERSION_MINOR,0

The product version however is derived from a string, which cannot be written via preprocessor macro. It can only be achieved via a VBA-script, which could by the way also automatically increment the build number. I am no VBA guru, however, and if nobody else is, I suggest we just drop the product version and just maintain the file version.


  • stgatilov likes this

#14 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1891 posts

Posted 17 December 2018 - 07:25 PM

vba is like old basic that ran on windows 95, only with extra graphic bits



#15 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1406 posts

Posted 21 December 2018 - 09:41 AM

We have C++, some almost pure C, x86 assembly, bits of Python an Perl, shell and batch.

Quite enough already  B) 

Adding VBA seems like overkill. Leave only file version.



#16 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1891 posts

Posted 21 December 2018 - 09:43 PM

actually for vba to run you would also have to add .net libraries and functions.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users