summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-06 07:37:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-06 12:07:48 +0200
commit069ebb6212aa096adb1ded0823ac4194db9b0d03 (patch)
treea31c1026a6a0349e7867713ca85e83e8ff79b1be /gui
parent56e9f634d5dd4122278a8f1c5f8e9fe39ed3652e (diff)
gui, api, csv: support hier(7) on Unix
This affects platforms such as FreeBSD, Cygwin or Linux.
Diffstat (limited to 'gui')
-rw-r--r--gui/CMakeLists.txt5
-rw-r--r--gui/main.cpp2
-rw-r--r--gui/ui.cpp1
3 files changed, 4 insertions, 4 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index b7448b4c..a2a04af1 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -1,3 +1,4 @@
+include(opentrack-hier)
opentrack_boilerplate(opentrack NO-LIBRARY)
if(WIN32)
@@ -12,9 +13,7 @@ endif()
add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all})
-if(NOT WIN32)
- set_target_properties(opentrack PROPERTIES SUFFIX ".bin")
-endif()
+set_target_properties(opentrack PROPERTIES SUFFIX "${opentrack-binary-suffix}")
target_link_libraries(opentrack
opentrack-logic
diff --git a/gui/main.cpp b/gui/main.cpp
index 3ae01404..be42ac7a 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -58,6 +58,8 @@ int main(int argc, char** argv)
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
QApplication app(argc, argv);
+ MainWindow::set_working_directory();
+
auto w = std::make_shared<MainWindow>();
w->show();
diff --git a/gui/ui.cpp b/gui/ui.cpp
index 1c7e25e9..ebc5db21 100644
--- a/gui/ui.cpp
+++ b/gui/ui.cpp
@@ -85,7 +85,6 @@ MainWindow::MainWindow() :
det_timer.start(1000);
ensure_tray();
- set_working_directory();
if (!QFile(group::ini_pathname()).exists())
{