On 31.03.2010 13:28, Sune Foldager wrote: > # HG changeset patch > # User Sune Foldager <c...@cyanite.org> > # Date 1270034696 -7200 > # Node ID d704e90a341cd43c86c5e1099a410bf9b308197a > # Parent 9c22be2ca924211179d75c5895c09cff3b05d837 > setup: user correct mercurial product version > > diff --git a/setup.py b/setup.py > --- a/setup.py > +++ b/setup.py > @@ -113,12 +113,20 @@ > "optimize" : 1 > } > } > + > + def repoversion(verfile): > + globals = {} > + execfile(verfile, globals) > + return globals.get('version', 'unknown') > + > + hgversion = repoversion('../build-hg/mercurial/__version__.py') > + > extra['console'] = [ > {'script':'../build-hg/hg',
Not sure about using '../build-hg/hg' here (your patch 1). I'll leave this to Steve to decide. In other words: I didn't think about the implications. > 'icon_resources':[(0,'icons/hg.ico')], > 'description':'Mercurial Distributed SCM', > 'copyright':hgcopyright, > - 'product_version':version}, > + 'product_version':hgversion}, > {'script':'hgtk', > 'icon_resources':[(0,'icons/thg_logo.ico')], > 'description':'TortoiseHg GUI tools for Mercurial SCM', Hmmmmm. With this patch 2, the version resource binary file version of the exe will still be the "binary" Windows version of TortoiseHg then (the binary version is a tuple of four non-negative integers). Example of the version resource info of the hg.exe, as produced with this patch applied (I ran a thg-winbuild thg-stable build with these patches applied): File version: 1.0.1134.0 Product: TortoiseHg Product version: 1.5+62-1b4568d3deb Windows installer doesn't look at the product version string ("1.5+62-1b4568d3deb") when deciding to exchange a files (in minor upgrades). It only looks at the first three numbers of the binary file version ("1.0.1134.0"). (Which -- as a side note -- is one of the reasons why minor upgrades -- in Windows installer terms -- can't work with our current sources: we don't reliably count up one of the first three numbers there.) So, if you are aiming at enabling minor upgrades, I guess you'd probably rather want (hypothetical example): File version: 1.5.1062.0 Product: TortoiseHg Product version: 1.0+134-abb41e99f72b for that hg.exe. That is, keeping 'Product' and 'Product version' talking about the same thing, namely TortoiseHg, but having 'File version' talking about that particular file and thus using the "thg-windows-encoded" (4-tuple) hg version. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop