[texworks] Version string

Stefan Löffler st.loeffler at gmail.com
Tue Mar 9 16:02:26 CET 2010


Am 2010-03-09 15:51, schrieb Vladimir Lomov:
> Hi.
>
> 2010/3/9 Stefan Löffler <st.loeffler at gmail.com>:
> ...
>   
>> As Jonathan elaborated in the previous post, your assumption was not
>> correct. There is a script getSvnRev.sh which updates src/SvnRev.h, but
>> it's not called automatically during the build process. This is because
>> shell scripts are not supported on all platforms (Windows). Besides,
>> calling this automatically would make packaging a lot more difficult,
>> seeing that for packaging you often export your svn working copy to a
>> static version for which any svn commands would fail. But if you create
>> a script "update" with the content "svn up && ./getSvnRev.sh && qmake &&
>> make" things should work smoothly for you.
>>     
> Well, then before 'src/SvnRev.h' was updated with each(?) commit. May
> be remove 'src/SvnRev.sh' from svn _and_ run 'getSvnRev.sh' when qmake
> run on appropriate platform?
>   

Typically, src/SvnRev.h should be updated with each commit, that's
right. Note, however, that there are some commits to the svn repository
that don't affect the code (e.g. changes to the wiki, AFAIK). So the
actual (global) svn revision number can differ from the revision at
which the code was last changed.

As stated before, getSvnRev.sh can't always be run (e.g. it fails on
Windows or when the code is exported from svn to some packaging tools).
Hence src/SvnRev.h must be retained (though it could be changed to use
svn keywords, for example).

> P.S. As I build texworks with the help of PKGBUILD (part of Archlinux
> package system) then it is not so difficult to update 'src/SvnRev.h'
> using it.
>   

Unfortunately, this doesn't hold for some other platforms/packaging tools.

-Stefan


More information about the texworks mailing list