Get process betterGet shell somewhat working

This commit is contained in:
2025-06-26 17:19:51 -05:00
parent e4f75b69a6
commit 55408a3f1b
9 changed files with 349 additions and 48 deletions

View File

@@ -7,6 +7,7 @@
#include <windows.h>
#include "TessesFramework/Filesystem/VFSFix.hpp"
#include "TessesFramework/Text/StringConverter.hpp"
using namespace Tesses::Framework::Text::StringConverter;
#endif
#if !defined(_WIN32)
@@ -120,8 +121,9 @@ namespace Tesses::Framework::Platform::Environment
VFSPath GetRealExecutablePath(VFSPath realPath)
{
using namespace Tesses::Framework::Http;
if(!realPath.relative) return realPath.MakeAbsolute();
if(!realPath.relative) return realPath;
if(LocalFS.FileExists(realPath)) return realPath.MakeAbsolute();
const char* path = std::getenv("PATH");
#if defined(_WIN32)
@@ -216,9 +218,9 @@ namespace Tesses::Framework::Platform::Environment
}
FreeEnvironmentStringsW(environ0);
#else
for(char** envthing = environ; envthing != NULL; envthing++)
for(char** envthing = environ; *envthing != NULL; envthing++)
{
//if(*envthing == NULL) break;
auto items = Http::HttpUtils::SplitString(*envthing,"=",2);
if(items.size() == 2)
{