summaryrefslogtreecommitdiff
blob: 22244987d458f7ec39139ba9a7039c1d1744443d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
commit a6c55c51dc251924be7eccf6637fc719a2b7ace0
Author: hasufell <hasufell@gentoo.org>
Date:   Wed Jul 31 03:38:24 2013 +0200

    use CMAKE_BINDIR as default bin patch in odalauncher

diff --git a/config.h.in b/config.h.in
index e91b3a6..7019a02 100644
--- a/config.h.in
+++ b/config.h.in
@@ -2,5 +2,6 @@
 #define CONFIG_H
 
 #define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@"
+#define CMAKE_BINDIR "@CMAKE_INSTALL_BINDIR@"
 
 #endif
diff --git a/odalaunch/src/dlg_main.cpp b/odalaunch/src/dlg_main.cpp
index 915b527..f01224a 100644
--- a/odalaunch/src/dlg_main.cpp
+++ b/odalaunch/src/dlg_main.cpp
@@ -27,6 +27,7 @@
 #include "str_utils.h"
 
 #include "md5.h"
+#include "config.h"
 
 #include <wx/settings.h>
 #include <wx/menu.h>
@@ -42,6 +43,7 @@
 #include <wx/process.h>
 #include <wx/toolbar.h>
 #include <wx/xrc/xmlres.h>
+#include <wx/string.h>
 #include <wx/cmdline.h>
 
 #ifdef __WXMSW__
@@ -200,10 +202,12 @@ dlgMain::dlgMain(wxWindow* parent, wxWindowID id)
     }
     #endif
 
+    const char *cmake_bindir_str = CMAKE_BINDIR;
+    wxString cmake_bindir = wxString::FromAscii(cmake_bindir_str);
     launchercfg_s.get_list_on_start = 1;
     launchercfg_s.show_blocked_servers = 0;
     launchercfg_s.wad_paths = wxGetCwd();
-    launchercfg_s.odamex_directory = wxGetCwd();
+    launchercfg_s.odamex_directory = cmake_bindir;
 
     m_LstCtrlServers = XRCCTRL(*this, "Id_LstCtrlServers", LstOdaServerList);
     m_LstCtrlPlayers = XRCCTRL(*this, "Id_LstCtrlPlayers", LstOdaPlayerList);