Opened 2 years ago

Closed 2 years ago

#67 closed enhancement (fixed)

version info

Reported by: diver Owned by:
Priority: minor Milestone: 0.8.3
Component: odin Version:
Severity: low Keywords:


add a --version to pe or pec
this would give a very fast way to see what odin version a user has installed.
this would even give the odinbug tool again the chance to find the version again

Change History (10)

comment:1 Changed 2 years ago by diver

probably pe or pec isn't a good idea, as right now it throws a popup when is doesn't find the app. and the user has to hit the ok button.
eventually a small "odin.exe" with only "--version" parameter would be better.

comment:2 Changed 2 years ago by dmik

Why showing the version number in a popup is not good?

comment:3 Changed 2 years ago by diver

because you can't parse that.
another possible way would be to add bldlevel info to kernel32.dll

comment:4 Changed 2 years ago by dmik

Well, that's not the real reason -) The real one is that the popup window can't be dismissed in the old versions of Odin.

Anyway, as discussed, there is another solution. I will provide a REXX snipped that will locate KERNEL32.DLL in [BEGIN]LIBPATH, call bldlevel on it and extract the version information from there.

For that, we need to bring bldlevel info back into the Odin DLLs and EXEs (it was lost during the transition from VAC to GCC).

comment:5 Changed 2 years ago by dmik

Adding bldlevel info is restored in r21937.

I also created a handy REXX script which can be used to extract the bldlevel info from an arbitrary file. The script is located here: Given this command line:

bldlevelx.cmd -fv kernel32.dll

it will try to locate kernel32.dll in [BEGIN/END]LIBPATH and print its version information to the standard output on success, e.g.:


Note that since the 0.8.1/0.8.2 builds of Odin lack the bldlevel information, we will have to release a new version, 0.8.3, where this is fixed (so that a new, 0.8.x series of Odin could be successfully detected with bldlevelx).

comment:6 Changed 2 years ago by jojo

Very nice script indeed, thanks. This should work just fine ;)

(Of course, an enhancement would be convenient if I could request 'any' file, like OS2KRNL or DANIS506.ADD)

comment:7 Changed 2 years ago by dmik

Do you mean to enhance it so that it can also resolve the full path when things like OS2KRNL and DANIS506.ADD are given? Well, this is doable. I.e. for OS2KRNL and friends we can simply assume BootDrive:\, for .ADD files -- BootDrive:\OS2\BOOT and so on. If this is really necessary and you provide me with the extensions you are interested in, I will do that.

If you mean requesting the information for files other than DLL and EXE, this works of course, provided that you specify a full file name (e.g. C:\OS2KRNL).

BTW, if you want to use this in a WPI, you can copy-paste the GetBldLevel? procedure and use it in a <REXX> function in .WIS for extracting the necessary information instead of requiring to have bldlevelx.cmd already installed.

comment:8 Changed 2 years ago by jojo

Ah. Providing full path indeed works fine, that's sufficient. (I didn't read the script entirely, although it looks like beautiful code ;)

Good tip on including it in the REXX section, but, it is also possible to pack the script inside the WPI and use/call that (it's done by the ACPI installer for example).

comment:9 Changed 2 years ago by diver

  • Milestone changed from general enhancement to 0.8.3

comment:10 Changed 2 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the words about my work -)

This task is complete now; closing it.

Note: See TracTickets for help on using tickets.