QTfrontend/main.cpp
changeset 2418 538a777f90c4
parent 2377 f3fab2b09e0c
child 2428 6800f8aa0184
--- a/QTfrontend/main.cpp	Sun Oct 11 16:23:59 2009 +0000
+++ b/QTfrontend/main.cpp	Sun Oct 11 20:14:55 2009 +0000
@@ -24,7 +24,7 @@
 #include <QRegExp>
 #include <QMap>
 
-
+char *programname;
 
 #include "hwform.h"
 #include "hwconsts.h"
@@ -44,8 +44,10 @@
 	return true;
 }
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
+        
+       programname = argv[0];
+        
     QApplication app(argc, argv);
 
     QStringList arguments = app.arguments();
@@ -287,9 +289,8 @@
 	bindir->cd("bin"); // workaround over NSIS installer
 
 	cfgdir->setPath(cfgdir->homePath());
+        
 #ifdef __APPLE__
-
-
 	if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"))
 	{
 		checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");