Skip to content

Commit

Permalink
feat: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Aug 11, 2024
1 parent e136329 commit 95479b2
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ body:
- type: input
attributes:
label: Version
description: The version of the plugin you are using. (e.g. 1.0.0)
description: The version of the mod you are using. (e.g. 1.0.0)

- type: textarea
attributes:
Expand Down
8 changes: 4 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "${pluginName}",
"entry": "${pluginFile}",
"version": "${pluginVersion}",
"name": "${modName}",
"entry": "${modFile}",
"version": "${modVersion}",
"type": "native"
}
}
118 changes: 0 additions & 118 deletions scripts/after_build.lua

This file was deleted.

6 changes: 3 additions & 3 deletions src/core/BedrockBugFixes.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "BedrockBugFixes.h"

#include <ll/api/Config.h>
#include <ll/api/plugin/NativePlugin.h>
#include <ll/api/plugin/RegisterHelper.h>
#include <ll/api/mod/NativeMod.h>
#include <ll/api/mod/RegisterHelper.h>
#include <ll/api/utils/ErrorUtils.h>

namespace bbf {
Expand Down Expand Up @@ -60,4 +60,4 @@ bool BedrockBugFixes::unload() { return true; }

} // namespace bbf

LL_REGISTER_PLUGIN(bbf::BedrockBugFixes, bbf::instance);
LL_REGISTER_MOD(bbf::BedrockBugFixes, bbf::instance);
10 changes: 5 additions & 5 deletions src/core/BedrockBugFixes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Config.h"

#include <ll/api/plugin/NativePlugin.h>
#include <ll/api/mod/NativeMod.h>

namespace bbf {

Expand All @@ -11,9 +11,9 @@ class BedrockBugFixes {
public:
static BedrockBugFixes& getInstance();

BedrockBugFixes(ll::plugin::NativePlugin& self) : mSelf(self) {}
BedrockBugFixes(ll::mod::NativeMod& self) : mSelf(self) {}

[[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; }
[[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; }

[[nodiscard]] ll::Logger& getLogger() const { return getSelf().getLogger(); }

Expand All @@ -34,8 +34,8 @@ class BedrockBugFixes {
bool unload();

private:
ll::plugin::NativePlugin& mSelf;
std::optional<Config> mConfig;
ll::mod::NativeMod& mSelf;
std::optional<Config> mConfig;
};

} // namespace bbf
4 changes: 2 additions & 2 deletions src/core/MemoryOperators.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file will make your plugin use LeviLamina's memory operators by default.
// This improves the memory management of your plugin and is recommended to use.
// This file will make your mod use LeviLamina's memory operators by default.
// This improves the memory management of your mod and is recommended to use.

#define LL_MEMORY_OPERATORS

Expand Down
10 changes: 5 additions & 5 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"format_version": 2,
"tooth": "github.com/SurvivalApparatusCommunication/BedrockBugFixes",
"version": "0.1.4",
"version": "0.1.5",
"info": {
"name": "BedrockBugFixes",
"description": "fix bugs",
"author": "OEOTYAN",
"tags": [
"levilamina",
"plugin"
"mod"
]
},
"asset_url": "https://github.com/SurvivalApparatusCommunication/BedrockBugFixes/releases/download/v0.1.4/BedrockBugFixes-windows-x64.zip",
"asset_url": "https://github.com/SurvivalApparatusCommunication/BedrockBugFixes/releases/download/v0.1.5/BedrockBugFixes-windows-x64.zip",
"prerequisites": {
"github.com/LiteLDev/LeviLamina": ">=0.12.0"
"github.com/LiteLDev/LeviLamina": ">=0.13.4"
},
"files": {
"place": [
Expand All @@ -23,4 +23,4 @@
}
]
}
}
}
27 changes: 6 additions & 21 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
-- add_requires("levilamina x.x.x") for a specific version
-- add_requires("levilamina develop") to use develop version
-- please note that you should add bdslibrary yourself if using dev version
add_requires("levilamina")
add_requires("levilamina develop")
add_requires("levibuildscript")

if not has_config("vs_runtime") then
set_runtimes("MD")
end

target("BedrockBugFixes") -- Change this to your plugin name.
target("BedrockBugFixes") -- Change this to your mod name.
add_rules("@levibuildscript/linkrule")
add_rules("@levibuildscript/modpacker")
add_cxflags(
"/EHa",
"/utf-8",
Expand All @@ -27,25 +30,7 @@ target("BedrockBugFixes") -- Change this to your plugin name.
add_files("src/**.cpp")
add_includedirs("src")
add_packages("levilamina")
add_shflags("/DELAYLOAD:bedrock_server.dll") -- To use symbols provided by SymbolProvider.
set_exceptions("none") -- To avoid conflicts with /EHa.
set_exceptions("none")
set_kind("shared")
set_languages("c++20")
set_symbols("debug")
after_build(function (target)
local plugin_packer = import("scripts.after_build")

local tag = os.iorun("git describe --tags --abbrev=0 --always")
local major, minor, patch, suffix = tag:match("v(%d+)%.(%d+)%.(%d+)(.*)")
if not major then
print("Failed to parse version tag, using 0.0.0")
major, minor, patch = 0, 0, 0
end
local plugin_define = {
pluginName = target:name(),
pluginFile = path.filename(target:targetfile()),
pluginVersion = major .. "." .. minor .. "." .. patch,
}

plugin_packer.pack_plugin(target,plugin_define)
end)

0 comments on commit 95479b2

Please sign in to comment.