Ticket #868: atlas-xdg-2012-01-15.patch
File atlas-xdg-2012-01-15.patch, 2.0 KB (added by , 12 years ago) |
---|
-
0ad/source/tools/atlas/AtlasUI/Misc/DLLInterface.h
1 /* Copyright (C) 20 09Wildfire Games.1 /* Copyright (C) 2012 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * 4 4 * 0 A.D. is free software: you can redistribute it and/or modify … … 19 19 #define DLLINTERFACE_INCLUDED 20 20 21 21 #include <wchar.h> 22 #include "../../../../lib/sysdep/os.h" 22 23 23 24 namespace AtlasMessage { class MessagePasser; } 24 25 -
0ad/source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
1 /* Copyright (C) 20 09Wildfire Games.1 /* Copyright (C) 2012 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * 4 4 * 0 A.D. is free software: you can redistribute it and/or modify … … 187 187 if (! wxIsDebuggerRunning()) 188 188 wxHandleFatalExceptions(); 189 189 #endif 190 190 #if OS_UNIX && !OS_MACOSX 191 // This should actually be fixed in the wxWidgets file 192 // src/unix/stdpaths.cpp but since we're allowing for 193 // external wxWidgets and are not even supplying our own 194 // version we need to fix this here. 195 // Ensure we are in / (NOTE: ugly hack (see above)) 196 wxString configPath = wxT("/../../../../../../../../../../.."); 197 configPath += wxGetenv(wxT("XDG_CONFIG_HOME"))?wxGetenv(wxT("XDG_CONFIG_HOME")):wxFileName::GetHomeDir() + wxT("/.config"); 198 // 0ad specific config dir 199 configPath += wxT("/0ad/config/"); 200 201 // Initialise the global config file (XDG compatibility hack) 202 wxConfigBase::Set(new wxConfig(configPath + wxT("atlas.ini"), _T("Wildfire Games"))); 203 #else 191 204 // Initialise the global config file 192 205 wxConfigBase::Set(new wxConfig(_T("Atlas Editor"), _T("Wildfire Games"))); 206 #endif //OS_UNIX 193 207 194 208 if (! g_HasSetDataDirectory) 195 209 {