From 0f5b9d44bbe0396b29b13a56de8159ecef172898 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Sat, 9 Mar 2024 23:24:58 +0800 Subject: [PATCH] chore: cut tooth.template.json into separate files --- .github/workflows/release.yml | 11 +++++------ tooth.lua.json | 31 +++++++++++++++++++++++++++++++ tooth.nodejs.json | 32 ++++++++++++++++++++++++++++++++ tooth.python.json | 31 +++++++++++++++++++++++++++++++ tooth.quickjs.json | 31 +++++++++++++++++++++++++++++++ xmake.lua | 12 ++++++------ 6 files changed, 136 insertions(+), 12 deletions(-) create mode 100644 tooth.lua.json create mode 100644 tooth.nodejs.json create mode 100644 tooth.python.json create mode 100644 tooth.quickjs.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c89ef62d..f2e197b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,9 +69,9 @@ jobs: strategy: matrix: backend: - # - libnode + - nodejs - lua - # - python310 + - python - quickjs steps: - uses: actions/checkout@v4 @@ -100,8 +100,7 @@ jobs: cd legacy-script-engine-${{ matrix.backend }} rm -rf legacy-script-engine-${{ matrix.backend }} mv ../release/legacy-script-engine-${{ matrix.backend }} . - cp ../tooth.template.json tooth.json - sed -i "s/\${engine}/${{ matrix.backend }}/g" tooth.json + cp ../tooth.${{ matrix.backend }}.json tooth.json git add . git commit -m "Release ${{ github.event.release.tag_name }}" git tag ${{ github.event.release.tag_name }} @@ -118,9 +117,9 @@ jobs: strategy: matrix: backend: - # - libnode + - nodejs - lua - # - python310 + - python - quickjs steps: - uses: actions/checkout@v4 diff --git a/tooth.lua.json b/tooth.lua.json new file mode 100644 index 00000000..f864bcc9 --- /dev/null +++ b/tooth.lua.json @@ -0,0 +1,31 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs", + "version": "0.4.3", + "info": { + "name": "LegacyScriptEngine with QuickJs backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.4.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.4.x", + "github.com/LiteLDev/LegacyMoney": "0.4.x", + "gitea.litebds.com/LiteLDev/quickjs-binaries": "3.10.11" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.9.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-quickjs/*", + "dest": "plugins/legacy-script-engine-quickjs/" + } + ] + } +} diff --git a/tooth.nodejs.json b/tooth.nodejs.json new file mode 100644 index 00000000..1c3d2dfe --- /dev/null +++ b/tooth.nodejs.json @@ -0,0 +1,32 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-nodejs", + "version": "0.4.3", + "info": { + "name": "LegacyScriptEngine with NodeJs backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.4.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.4.x", + "github.com/LiteLDev/LegacyMoney": "0.4.x", + "gitea.litebds.com/ShrBox/7-zip": "23.x", + "gitea.litebds.com/LiteLDev/node-binaries": "16.16.0" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.9.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-nodejs/*", + "dest": "plugins/legacy-script-engine-nodejs/" + } + ] + } +} diff --git a/tooth.python.json b/tooth.python.json new file mode 100644 index 00000000..98f5ff3c --- /dev/null +++ b/tooth.python.json @@ -0,0 +1,31 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-python", + "version": "0.4.3", + "info": { + "name": "LegacyScriptEngine with Python backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.4.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.4.x", + "github.com/LiteLDev/LegacyMoney": "0.4.x", + "gitea.litebds.com/LiteLDev/python-binaries": "3.10.11" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.9.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-python/*", + "dest": "plugins/legacy-script-engine-python/" + } + ] + } +} diff --git a/tooth.quickjs.json b/tooth.quickjs.json new file mode 100644 index 00000000..98f5ff3c --- /dev/null +++ b/tooth.quickjs.json @@ -0,0 +1,31 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-python", + "version": "0.4.3", + "info": { + "name": "LegacyScriptEngine with Python backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.4.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.4.x", + "github.com/LiteLDev/LegacyMoney": "0.4.x", + "gitea.litebds.com/LiteLDev/python-binaries": "3.10.11" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.9.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-python/*", + "dest": "plugins/legacy-script-engine-python/" + } + ] + } +} diff --git a/xmake.lua b/xmake.lua index 6cf236d4..d91dfbd4 100644 --- a/xmake.lua +++ b/xmake.lua @@ -59,10 +59,10 @@ target("legacy-script-engine") "/utf-8" ) add_defines( - "_HAS_CXX23=1", -- To enable C++23 features. - "CPPHTTPLIB_OPENSSL_SUPPORT", -- To enable SSL support for cpp-httplib. - "NOMINMAX", -- To avoid conflicts with std::min and std::max. - "UNICODE", -- To enable Unicode support. + "_HAS_CXX23=1", + "CPPHTTPLIB_OPENSSL_SUPPORT", + "NOMINMAX", + "UNICODE", "_AMD64_" ) add_files( @@ -91,9 +91,9 @@ target("legacy-script-engine") "toml++" ) add_shflags( - "/DELAYLOAD:bedrock_server.dll" -- To use forged symbols of SymbolProvider. + "/DELAYLOAD:bedrock_server.dll" ) - set_exceptions("none") -- To avoid conflicts with /EHa. + set_exceptions("none") set_kind("shared") set_languages("cxx20") set_symbols("debug")