equal
deleted
inserted
replaced
29 #include "hwconsts.h" |
29 #include "hwconsts.h" |
30 |
30 |
31 #ifdef _WIN32 |
31 #ifdef _WIN32 |
32 #include <Shlobj.h> |
32 #include <Shlobj.h> |
33 #endif |
33 #endif |
|
34 #ifdef __APPLE__ |
|
35 #include "CocoaInitializer.h" |
|
36 #endif |
34 |
37 |
35 bool checkForDir(const QString & dir) |
38 bool checkForDir(const QString & dir) |
36 { |
39 { |
37 QDir tmpdir; |
40 QDir tmpdir; |
38 if (!tmpdir.exists(dir)) |
41 if (!tmpdir.exists(dir)) |
423 QSettings registry_hklm("HKEY_LOCAL_MACHINE", QSettings::NativeFormat); |
426 QSettings registry_hklm("HKEY_LOCAL_MACHINE", QSettings::NativeFormat); |
424 registry_hklm.setValue("Software/Hedgewars/Frontend", bindir->absolutePath().replace("/", "\\") + "\\hedgewars.exe"); |
427 registry_hklm.setValue("Software/Hedgewars/Frontend", bindir->absolutePath().replace("/", "\\") + "\\hedgewars.exe"); |
425 registry_hklm.setValue("Software/Hedgewars/Path", bindir->absolutePath().replace("/", "\\")); |
428 registry_hklm.setValue("Software/Hedgewars/Path", bindir->absolutePath().replace("/", "\\")); |
426 } |
429 } |
427 #endif |
430 #endif |
|
431 #ifdef __APPLE__ |
|
432 // this creates the autoreleasepool that prevents leaking |
|
433 CocoaInitializer initializer; |
|
434 #endif |
428 |
435 |
429 HWForm *Form = new HWForm(); |
436 HWForm *Form = new HWForm(); |
430 |
437 |
431 Form->show(); |
438 Form->show(); |
432 return app.exec(); |
439 return app.exec(); |