Add fixes to webapp

This commit is contained in:
2025-09-30 23:03:40 -05:00
parent 0b51a04bfa
commit 2d613e9aac
3 changed files with 14 additions and 4 deletions

View File

@@ -4,13 +4,13 @@ using namespace Tesses::Framework;
using namespace Tesses::CrossLang;
int main(int argc, char** argv)
{
TF_InitWithConsole();
std::string name = argv[0];
Tesses::Framework::Filesystem::LocalFilesystem fs;
Tesses::Framework::Filesystem::VFSPath exePath=fs.SystemToVFSPath(name);
Tesses::Framework::Filesystem::VFSPath exePath=Tesses::Framework::Filesystem::LocalFS->SystemToVFSPath(name);
exePath.MakeAbsolute();
TF_InitWithConsole();
GC gc;
gc.Start();
@@ -54,11 +54,16 @@ int main(int argc, char** argv)
svr.StartAccepting();
TF_RunEventLoop();
TDictionary* _dict;
TDictionary* _dict;
TClassObject* _co;
if(GetObjectHeap(res,_dict))
{
_dict->CallMethod(ls,"Close",{});
}
if(GetObjectHeap(res,_co))
{
_co->CallMethod(ls,"","Close",{});
}
TF_Quit();
}
else {

View File

@@ -35,4 +35,7 @@ func Tesses.CrossLang.Shell.WebAppTest(dd)
Net.Http.ListenSimpleWithLoop(res, port);
res.Close();
return 0;
}

View File

@@ -44,6 +44,8 @@ func Tesses.CrossLang.Shell.WebApp(dd)
Net.Http.ListenSimpleWithLoop(res, port);
res.Close();
return 0;
}
else {
Console.WriteLine($"Could not find web application with name {toolname}.");