From d48770d5854726c62ac59da9bfe1d261c972840f Mon Sep 17 00:00:00 2001
From: twoone3l <3197653242@qq.com>
Date: Sun, 2 Jan 2022 09:02:26 +0800
Subject: [PATCH] fix build
---
.github/workflows/build.yml | 43 ++++++++++++++++++++++++++++++++++---
BDSpyrunner.vcxproj | 2 ++
mod/Tool.h | 1 -
3 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8bddaa36..88c66f6e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,16 +1,52 @@
-name: Build and Release
+name: Build and Release
on:
push:
tags: v*
jobs:
- build:
+ build_lib:
+ runs-on: windows-2022
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ repository: "LiteLDev/LiteLoaderBDS"
+
+ - name: Download Server
+ working-directory: ${{env.GITHUB_WORKSPACE}}
+ run: |
+ mkdir Tools/Server
+ ServerLink=$(curl -s https://raw.githubusercontent.com/LiteLDev/LiteLoaderBDS/main/LINK.txt)
+ curl -L -o Tools/Server/server.zip "$ServerLink"
+ unzip -q Tools/Server/server.zip -d Tools/Server/
+ shell: bash
+
+ - name: Build Library
+ working-directory: ${{env.GITHUB_WORKSPACE}}
+ run: |
+ cd Tools
+ LibraryBuilder.exe Server
+ shell: cmd
+
+ - name: Temporarily Save Libs
+ uses: actions/upload-artifact@v2
+ with:
+ name: libs
+ path: LiteLoader/Lib
+
+ build_pyr:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v2
+ - name: Retrieve Saved Libs
+ uses: actions/download-artifact@v2
+ with:
+ name: libs
+ path: SDK/Lib/
+
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
@@ -25,4 +61,5 @@ jobs:
with:
files: |
./x64/Release/BDSpyrunner.dll
- ./x64/Release/BDSpyrunner.pdb
\ No newline at end of file
+ ./x64/Release/BDSpyrunner.pdb
+
diff --git a/BDSpyrunner.vcxproj b/BDSpyrunner.vcxproj
index f883ec50..34facf78 100644
--- a/BDSpyrunner.vcxproj
+++ b/BDSpyrunner.vcxproj
@@ -46,6 +46,8 @@
NDEBUG;_AMD64_;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
true
stdcpp17
+ 4996;4471;4499
+ false
Console
diff --git a/mod/Tool.h b/mod/Tool.h
index 99b587d8..fdb7c03c 100644
--- a/mod/Tool.h
+++ b/mod/Tool.h
@@ -1,6 +1,5 @@
#pragma once
#pragma execution_character_set("utf-8")
-#pragma warning(disable:4996)
#include
#include