Added portable app support

This commit is contained in:
2026-01-11 17:06:01 -06:00
parent 7dc4ad9b08
commit 2f5271f7c3
13 changed files with 760 additions and 6 deletions

View File

@@ -13,6 +13,7 @@
namespace Tesses::Framework
{
template<typename...TArgs>
class Event {
public:
@@ -90,6 +91,7 @@ namespace Tesses::Framework
extern EventList<uint64_t> OnItteraton;
std::optional<std::string> TF_GetCommandName();
void TF_Init();
void TF_InitWithConsole();
void TF_AllowPortable(std::string argv0);

View File

@@ -6,7 +6,23 @@ namespace Tesses::Framework::Platform::Environment
{
extern const char EnvPathSeperator;
struct PortableAppConfig {
std::optional<Tesses::Framework::Filesystem::VFSPath> desktop;
std::optional<Tesses::Framework::Filesystem::VFSPath> documents;
std::optional<Tesses::Framework::Filesystem::VFSPath> music;
std::optional<Tesses::Framework::Filesystem::VFSPath> pictures;
std::optional<Tesses::Framework::Filesystem::VFSPath> videos;
std::optional<Tesses::Framework::Filesystem::VFSPath> downloads;
std::optional<Tesses::Framework::Filesystem::VFSPath> user;
std::optional<Tesses::Framework::Filesystem::VFSPath> config;
std::optional<Tesses::Framework::Filesystem::VFSPath> state;
std::optional<Tesses::Framework::Filesystem::VFSPath> data;
std::optional<Tesses::Framework::Filesystem::VFSPath> cache;
std::optional<Tesses::Framework::Filesystem::VFSPath> temp;
};
extern PortableAppConfig portable_config;
namespace SpecialFolders {
Tesses::Framework::Filesystem::VFSPath GetTemp();