Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

File version and version number? #5

Closed

Description

@lennybacon

It would be quite usefull if the file version and version number on the git.exe would be set.

Activity

  1. kusma commented on Apr 19, 2012

    @kusma
    Member

    Patches welcome.

  2. patthoyts commented on Apr 19, 2012

    @patthoyts
    Member

    Why exactly? You can obtain this using 'git version' - arguably that's more accessible that locating the .exe and looking for the values in the properties tab. Not that this is especially tricky to do - we just have to generate a .rc file with the resource section and link that into the git.exe. I'm unconvinced it is much use to anyone though.

  3. lennybacon commented on Apr 19, 2012

    @lennybacon
    Author

    @patthoyts: Yeah but to get the version you need to run it. From an operations perspective a file version would make sense.

    I forked git and created a rc file. As you said to increase the version number this must be generated in build process. I found GIT-VERSION-GEN which is called quite on to in the makefile. I'm not so fluent on the bash

  4. dscho commented on Apr 19, 2012

    @dscho
    Member

    It is not so much bash as Makefile syntax. And I think that the following steps are needed in addition to the file you added (I am looking at lennybacon@77b89dd):

    • Add the object file to the BUILTIN_OBJS for Windows and MINGW32 (you probably need to rename the file, as git.o is already the object file of git.c)
    • Compile the .rc file (you might want to imitate the rule for common-commands.h in the Makefile, lines 1930--1931 and call windres to do the job)
    • Define the version on the windres command line with -DGIT_VERSION='"$(GIT_VERSION)"' and then use GIT_VERSION in the .rc file rather than the hard-coded "1.7.10"
  5. lennybacon commented on Apr 19, 2012

    @lennybacon
    Author
    • Generate git.rc
    • run windres my.rc -O coff -o my.res**
    • run g++ -o my_app obj1.o obj2.o my.res
      all called from makefile.
      @dscho: Whats your point with the git.o
  6. dscho commented on Apr 19, 2012

    @dscho
    Member

    If you run windres my.rc it will complain that there is no my.rc. You named it git.rc. But that suggests that it will be compiled to git.o. But that is already what git.c is compiled to.

    Oh, and let's not use g++. Let's use gcc as before.

  7. hvoigt commented on May 22, 2012

    @hvoigt
    Member

    @lennybacon since there has not been any update since a month: Do you want to work on this? If not I will label this as an issue that will not be fixed until we find a volunteer who wants to work on this.

    About the naming: the file could be called resource.rc without clashes to existing objects AFAIK.

  8. dscho commented on May 22, 2012

    @dscho
    Member

    @hvoigt @lennybacon I think the formulation "until we find a volunteer who wants to work on this" is not quite right, but "until somebody volunteers to work on this" is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions