Commit d1eaa0b8 authored by victor's avatar victor

git-svn-id: http://lpm.org.ru/svn/kumir2@354 382dccb8-6cdf-11e0-9640-eb60159f4418
parent df1d94a4
......@@ -17,6 +17,7 @@ include(../rpath.pri)
OBJECTS_DIR = $$IDE_BUILD_TREE/src/app/$$TARGET
# defines default template for this build
DEFINES += CONFIGURATION_TEMPLATE=\\\"Editor,Browser,Actor*,KumirAnalizer,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\(notabs,icon=classic,nostartpage,nosessions\\)\\\"
DEFINES += SPLASHSCREEN=\\\"coregui/splashscreens/classic.png\\\"
win32 {
CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd
......
......@@ -20,7 +20,7 @@ include(../rpath.pri)
OBJECTS_DIR = $$IDE_BUILD_TREE/src/app/$$TARGET
# defines default template for this build
DEFINES += CONFIGURATION_TEMPLATE=\\\"Editor,Browser,Actor*,KumirAnalizer,KumirNativeGenerator,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\\"
DEFINES += SPLASHSCREEN=\\\"coregui/splashscreens/professional.png\\\"
win32 {
CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd
......
......@@ -20,7 +20,7 @@ include(../rpath.pri)
OBJECTS_DIR = $$IDE_BUILD_TREE/src/app/$$TARGET
# defines default template for this build
DEFINES += CONFIGURATION_TEMPLATE=\\\"Editor\\(teacher\\),Browser,Actor*,KumirAnalizer\\(teacher\\),KumirNativeGenerator,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\(icon=teacher\\)\\\"
DEFINES += SPLASHSCREEN=\\\"coregui/splashscreens/teacher.png\\\"
win32 {
CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd
else:LIBS *= -lExtensionSystem
......
......@@ -13,6 +13,7 @@
# define SHARE_PATH "/../share/kumir2"
#endif
void showErrorMessage(const QString & text)
{
bool gui = true;
......@@ -48,6 +49,7 @@ int main(int argc, char **argv)
#ifndef Q_OS_WIN32
app->addLibraryPath(QDir::cleanPath(app->applicationDirPath()+"/../"+IDE_LIBRARY_BASENAME+"/kumir2/"));
#endif
QString versionStatus;
if (VERSION_BETA)
versionStatus = QString("beta%1").arg(VERSION_BETA, 2, 10, QChar('0'));
......@@ -63,7 +65,36 @@ int main(int argc, char **argv)
#ifdef SVN_REV
app->setProperty("svnRev", SVN_REV);
#endif
QSplashScreen * splashScreen = 0;
const QString sharePath = QDir(app->applicationDirPath()+SHARE_PATH).canonicalPath();
#ifdef SPLASHSCREEN
if (gui) {
QString imgPath = sharePath+QString("/")+SPLASHSCREEN;
splashScreen = new QSplashScreen();
QImage img(imgPath);
QPainter p(&img);
p.setPen(QColor(Qt::black));
p.setBrush(QColor(Qt::black));
QFont f = p.font();
f.setPixelSize(12);
QString v = qApp->applicationVersion();
if (app->property("svnRev").isValid()) {
v += " (rev. "+app->property("svnRev").toString();
}
int tw = QFontMetrics(f).width(v);
int th = QFontMetrics(f).height();
int x = img.width() - tw;
int y = 8;
p.drawText(x, y, tw, th, 0, v);
p.end();
QPixmap px = QPixmap::fromImage(img);
splashScreen->setPixmap(px);
splashScreen->show();
}
#endif
QDir translationsDir(sharePath+"/translations");
QStringList ts_files = translationsDir.entryList(QStringList() << "*_"+getLanguage()+".qm");
foreach (QString tsname, ts_files) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment