Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.3, 1.0, and 1.0.1

stable shellext: include automatic parent id in string versions built

Note that we cannot put a mercurial changeset id into binary
file/product versions, since it contains non-digit characters
(e.g. "dc0395b8dab6").

Remark 1: Windows installer ignores the fourth level of binary
file/product versions. Leaving that at zero here (lots of applications
fill in a build number there).

Remark 2: Windows installer ignores string versions. So the parent
id added in this change has purely commentary function (see "Properties"
dialog of the built file THgShell.dll).

Changeset eabe6ecff707

Parent 5fac8ff441c5

by Adrian Buehlmann

Changes to 5 files · Browse files at eabe6ecff707 Showing diff from parent 5fac8ff441c5 Diff from another changeset...

Change 1 of 1 Show Entire File .hgignore Stacked
 
32
33
34
 
 
32
33
34
35
@@ -32,3 +32,4 @@
 glob:win32/*.reg  glob:*~  glob:tortoisehg/util/__version__.py +glob:win32/shellext/parentid.h
 
35
36
37
38
 
39
40
 
41
42
43
 
35
36
37
 
38
39
40
41
42
43
44
@@ -35,9 +35,10 @@
 all: THgShell.dll    clean: - del *.obj *.dll *.exe *.lib *.exp *.manifest *.res + del *.obj *.dll *.exe *.lib *.exp *.manifest *.res parentid.h    THgShell.dll: $(OBJECTS_THGSGELL) + create-parentid-h.cmd   rc shellext.rc   link /OUT:$@ $(LDFLAGS_THGSHELL) $** shellext.res   mt -nologo -manifest $@.manifest -outputresource:"$@;#2"
Change 1 of 1 Show Entire File win32/​shellext/​create-parentid-h.cmd Stacked
 
 
 
 
1
2
@@ -0,0 +1,2 @@
+@echo off +hg parents --template "#define THG_PARENT_ID {node|short}\n" > parentid.h
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
3
4
5
6
 
 
7
8
9
 
21
22
23
24
 
25
26
27
28
29
 
30
31
32
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
 
20
21
22
23
24
 
36
37
38
 
39
40
41
42
43
 
44
45
46
47
@@ -1,9 +1,24 @@
 #include "windows.h" +#include "thgversion.h" +#include "parentid.h" + + +#define TOSTR(x) #x +#define TOSTR2(x) TOSTR(x) + +#define THG_VERSION_BINARY \ + THG_VERSION_FIRST, THG_VERSION_SECOND, THG_VERSION_THIRD, 0 + +#define THG_VERSION_STRING \ + TOSTR2(THG_VERSION_FIRST) "." \ + TOSTR2(THG_VERSION_SECOND) "." \ + TOSTR2(THG_VERSION_THIRD) "-" \ + TOSTR2(THG_PARENT_ID)      VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,3,0 - PRODUCTVERSION 0,9,3,0 + FILEVERSION THG_VERSION_BINARY + PRODUCTVERSION THG_VERSION_BINARY   FILEFLAGSMASK 0x17L  #ifdef _DEBUG   FILEFLAGS 0x1L @@ -21,12 +36,12 @@
  VALUE "Comments", "TortoiseHg Shell Extension"   VALUE "CompanyName", "TortoiseHg Project"   VALUE "FileDescription", "TortoiseHg Shell Extension Dynamic Link Library" - VALUE "FileVersion", "0, 9, 3, 0" + VALUE "FileVersion", THG_VERSION_STRING   VALUE "InternalName", "shellext"   VALUE "LegalCopyright", "Copyright (C) 2010"   VALUE "OriginalFilename", "ThgShell.dll"   VALUE "ProductName", "TortoiseHg Shell Extension Dynamic Link Library" - VALUE "ProductVersion", "0, 9, 3, 0" + VALUE "ProductVersion", THG_VERSION_STRING   END   END   BLOCK "VarFileInfo"
Change 1 of 1 Show Entire File win32/​shellext/​thgversion.h Stacked
 
 
 
 
 
1
2
3
@@ -0,0 +1,3 @@
+#define THG_VERSION_FIRST 0 +#define THG_VERSION_SECOND 9 +#define THG_VERSION_THIRD 3