1 Commits
6 changed files with 37 additions and 19 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ on:
- 'v*'
env:
TF_VERSION: 0.0.11
TF_VERSION: 0.0.12
PACKAGE_AND_BREW: ${{ secrets.PACKAGE_AND_BREW }}
VERSION: ${{ gitea.ref_name }}
RESULT_IMAGE_NAME: tesses50/crosslang
+3
View File
@@ -1,5 +1,8 @@
# Changelog
## 0.0.14
Rebase on tessesframework 0.0.12, add offline updating of the shell
## 0.0.13
Fix the event loop so it isn't 100% CPU utilization
+1 -1
View File
@@ -5,7 +5,7 @@ set(CROSSLANG_STATIC ${TESSESFRAMEWORK_STATIC} CACHE INTERNAL "For CrossLang" FO
FetchContent_Declare(
TessesFramework
GIT_REPOSITORY https://git.tesses.org/tesses50/tessesframework.git
GIT_TAG 7649a1ad4c4fc230c96bcf044fd36f6cef1671be
GIT_TAG f6f81bf9099e672300a0cd51c3cb0f1c2d1e54e7
)
set(TESSESFRAMEWORK_ENABLE_EXAMPLES OFF)
FetchContent_MakeAvailable(TessesFramework)
+1 -1
View File
@@ -1,3 +1,3 @@
set(CROSSLANG_MAJOR_VERSION 0)
set(CROSSLANG_MINOR_VERSION 0)
set(CROSSLANG_PATCH_VERSION 13)
set(CROSSLANG_PATCH_VERSION 14)
+28 -15
View File
@@ -112,24 +112,37 @@ TObject CrossLangShell(GCList &ls, std::vector<std::string> &argv) {
auto subdir =
std::make_shared<Tesses::Framework::Filesystem::SubdirFilesystem>(
Tesses::Framework::Filesystem::LocalFS, dir);
HttpRequest req;
req.followRedirects = true;
req.url = "https://redirect.tesses.net/crosslang-shell";
req.method = "GET";
HttpResponse resp(req);
if (resp.statusCode == StatusCode::OK) {
auto strm = resp.ReadAsStream();
CrossLang::CrossArchiveExtract(strm, subdir);
if (argv.size() == 2) {
HttpRequest req;
req.followRedirects = true;
req.url = "https://redirect.tesses.net/crosslang-shell";
req.method = "GET";
HttpResponse resp(req);
if (resp.statusCode == StatusCode::OK) {
auto strm = resp.ReadAsStream();
CrossLang::CrossArchiveExtract(strm, subdir);
return (int64_t)0;
return (int64_t)0;
} else {
std::cout << "Error when fetching the script error: "
<< std::to_string(resp.statusCode) << " "
<< HttpUtils::StatusCodeString(resp.statusCode)
<< std::endl;
return (int64_t)1;
}
} else {
std::cout << "Error when fetching the script error: "
<< std::to_string(resp.statusCode) << " "
<< HttpUtils::StatusCodeString(resp.statusCode)
<< std::endl;
return (int64_t)1;
if (Tesses::Framework::Filesystem::LocalFS->FileExists(argv[2])) {
auto strm = Tesses::Framework::Filesystem::LocalFS->OpenFile(
argv[2], "rb");
CrossLang::CrossArchiveExtract(strm, subdir);
return (int64_t)0;
} else {
Tesses::Framework::Console::WriteView("Unable to open file \"");
Tesses::Framework::Console::WriteView(argv[2]);
Tesses::Framework::Console::WriteLineView("\"");
return (int64_t)1;
}
}
return (int64_t)0;
}
if (!Tesses::Framework::Filesystem::LocalFS->RegularFileExists(filename)) {
+3 -1
View File
@@ -85,7 +85,9 @@ int main(int argc, char **argv) {
"file, used to be crossdump");
Console::WriteLine("vm: interpert bytecode file, "
"used to be crossvm");
Console::WriteLine("update-shell: update the shell");
Console::WriteLine(
"update-shell: update the shell (can update offline now "
"if you pass a crvm as another argument)");
Console::WriteLine(
"configdir: print the config directory");