src/Main.cc

changeset 685
2e74d99ee7ec
parent 684
8a56b1d4d44d
parent 634
5ef894f699d7
child 690
9e9c52ca955e
equal deleted inserted replaced
684:8a56b1d4d44d 685:2e74d99ee7ec
32 #include "Primitives.h" 32 #include "Primitives.h"
33 #include "GLRenderer.h" 33 #include "GLRenderer.h"
34 #include "ConfigurationDialog.h" 34 #include "ConfigurationDialog.h"
35 #include "Dialogs.h" 35 #include "Dialogs.h"
36 #include "CrashCatcher.h" 36 #include "CrashCatcher.h"
37 #include "GitInformation.h"
38 37
39 QList<LDDocument*> g_loadedFiles; 38 QList<LDDocument*> g_loadedFiles;
40 MainWindow* g_win = null; 39 MainWindow* g_win = null;
41 static QString g_versionString, g_fullVersionString; 40 static QString g_versionString, g_fullVersionString;
42 41
101 QString msg = DoFormat (args); 100 QString msg = DoFormat (args);
102 fwrite (msg.toStdString().c_str(), 1, msg.length(), fp); 101 fwrite (msg.toStdString().c_str(), 1, msg.length(), fp);
103 fflush (fp); 102 fflush (fp);
104 } 103 }
105 104
106 // =============================================================================
107 // -----------------------------------------------------------------------------
108 QString versionString()
109 {
110 if (g_versionString.length() == 0)
111 {
112 #if VERSION_PATCH == 0
113 g_versionString = fmt ("%1.%2", VERSION_MAJOR, VERSION_MINOR);
114 #else
115 g_versionString = fmt ("%1.%2.%3", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
116 #endif // VERSION_PATCH
117 }
118
119 return g_versionString;
120 }
121
122 // =============================================================================
123 // -----------------------------------------------------------------------------
124 QString fullVersionString()
125 {
126 #if BUILD_ID != BUILD_RELEASE
127 return GIT_DESCRIPTION;
128 #else
129 return "v" + versionString();
130 #endif
131 }

mercurial