Menu

Reference

Jens Nissen

ChessX Reference

About PGN Databases

PGN is a portable format between different chess programs, a file format, that can be written and read sequentially, but not modified at random places.

ChessX is a viewer for these files, thus ChessX is somewhat limited in handling chess data as these files can not really be handled like a proper database.

To work around some of these issues, ChessX handles smaller and larger files differently. You can configure the limit where ChessX switches the algorithm according to your computers performance.

Smaller databases are read completely into memory and can be read and written.

Larger files are only indexed and as of version 0.9.4, the index is also saved to disk for a faster reopening of a PGN file. As the games are not in memory, this algorithm does not allow saving the files again, so the database is opened read-only

About Index Databases

The index files are saved in the index-subdirectory of the Default Data Path. If the index directory or one of its files is deleted, ChessX will recreate the Index file the next time you open the PGN file.

ChessX will open the index file instead of the PGN file if the filename fits (e.g. "chess.cxi" fits to any "chess.pgn") if the date of the last modification fits to the date stored in the index file. So ChessX won't care for the path where your PGN is located (you can relocate the file after indexing), but this limits the Index to only one file with the same basename.

ChessX versions 0.9.6 and lower have index format 0, later versions support index format 1 and 0. On occasion, ChessX versions > 0.9.6 will not be able to read a version 0 format and will thus recreate the index file with the latest version. These occasions depend on the timezone when the file was created and the time it was read (summer/winter) and the version of the Qt libraries ChessX was compiled with.

About themes and file system

ChessX reads and writes files at different locations

  • Intermediate files arer put into the temp folder offered by the OS (see About Dialog for the exact path)
  • Themes are put into the program data directory assigned by the OS (see About Dialog again)
  • PGN databases are stored in a user defined folder (see Preferences Dialog)

ChessX has builtin themes and languages, which can be extended by external themes. These themes need to be stored in defined subfolders of the program data directory. Starting from ProgramDataPath/data/

  • Translation files are stored in lang/
  • Theme files in themes/...
  • Output templates in templates/
  • Windows Engines in engines/uci/ and engines/winboard/
  • Mac OS Engines in engines-mac/uci/ and engines-mac/winboard/

Board themes are put into themes/boards while simple piece sets are put into themes/. Outlined and shadowed piece sets are put into themes/outline and themes/shadow respectively.

Whenever such a directory exists, the corresponding internal directory is not evaluated anymore.

The About dialog gives hints on the paths which depend on the operating system.


Discussion

  • Romain

    Romain - 2021-07-16

    Hey guys,
    I'm trying to install stockfish in chessx on mac OS, but I just can't find how.
    I somehow installed the engine via Homebrew but I don't know where to find it in my laptop nor how this "thing" works — could you provide some help for this ?
    (Maybe I have to create a folder engines-mac, then uci, and maybe put something in it, but what ?)
    Thank you!

     

Log in to post a comment.