[texworks] Version string
Stefan Löffler
st.loeffler at gmail.com
Tue Mar 9 07:49:59 CET 2010
Hi,
Am 2010-03-09 06:53, schrieb Vladimir Lomov:
> ** Jonathan Kew [2010-03-07 11:50:44 +0000]:
>> Sorry, no, it doesn't. I should try to make that happen, but it's tricky to do it reliably for all platforms and build environments. If you run the shell script getSvnRev.sh in your checked-out copy, it should update - but that requires a Unix-style shell, so might be a problem if you're building on Windows.
>>
> I do permanently 'svn up' and build 'texworks' using PKGBUILD file on Archlinux.
>
> My previous build had number 'r.567' but now it has number 'r.571'
> despite that in svn revision number is 578.
>
> I thought that version string (file 'src/SvnRev.h') was being updated
> during build process (I think on step qmake->make or at beginning of make)
> but now I not sure.
>
> Was my assumption correct?
>
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.
@Jonathan: How about using keyword substitution ($Rev$, see
http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html)?
Of course it doesn't give us just the number, but it should be supported
on all platforms that run svn.
HTH
Stefan
More information about the texworks
mailing list