1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*!********************************************************************
Audacity: A Digital Audio Editor
PlatformCompatibilityWX.cpp
Matthieu Hodgkinson
Requires a running wxApp to work. For another UI framework you'll need to use
another source file.
**********************************************************************/
#include "PlatformCompatibility.h"
#include <wx/stdpaths.h>
#include <wx/utils.h>
std::string PlatformCompatibility::GetUserDataDir()
{
return wxStandardPaths::Get().GetUserDataDir().ToStdString();
}
std::string PlatformCompatibility::GetUserLocalDataDir()
{
return wxStandardPaths::Get().GetUserLocalDataDir().ToStdString();
}
std::string PlatformCompatibility::GetResourcesDir()
{
return wxStandardPaths::Get().GetResourcesDir().ToStdString();
}
std::string PlatformCompatibility::GetDataDir()
{
return wxStandardPaths::Get().GetDataDir().ToStdString();
}
std::string PlatformCompatibility::GetPluginsDir()
{
return wxStandardPaths::Get().GetPluginsDir().ToStdString();
}
std::string PlatformCompatibility::GetDocumentsDir()
{
return wxStandardPaths::Get().GetDocumentsDir().ToStdString();
}
std::string PlatformCompatibility::GetExecutablePath()
{
return wxStandardPaths::Get().GetExecutablePath().ToStdString();
}
std::string PlatformCompatibility::GetTempDir()
{
return wxStandardPaths::Get().GetTempDir().ToStdString();
}
std::string PlatformCompatibility::GetHomeDir()
{
return wxGetHomeDir().ToStdString();
}
|