Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ~/.config/flobby and ~/.cache/flobby
~./config/ and ~/.cache/ can be overridden by XDG_CONFIG_HOME and XDG_CACHE_HOME.
- Loading branch information
Showing
29 changed files
with
191 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
~/.config/flobby/ | ||
friend list | ||
map window showing big map image, 512x512 | ||
commands in all chat windows | ||
single player game | ||
implement game hosting | ||
|
||
? link statically to pr-downloader lib | ||
? freeimage instead of imagemagick | ||
? load chat history | ||
? quick find in StringTable, e.g. press C key to show first entry beginning with a C, ignore ^[.*] also maybe | ||
? handle FORCEQUITBATTLE | ||
? battle preview (lower left) do not show host in player list, count host as a player if not bot | ||
? extractSentence shall accept "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include "FlobbyDirs.h" | ||
|
||
#include <boost/filesystem.hpp> | ||
#include <cstring> | ||
#include <cstdlib> | ||
#include <cassert> | ||
|
||
static std::string configDir_; | ||
static std::string cacheDir_; | ||
|
||
void initDirs() | ||
{ | ||
const char* home = ::getenv("HOME"); | ||
assert(home); | ||
|
||
const char* configHome = ::getenv("XDG_CONFIG_HOME"); | ||
if (configHome && ::strlen(configHome) > 0) | ||
{ | ||
configDir_ = configHome; | ||
} | ||
else | ||
{ | ||
configDir_ = home; | ||
configDir_ += "/.config"; | ||
} | ||
configDir_ += "/flobby/"; | ||
boost::filesystem::create_directories(configDir_); | ||
|
||
const char* cacheHome = ::getenv("XDG_CACHE_HOME"); | ||
if (cacheHome && ::strlen(cacheHome) > 0) | ||
{ | ||
configDir_ = cacheHome; | ||
} | ||
else | ||
{ | ||
cacheDir_ = home; | ||
cacheDir_ += "/.cache"; | ||
} | ||
cacheDir_ += "/flobby/"; | ||
boost::filesystem::create_directories(cacheDir_); | ||
} | ||
|
||
std::string const& configDir() | ||
{ | ||
assert(!configDir_.empty()); | ||
return configDir_; | ||
} | ||
|
||
std::string const& cacheDir() | ||
{ | ||
assert(!cacheDir_.empty()); | ||
return cacheDir_; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
void initDirs(); | ||
|
||
// return values below ends with '/' | ||
std::string const& configDir(); | ||
std::string const& cacheDir(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
da9544f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move settings:
$ cp ~/.fltk/cleanrock/flobby.prefs ~/.config/flobby/flobby.prefs
Move map cache files:
$ cp ~/.spring/flobby/cache/* ~/.cache/flobby/map/