New version command?
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2061 from 2003/4/10
    From: France
    Hello,

    for my project Easy2Install, it will be possible to have a new "version" command show version number at format x.x.x if available by default without use "full" option please ? Because version command show only x.x when the version number is x.x.x.

    Thanks for your answer.
  • »07.06.23 - 10:02
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2257 from 2003/2/24
    "x.x.x" just isn't a valid version number.

    So I'd say you should just parse the full version string which seems trivial if you are just dealing with "x.x" and "x.x.x".
  • »07.06.23 - 10:38
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2061 from 2003/4/10
    From: France
    Quote:

    Kronos a écrit :
    So I'd say you should just parse the full version string which seems trivial if you are just dealing with "x.x" and "x.x.x".


    Unfortunately, it is not the case...
  • »07.06.23 - 10:40
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1034 from 2004/9/23
    Blame the developers and not the version command. You will soon find out that even the three digits are not enough.

    Not only are there versions with four or even five digits around, but also characters, so V1.2.3.4f for some reason is used as a version.

    It is not the job of the version command to adapt to all those stupid ideas. Unified versions are key for installing/de-installing applications. Also where to stop? How should the "newer"-command deal with that? Like DOS-Arguments versioning needs to follow a standard to max out usability.

    If an application or therefor the developer does not play by the rules (which clearly define how a version string has to be defined), it is not the problem of any OS component.

    Hence why version compare in Grunch is complex and you need to reinvent the wheel for your clone, too.

    [ Edited by geit 07.06.2023 - 13:41 ]
  • »07.06.23 - 12:33
    Profile
  • MorphOS Developer
    Piru
    Posts: 580 from 2003/2/24
    From: finland, the l...
    Quote:

    Papiosaur wrote:
    Hello,

    for my project Easy2Install, it will be possible to have a new "version" command show version number at format x.x.x if available by default without use "full" option please ? Because version command show only x.x when the version number is x.x.x.

    Thanks for your answer.

    My intention always has been to be as closely compatible with the original Commodore behaviour as possible (at least when feasible). When I reworked the AROS Version command (which the MorphOS version is based on) I tried to fix it to reproduce most of the behaviour as closely as possible. Unfortunately I didn't succeed at it fully, as demonstrated here.

    I've now revised the Version command in regards of this, and MorphOS 3.19 and later will include the fixed command. Thanks for bringing this to my attention!
  • »08.06.23 - 17:10
    Profile