mirror-chatterino2/src/singletons/Paths.hpp
nerix e377c30192
Add Crashpad Support on Windows (#4351)
* feat: crashpad on windows

* feat: inline it

* feat: more crashpad

* chore: remove qBreakpad

* fix: add mention to crashpad

* refactor: version string

* feat: add crashpad module

* refactor: build crashpad from source

* fix: minor adjustments

* chore: add changelog entry

* fix: formatting and include

* fix: format

* build: use flags similar to release profile

* ci: build with crashpad on windows

* ci: recurse submodules

* ci: always include crashpad

* fix: try 7z

for some reason zstd just doesn't run

* fix: wrong path for symbols

* fix: copy

pls don't build

* ci: use new cache key

* fix: missing pragma

* ci: add workflow without crashpad

* docs: elevate changelog entry

* fix: add link to cmake issue

* fix: windows include issue

Someone (crashpad) includes Windows.h before winsock2.h

* fix: working directory

* fix: another working directory
2023-02-12 20:36:58 +01:00

57 lines
1.3 KiB
C++

#pragma once
#include <boost/optional.hpp>
#include <QString>
namespace chatterino {
class Paths
{
public:
static Paths *instance;
Paths();
// Root directory for the configuration files. %APPDATA%/chatterino or
// ExecutablePath for portable mode
QString rootAppDataDirectory;
// Directory for settings files. Same as <appDataDirectory>/Settings
QString settingsDirectory;
// Directory for message log files. Same as <appDataDirectory>/Misc
QString messageLogDirectory;
// Directory for miscellaneous files. Same as <appDataDirectory>/Misc
QString miscDirectory;
// Directory for crashdumps. Same as <appDataDirectory>/Crashes
QString crashdumpDirectory;
// Hash of QCoreApplication::applicationFilePath()
QString applicationFilePathHash;
// Profile avatars for Twitch <appDataDirectory>/cache/twitch
QString twitchProfileAvatars;
bool createFolder(const QString &folderPath);
bool isPortable();
QString cacheDirectory();
private:
void initAppFilePathHash();
void initCheckPortable();
void initRootDirectory();
void initSubDirectories();
boost::optional<bool> portable_;
// Directory for cache files. Same as <appDataDirectory>/Misc
QString cacheDirectory_;
};
Paths *getPaths();
} // namespace chatterino