Skip to content
This repository

File version and version number? #5

Closed
lennybacon opened this Issue April 19, 2012 · 8 comments

5 participants

Daniel Fisher Pat Thoyts Erik Faye-Lund dscho hvoigt
Daniel Fisher

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

Erik Faye-Lund
Owner
kusma commented April 19, 2012

Patches welcome.

Pat Thoyts
Owner

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.

Daniel Fisher

@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

dscho
Owner
dscho commented April 19, 2012

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"
Daniel Fisher
  • 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
dscho
Owner
dscho commented April 19, 2012

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.

hvoigt
Owner
hvoigt commented May 22, 2012

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

dscho
Owner
dscho commented May 22, 2012

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

Pat Thoyts patthoyts referenced this issue from a commit May 22, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
bd81699
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
aaf37e9
Pat Thoyts patthoyts closed this May 24, 2012
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
e404868
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
d62c25d
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
680e350
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
83f96d7
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
b205a05
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
b9626d9
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
9150bf7
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
e3a7825
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
6c821cb
Pat Thoyts patthoyts referenced this issue from a commit May 25, 2013
Commit has since been removed from the repository and is no longer available.
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
3bbfb11
Pat Thoyts patthoyts referenced this issue from a commit May 29, 2013
Commit has since been removed from the repository and is no longer available.
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
8a1c4de
Pat Thoyts patthoyts referenced this issue from a commit May 24, 2012
Pat Thoyts Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
ce39c2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.