2018-01-05 02:23:49 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace singletons {
|
|
|
|
|
|
|
|
class PathManager
|
|
|
|
{
|
2018-04-27 22:11:19 +02:00
|
|
|
PathManager(int argc, char **argv);
|
2018-01-05 02:23:49 +01:00
|
|
|
|
2018-06-13 13:27:10 +02:00
|
|
|
public:
|
|
|
|
static void initInstance(int argc, char **argv);
|
|
|
|
static PathManager *getInstance();
|
|
|
|
|
2018-04-14 15:32:41 +02:00
|
|
|
// %APPDATA%/chatterino or ExecutablePath for portable mode
|
2018-01-05 02:23:49 +01:00
|
|
|
QString settingsFolderPath;
|
2018-04-14 15:32:41 +02:00
|
|
|
|
|
|
|
// %APPDATA%/chatterino/Custom or ExecutablePath/Custom for portable mode
|
2018-01-05 02:23:49 +01:00
|
|
|
QString customFolderPath;
|
2018-04-14 15:32:41 +02:00
|
|
|
|
|
|
|
// %APPDATA%/chatterino/Cache or ExecutablePath/Cache for portable mode
|
2018-01-19 22:45:33 +01:00
|
|
|
QString cacheFolderPath;
|
2018-01-28 14:23:55 +01:00
|
|
|
|
2018-06-06 20:30:11 +02:00
|
|
|
// Default folder for logs. %APPDATA%/chatterino/Logs or ExecutablePath/Logs for portable mode
|
2018-01-28 14:23:55 +01:00
|
|
|
QString logsFolderPath;
|
|
|
|
|
2018-04-20 00:15:57 +02:00
|
|
|
QString appPathHash;
|
|
|
|
|
2018-01-28 14:23:55 +01:00
|
|
|
bool createFolder(const QString &folderPath);
|
2018-05-28 18:25:19 +02:00
|
|
|
bool isPortable();
|
|
|
|
|
|
|
|
private:
|
2018-06-13 13:27:10 +02:00
|
|
|
static PathManager *instance;
|
2018-05-28 18:25:19 +02:00
|
|
|
bool portable;
|
2018-01-05 02:23:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace singletons
|
|
|
|
} // namespace chatterino
|