Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Can I tell my chess program to know the name of it's exe file.

Author: Uri Blass

Date: 18:05:14 06/11/04

Go up one level in this thread


On June 11, 2004 at 12:33:49, Dan Honeycutt wrote:

>On June 11, 2004 at 09:19:24, Thorsten Greiner wrote:
>
>>On June 11, 2004 at 08:30:29, Uri Blass wrote:
>>>
>>>The question is how to do it.
>>
>>I would suggest to put a version number in the source file which you increment
>>with each release. You can then assemble the names of the needed files like
>>this:
>>
>>--> snip <--
>>
>>#include <stdio.h>
>>
>>#define VERSION "237"
>>
>>#define BOOKFILE "book_" VERSION ".bin"
>>
>>int main(int argc, char *argv[]) {
>>
>>    printf("I will use bookfile %s\n", BOOKFILE);
>>
>>    return 0;
>>}
>
>I strongly agree with Thorsten.  I don't keep old versions of engines.  When I
>upgrade Movei, I copy the new version to my Movei folder and then rename the
>executable to Movei.exe.  That way I don't have to change anything in Winboard,
>Arena etc.  I don't think an engine should depend on it's name in order to find
>it's data files.
>
>Dan H.

I think that it is better to keep old version of engines because you may want to
do a match between the old version and the new version to test if there is an
improvement.

I also keep old source code so in case that I see no progress I can go back to
the old version.

Inspite of it I will take Thorsten suggestion.
In the code that I have now I have to replace 236 with 237 in many places and I
do not like to do it every time that I update a new version and with his
suggestion I can have it in one define and add some defines for all the names
that have 236 in them.

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.