From 2260f6bf4feb62929e32a1bea9cd3f403aa034b1 Mon Sep 17 00:00:00 2001 From: Krzysztof Dermont Date: Fri, 20 Jun 2014 23:41:38 +0200 Subject: Big part of PhysFS support * removed -mod argument * removed -datadir argument * removed -lang argument * removed some dead ui code * added resource manager and file loaders (stream and SDL) * changed interface textures location to match new directory structure * removed CGameData for mod support * added PhysFS support --- src/app/system_linux.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/app/system_linux.cpp') diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp index 492af7d..e584cd1 100644 --- a/src/app/system_linux.cpp +++ b/src/app/system_linux.cpp @@ -121,31 +121,3 @@ std::string CSystemUtilsLinux::GetProfileFileLocation() return profileFile; } - -std::string CSystemUtilsLinux::GetSavegameDirectoryLocation() -{ - std::string savegameDir; - - // Determine savegame dir according to XDG Base Directory Specification - char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA"); - if (envXDG_DATA_HOME == NULL) - { - char *envHOME = getenv("HOME"); - if (envHOME == NULL) - { - savegameDir = "/tmp/colobot-savegame"; - } - else - { - savegameDir = std::string(envHOME) + "/.local/share/colobot"; - } - } - else - { - savegameDir = std::string(envXDG_DATA_HOME) + "/colobot"; - } - GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); - - return savegameDir; -} - -- cgit v1.2.3-1-g7c22 From 9a3cd67c3bb2f7d0d4b83f6a5ac8bbcfedf4207b Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 24 Jul 2014 23:38:13 +0200 Subject: Saving colobot.ini through physfs --- src/app/system_linux.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/app/system_linux.cpp') diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp index e584cd1..485d7c2 100644 --- a/src/app/system_linux.cpp +++ b/src/app/system_linux.cpp @@ -95,29 +95,29 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT (after->clockTime.tv_sec - before->clockTime.tv_sec) * 1000000000ll; } -std::string CSystemUtilsLinux::GetProfileFileLocation() +std::string CSystemUtilsLinux::GetSaveDir() { - std::string profileFile; - - // Determine profileFile according to XDG Base Directory Specification - char* envXDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME"); - if (envXDG_CONFIG_HOME == NULL) + std::string savegameDir; + + // Determine savegame dir according to XDG Base Directory Specification + char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA"); + if (envXDG_DATA_HOME == NULL) { char *envHOME = getenv("HOME"); if (envHOME == NULL) { - profileFile = "colobot.ini"; + savegameDir = "/tmp/colobot-save"; } else { - profileFile = std::string(envHOME) + "/.config/colobot.ini"; + savegameDir = std::string(envHOME) + "/.local/share/colobot"; } } else { - profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini"; + savegameDir = std::string(envXDG_DATA_HOME) + "/colobot"; } - GetLogger()->Trace("Profile configuration is %s\n", profileFile.c_str()); - - return profileFile; + GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); + + return savegameDir; } -- cgit v1.2.3-1-g7c22 From 6a1ceba8c0914691ebc873fd666e7cde1cffdb64 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 7 Sep 2014 19:26:06 +0200 Subject: Some cleaning up --- src/app/system_linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/app/system_linux.cpp') diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp index 485d7c2..837c03e 100644 --- a/src/app/system_linux.cpp +++ b/src/app/system_linux.cpp @@ -25,7 +25,7 @@ void CSystemUtilsLinux::Init() { m_zenityAvailable = true; - if (system("zenity --version") != 0) + if (system("zenity --version >& /dev/null") != 0) { m_zenityAvailable = false; GetLogger()->Warn("Zenity not available, will fallback to console users dialogs.\n"); @@ -98,7 +98,7 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT std::string CSystemUtilsLinux::GetSaveDir() { std::string savegameDir; - + // Determine savegame dir according to XDG Base Directory Specification char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA"); if (envXDG_DATA_HOME == NULL) @@ -118,6 +118,6 @@ std::string CSystemUtilsLinux::GetSaveDir() savegameDir = std::string(envXDG_DATA_HOME) + "/colobot"; } GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); - + return savegameDir; } -- cgit v1.2.3-1-g7c22 From 9f2d544b27171c89eceedbb83bfcb26f5702dadb Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 21 Sep 2014 21:28:59 +0200 Subject: Fix zenity version checking problems --- src/app/system_linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/app/system_linux.cpp') diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp index 837c03e..5a39679 100644 --- a/src/app/system_linux.cpp +++ b/src/app/system_linux.cpp @@ -25,7 +25,7 @@ void CSystemUtilsLinux::Init() { m_zenityAvailable = true; - if (system("zenity --version >& /dev/null") != 0) + if (system("zenity --version 1> /dev/null 2> /dev/null") != 0) { m_zenityAvailable = false; GetLogger()->Warn("Zenity not available, will fallback to console users dialogs.\n"); -- cgit v1.2.3-1-g7c22 From 9fd6cf54492cedd7f6231a0b1d0655120cb1c4d7 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 14 Oct 2014 15:11:37 +0200 Subject: Changed all occurences of PPC in the code to TerranovaTeam --- src/app/system_linux.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/app/system_linux.cpp') diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp index 492af7d..a10e371 100644 --- a/src/app/system_linux.cpp +++ b/src/app/system_linux.cpp @@ -1,19 +1,21 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsiteс.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ #include "app/system_linux.h" -- cgit v1.2.3-1-g7c22