Committed Nils Larsson's patch to enable Qt version to be executed from outside the source directory, added to list of contributors.
parent
2d73068c9a
commit
893bde30cd
1
README
1
README
|
@ -254,6 +254,7 @@ Contributors
|
|||
Peter Chapman ......... Orbit path rendering changes
|
||||
James Holmes ..........
|
||||
Harald Schmidt ........ Lua scripting enhancements, bug fixes
|
||||
Nils Larsson .......... Qt enhancements
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
|
|
@ -69,6 +69,7 @@ UI_H_FILES = \
|
|||
EXTRA_DIST = $(CPP_FILES) $(H_FILES) $(QRC_FILES) $(UI_FILES) Celestia.ico celestia.rc
|
||||
|
||||
MOSTLYCLEANFILES = $(MOC_CPP_FILES) $(QRC_CPP_FILES) $(UI_H_FILES)
|
||||
DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' @DEFS@
|
||||
|
||||
if ENABLE_QT
|
||||
|
||||
|
|
|
@ -157,6 +157,17 @@ CelestiaAppWindow::~CelestiaAppWindow()
|
|||
void CelestiaAppWindow::init(const QString& qConfigFileName,
|
||||
const QStringList& qExtrasDirectories)
|
||||
{
|
||||
QString celestia_data_dir = QString::fromLocal8Bit(::getenv("CELESTIA_DATA_DIR"));
|
||||
if (celestia_data_dir.isEmpty()) {
|
||||
QString celestia_data_dir = CONFIG_DATA_DIR;
|
||||
QDir::setCurrent(celestia_data_dir);
|
||||
} else {
|
||||
QMessageBox::critical(0, "Celestia",
|
||||
_("Celestia is unable to run because the data directroy was not "
|
||||
"found, probably due to improper installation."));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Get the config file name
|
||||
string configFileName;
|
||||
if (qConfigFileName.isEmpty())
|
||||
|
|
Loading…
Reference in New Issue