mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 09:05:46 +00:00
Add fixes to webapp
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -35,4 +35,7 @@ func Tesses.CrossLang.Shell.WebAppTest(dd)
|
||||
|
||||
|
||||
Net.Http.ListenSimpleWithLoop(res, port);
|
||||
|
||||
res.Close();
|
||||
return 0;
|
||||
}
|
||||
@@ -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}.");
|
||||
|
||||
Reference in New Issue
Block a user