Jump to content
The Dark Mod Forums

Technically read the Version Number


OLLI_S

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.microsoft.com/en-us/windows/desktop/api/winver/nf-winver-getfileversioninfoa

 

 

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

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello,

 

The intention of VulnDetect is that users see if one of their app has known vulnerabilities and if there are new versions without these vulnerabilities available.

 

I added The Dark Mod to the database because users normally start the game with TheDarkModx64.exe and not with the updater.

So when VulnDetect tells the users that there is a new version of The Dark Mod available, then they will update the game.

So having the correct version info in the exe files will help us (and all other update managers) a lot!

 

VulnDetect reads the following version info from TheDarkModx64.exe:

  • 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)

If one of these values would show the correct version number, then this would be enough.

 

So, any plans that this is updated?

 

Best regards

 

OLLI

  • Like 1
Link to comment
Share on other sites

imho, i see it as a luxury problem.

it would be nice that the devs can create some code to set it in the binary.

if not, i dont mind.

 

But is this the standard method to set versionnumber in other applications?

i thought you can set the version numbers at several locations, and not only in the code of the binary.

(-edit- i didnt read the whole topic,..)

 

does vulndetect have a feature to look also at other locations like text files/registry/application manager/etc?

Edited by freyk
  • Like 1

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

it would be nice that the devs can create some code to set it in the binary.

STiFU has already done it, it is included in 2.07.

But is this the standard method to set versionnumber in other applications?

I guess it is some sort of standard in Windows world, although I won't be surprised if many programs omit it.
  • Like 1
Link to comment
Share on other sites

Hello STiFU,

 

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.

 

It is enough if any of the fields is filled (File Version or Product Version).

If we know what field is relevant then we use just this field.

 

 

STiFU has already done it, it is included in 2.07.
I guess it is some sort of standard in Windows world, although I won't be surprised if many programs omit it.

 

Perfect, thank you very very much!

 

Best regards

 

OLLI

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

today I installed the update for The Dark Mod and the version number is now shown properly:

 

Here the information we get for the 32-Bit version:

File name and path:     E:\The Dark Mod\TheDarkMod.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:    DM_VERSION_COMPLETE
File Version:           2.0.7.0
Product Version String: 
Product Version:        2.0.7.0

Here the information we get for the 64-Bit version:

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:    DM_VERSION_COMPLETE
File Version:           2.0.7.0
Product Version String: 
Product Version:        2.0.7.0

So we can read the proper version number from the File Version and also from the Product Version.

 

Thank you very much for adding the correct version number.

As soon as the internal rules are updated, I will post a screenshot here how this is displayed in VulnDetect.

 

Best regards

 

OLLI

Link to comment
Share on other sites

Hello,

 

I also wanted to add The Dark Mod Updater to our database.

Reason: users see that for the Updater there is a new version available.

 

In the application window I see the version number 0.72.

When I read the version number from the EXE then I get:

File name and path:     E:\The Dark Mod\tdm_update.exe
Product Name:           TDM Update
Internal Name:          tdm_update.exe
Original Filename:      tdm_update.exe

File Description:       The Dark Mod Updater/Downloader 
Company:                The Dark Mod Team 
Legal Copyright:        (c) 2010 The Dark Mod Team.  All rights reserved.
Legal Trademarks:       
Comments:               

File Version String:    1.0.0.1
File Version:           1.0.0.1
Product Version String: 1.0.0.1
Product Version:        1.0.0.1

So maybe you also want to update the version information in the Updater?

Would appreciate that!

Thank you!

 

Best regards

 

OLLI

Link to comment
Share on other sites

  • 4 weeks later...

Hello duzenko,

 

do you plan to update the version number in the The Dark Mod Updater?

So we can add the updater also to our database.

Would really love this!

 

Best regards and thank you again for adjusting the version number in the game.

 

Best regards

 

OLLI

Link to comment
Share on other sites

Hello duzenko,

 

do you plan to update the version number in the The Dark Mod Updater?

So we can add the updater also to our database.

Would really love this!

 

Best regards and thank you again for adjusting the version number in the game.

 

Best regards

 

OLLI

@stgailov?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...