commit
b3679ba11a
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Check out files
|
- name: Check out files
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@ -35,10 +35,9 @@ jobs:
|
|||||||
lfs: false
|
lfs: false
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1.1.3
|
||||||
|
|
||||||
- name: Generate project files
|
- name: Generate project files
|
||||||
#run: tools/premake5 vs2022 --ci-build
|
|
||||||
run: tools/premake5 vs2022
|
run: tools/premake5 vs2022
|
||||||
|
|
||||||
- name: Set up problem matching
|
- name: Set up problem matching
|
||||||
@ -48,7 +47,7 @@ jobs:
|
|||||||
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=x64 build/h2-mod.sln
|
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=x64 build/h2-mod.sln
|
||||||
|
|
||||||
- name: Upload ${{matrix.configuration}} binaries
|
- name: Upload ${{matrix.configuration}} binaries
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3.1.0
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.configuration}} binaries
|
name: ${{matrix.configuration}} binaries
|
||||||
path: |
|
path: |
|
||||||
@ -56,7 +55,7 @@ jobs:
|
|||||||
build/bin/x64/${{matrix.configuration}}/h2-mod.pdb
|
build/bin/x64/${{matrix.configuration}}/h2-mod.pdb
|
||||||
|
|
||||||
- name: Upload ${{matrix.configuration}} data artifacts
|
- name: Upload ${{matrix.configuration}} data artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3.1.0
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.configuration}} data artifacts
|
name: ${{matrix.configuration}} data artifacts
|
||||||
path: |
|
path: |
|
||||||
@ -76,12 +75,12 @@ jobs:
|
|||||||
run: echo "FED_MASTER_PATH=${{ secrets.FED_MASTER_SSH_PATH_DEV }}" >> $GITHUB_ENV
|
run: echo "FED_MASTER_PATH=${{ secrets.FED_MASTER_SSH_PATH_DEV }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Download Release binaries
|
- name: Download Release binaries
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Release binaries
|
name: Release binaries
|
||||||
|
|
||||||
- name: Download Release data artifacts
|
- name: Download Release data artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Release data artifacts
|
name: Release data artifacts
|
||||||
path: data
|
path: data
|
||||||
|
16
premake5.lua
16
premake5.lua
@ -227,10 +227,12 @@ targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
|
|||||||
|
|
||||||
configurations {"Debug", "Release"}
|
configurations {"Debug", "Release"}
|
||||||
|
|
||||||
architecture "x64"
|
language "C++"
|
||||||
|
cppdialect "C++20"
|
||||||
|
|
||||||
|
architecture "x86_64"
|
||||||
platforms "x64"
|
platforms "x64"
|
||||||
|
|
||||||
buildoptions "/std:c++latest"
|
|
||||||
systemversion "latest"
|
systemversion "latest"
|
||||||
symbols "On"
|
symbols "On"
|
||||||
staticruntime "On"
|
staticruntime "On"
|
||||||
@ -321,13 +323,3 @@ resincludedirs {"$(ProjectDir)src"}
|
|||||||
|
|
||||||
group "Dependencies"
|
group "Dependencies"
|
||||||
dependencies.projects()
|
dependencies.projects()
|
||||||
|
|
||||||
rule "ProtobufCompiler"
|
|
||||||
display "Protobuf compiler"
|
|
||||||
location "./build"
|
|
||||||
fileExtension ".proto"
|
|
||||||
buildmessage "Compiling %(Identity) with protoc..."
|
|
||||||
buildcommands {'@echo off', 'path "$(SolutionDir)\\..\\tools"',
|
|
||||||
'if not exist "$(ProjectDir)\\src\\proto" mkdir "$(ProjectDir)\\src\\proto"',
|
|
||||||
'protoc --error_format=msvs -I=%(RelativeDir) --cpp_out=src\\proto %(Identity)'}
|
|
||||||
buildoutputs {'$(ProjectDir)\\src\\proto\\%(Filename).pb.cc', '$(ProjectDir)\\src\\proto\\%(Filename).pb.h'}
|
|
||||||
|
@ -86,15 +86,11 @@ namespace filesystem
|
|||||||
|
|
||||||
bool can_insert_path(const std::filesystem::path& path)
|
bool can_insert_path(const std::filesystem::path& path)
|
||||||
{
|
{
|
||||||
for (const auto& path_ : get_search_paths_internal())
|
const auto& paths = get_search_paths_internal();
|
||||||
|
return std::ranges::none_of(paths.cbegin(), paths.cend(), [path](const auto& elem)
|
||||||
{
|
{
|
||||||
if (path_ == path)
|
return elem == path;
|
||||||
{
|
});
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* sys_default_install_path_stub()
|
const char* sys_default_install_path_stub()
|
||||||
|
@ -50,9 +50,9 @@ namespace gsc
|
|||||||
std::unordered_map<scripting::script_function, unsigned int> functions;
|
std::unordered_map<scripting::script_function, unsigned int> functions;
|
||||||
std::optional<std::string> gsc_error;
|
std::optional<std::string> gsc_error;
|
||||||
|
|
||||||
char* allocate_buffer(size_t size)
|
char* allocate_buffer(std::uint32_t size)
|
||||||
{
|
{
|
||||||
return utils::hook::invoke<char*>(0x14061E680, size, 4, 1, 5);
|
return static_cast<char*>(game::PMem_AllocFromSource_NoDebug(size, 4, 1, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool read_scriptfile(const std::string& name, std::string* data)
|
bool read_scriptfile(const std::string& name, std::string* data)
|
||||||
@ -135,7 +135,7 @@ namespace gsc
|
|||||||
const auto script_size = script.size();
|
const auto script_size = script.size();
|
||||||
const auto buffer_size = script_size + stack.size() + 2;
|
const auto buffer_size = script_size + stack.size() + 2;
|
||||||
|
|
||||||
const auto buffer = allocate_buffer(buffer_size);
|
const auto buffer = allocate_buffer(static_cast<std::uint32_t>(buffer_size));
|
||||||
std::memcpy(buffer, script.data(), script_size);
|
std::memcpy(buffer, script.data(), script_size);
|
||||||
std::memcpy(&buffer[script_size], stack.data(), stack.size());
|
std::memcpy(&buffer[script_size], stack.data(), stack.size());
|
||||||
|
|
||||||
|
@ -133,6 +133,8 @@ namespace game
|
|||||||
WEAK symbol<unsigned int(int handle, unsigned int paramcount)> Scr_ExecThread{0x1405C6F40};
|
WEAK symbol<unsigned int(int handle, unsigned int paramcount)> Scr_ExecThread{0x1405C6F40};
|
||||||
WEAK symbol<unsigned int(void* func, int type, unsigned int name)> Scr_RegisterFunction{0x1405BC7B0};
|
WEAK symbol<unsigned int(void* func, int type, unsigned int name)> Scr_RegisterFunction{0x1405BC7B0};
|
||||||
|
|
||||||
|
WEAK symbol<void*(unsigned int size, unsigned int alignment, unsigned int type, int source)> PMem_AllocFromSource_NoDebug{0x14061E680};
|
||||||
|
|
||||||
WEAK symbol<unsigned int(unsigned int localId, const char* pos, unsigned int paramcount)> VM_Execute{0x1405C8DB0};
|
WEAK symbol<unsigned int(unsigned int localId, const char* pos, unsigned int paramcount)> VM_Execute{0x1405C8DB0};
|
||||||
|
|
||||||
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
|
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
|
||||||
|
Binary file not shown.
BIN
tools/protoc.exe
BIN
tools/protoc.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user