mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
QGIS now fails gracefully when started from the build (src) directory rather
than being started from a properly installed location. git-svn-id: http://svn.osgeo.org/qgis/trunk@3016 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3207be381d
commit
0910cdcd8a
18
src/main.cpp
18
src/main.cpp
@ -213,6 +213,24 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
QApplication a(argc, argv, myUseGuiFlag );
|
||||
|
||||
// Check to see if qgis was started from the source directory.
|
||||
// This is done by looking for Makefile in the directory where qgis was
|
||||
// started from. If running from the src directory, exit gracefully
|
||||
if(qApp->applicationFilePath().contains("/src/qgis"))
|
||||
{
|
||||
// check to see if configure is present in the directory
|
||||
QFileInfo fi(qApp->applicationDirPath() + "/Makefile");
|
||||
if(fi.exists())
|
||||
{
|
||||
QMessageBox::critical(0,"QGIS Not Installed",
|
||||
"You appear to be running QGIS from the source directory.\n"
|
||||
"You must install QGIS using make install and run it from the "
|
||||
"installed directory.");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// a.setFont(QFont("helvetica", 11));
|
||||
|
||||
#if defined(Q_OS_MACX) || defined(WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user