![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
stars
directory, LandscapeMgr files may be found in the landscapes
directory.
There are also directories which are shared among modules and other parts of the program, for example the textures
directory.
OS | Location |
Linux / BSD / other POSIX | $HOME/.stellarium where $HOME is your home directory. |
Windows 2000 / XP | This is the Stellarium sub-directory of your users application data directory (usually something like C:\Documents and Settings\YOURUSERNAME\Application Data\Stellarium |
Windows Vista | This is the Stellarium sub-directory of your users application data directory (usually something like C:\Users\YOURUSERNAME\AppData\Roaming\Stellarium |
MacOS X | $HOME/Library/Preferences/Stellarium where $HOME is your home directory. |
The directory tree within the User Data Directory is the same as the Installation Data Directory. Any file which exists in the User Data Directory will over-ride that in the Installation Data Directory.
For example, to modify the position of a nebula texture, the user may copy the nebulae/default/nebula_textures.fab
file from the Installation Data Directory to the nebulae/default
sub-directory of the User Data Directory and modify it there. In this manner, each user on a multi-user system may have their own customized Stellarium data files.
OS | Location |
Linux / BSD / other POSIX | It depends on the installation prefix used when building Stellarium. If you built from source, and didn't explicitly specify an install prefix, the prefix will be /usr/local . Typically, pre-built packages for distros will use the /usr prefix. The Installation Data Directory is $PREFIX/share/stellarium |
Windows | It depends on where Stellarium is installed. The main Stellarium installation directory is the Installation Data Directory. Typically this will be C:\Program Files\Stellarium\ |
MacOS X | The Installation Data Directory is found inside the application bundle. |
Important data files which may be found in the Installation Data Directory include:
data/ssystem.ini
: the solar system bodies description file stars/default/*
: star catalogues nebulae/default/*
: nebula textures and data files scripts/
: script files textures/
: general purpose texture files (button icons etc) landscapes/*\/*
: landscape textures and data files
If a file exists in the User Data Directory, it will be used in preference to a file with the same name existing in the Installation Data Directory. This allows users to customise data files, textures and so on without modifying the originally installed files.
There are several reasons for doing this:
try ... catch ...
exception handling when using it.
For example. You are writing a class called Comet, and wish to search for a data file called comets.dat
located in the data
directory, you would go about it like this:
QString path; try { path = StelApp::getInstance().getFileMgr().findFile("data/comets.dat"); } catch(std::runtime_error& e) { qWarning() << "Could not locate file: data/comets.dat : " << e.what(); } ...
As you can see, the file is specified only by the partial path. This partial path is appended first to the User Data Directory. If, and only if the file is not found there, it is searched for in the Installation Data Directory. Thus if the user has a customised copy at: <User Data Directory>/data/comets.dat
it will be used, else the version in the Installation Data Directory will be used.
The files which come with Stellarium are found by the partial paths:
stars/default/stars_0_0v0_1.cat stars/default/stars_1_0v0_1.cat stars/default/stars_2_0v0_1.cat stars/default/stars_3_1v0_1.cat
Naturally, these files are to be located in the Installation Data Directory (because they ship with the installer).
The catalogue downloader tool runs within Stellarium. When it downloads extra star catalogue files, it should place them in the User Data Directory. After downloading all the catalogues, the paths to the various files should look like this:
<Installation Data Directory>/stars/default/stars_0_0v0_1.cat <Installation Data Directory>/stars/default/stars_1_0v0_1.cat <Installation Data Directory>/stars/default/stars_2_0v0_1.cat <Installation Data Directory>/stars/default/stars_3_1v0_1.cat <User Data Directory>/stars/default/stars_4_1v0_0.cat <User Data Directory>/stars/default/stars_5_2v0_0.cat <User Data Directory>/stars/default/stars_6_2v0_0.cat <User Data Directory>/stars/default/stars_7_2v0_0.cat <User Data Directory>/stars/default/stars_8_2v0_0.cat
It might be that someone makes a customised installer of Stellarium which includes all the star catalogues with the main installation - perhaps on a special edition DVD. In this case, all the files would be in the <Installation Data Directory>/stars/default directory. The downloader tool should be able to cope with this, not re-downloading files into the User Data Directory which already reside in the Installation Data Directory.