Skip to content

Commit

Permalink
Release 2.12.2 (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox authored Mar 27, 2023
2 parents 27614f5 + 1049636 commit 77dc492
Show file tree
Hide file tree
Showing 41 changed files with 820 additions and 685 deletions.
52 changes: 2 additions & 50 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ jobs:
if: steps.cache-bds-lib.outputs.cache-hit != 'true'
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: |
mkdir LiteLoader\lib
cd Tools
LibraryBuilder.exe Server
mkdir ..\LiteLoader\lib
move bedrock_server_api.lib ..\LiteLoader\lib
move bedrock_server_var.lib ..\LiteLoader\lib
LLPeEditor.exe -l --pdb Server/bedrock_server.pdb -o ../LiteLoader/lib
shell: cmd

- name: Set LITELOADER_VERSION_COMMIT_SHA
Expand Down Expand Up @@ -133,52 +131,6 @@ jobs:
${{ github.workspace }}\build\output\plugins\LiteLoader\ResourcePacks\LiteLoaderBDS-CUI.tar
${{ github.workspace }}\build\output\plugins\LiteLoader\PermissionAPI.dll
- name: Upload PeEditor
uses: actions/upload-artifact@v3.1.0
with:
name: PeEditor
path: ${{ github.workspace }}\build\output\LLPeEditor.exe

- name: Upload PreLoader
uses: actions/upload-artifact@v3.1.0
with:
name: PreLoader
path: ${{ github.workspace }}\build\output\LLPreLoader.dll

- name: Upload LiteLoader
uses: actions/upload-artifact@v3.1.0
with:
name: LiteLoader
path: |
${{ github.workspace }}\build\output\LiteLoader.dll
${{ github.workspace }}\build\output\plugins\lib\*.dll
${{ github.workspace }}\build\output\plugins\LiteLoader\LangPack\
${{ github.workspace }}\build\output\plugins\LiteLoader\7z\
${{ github.workspace }}\build\output\plugins\LiteLoader\CrashLogger_Daemon.exe
- name: Upload ScriptEngine
uses: actions/upload-artifact@v3.1.0
with:
name: ScriptEngine
path: |
${{ github.workspace }}\build\output\plugins\LiteLoader\LiteLoader.*.dll
${{ github.workspace }}\build\output\plugins\lib\*.zip
${{ github.workspace }}\build\output\plugins\lib\package.json
- name: Upload LLParticle
uses: actions/upload-artifact@v3.1.0
with:
name: LLParticle
path: |
${{ github.workspace }}\build\output\plugins\LiteLoader\ParticleAPI.dll
${{ github.workspace }}\build\output\plugins\LiteLoader\ResourcePacks\LiteLoaderBDS-CUI.tar
- name: Upload LLPermission
uses: actions/upload-artifact@v3.1.0
with:
name: LLPermission
path: ${{ github.workspace }}\build\output\plugins\LiteLoader\PermissionAPI.dll

- name: Upload PDB files
uses: actions/upload-artifact@v3.1.0
with:
Expand Down
54 changes: 3 additions & 51 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ jobs:
if: steps.cache-bds-lib.outputs.cache-hit != 'true'
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: |
mkdir LiteLoader\lib
cd Tools
LibraryBuilder.exe Server
mkdir ..\LiteLoader\lib
move bedrock_server_api.lib ..\LiteLoader\lib
move bedrock_server_var.lib ..\LiteLoader\lib
LLPeEditor.exe -l --pdb Server/bedrock_server.pdb -o ../LiteLoader/lib
shell: cmd

- name: Set LITELOADER_VERSION_COMMIT_SHA
Expand Down Expand Up @@ -159,52 +157,6 @@ jobs:
${{ github.workspace }}\build\output\plugins\LiteLoader\ResourcePacks\LiteLoaderBDS-CUI.tar
${{ github.workspace }}\build\output\plugins\LiteLoader\PermissionAPI.dll
- name: Upload PeEditor
uses: actions/upload-artifact@v3.1.0
with:
name: PeEditor
path: ${{ github.workspace }}\build\output\LLPeEditor.exe

- name: Upload PreLoader
uses: actions/upload-artifact@v3.1.0
with:
name: PreLoader
path: ${{ github.workspace }}\build\output\LLPreLoader.dll

- name: Upload LiteLoader
uses: actions/upload-artifact@v3.1.0
with:
name: LiteLoader
path: |
${{ github.workspace }}\build\output\LiteLoader.dll
${{ github.workspace }}\build\output\plugins\lib\*.dll
${{ github.workspace }}\build\output\plugins\LiteLoader\LangPack\
${{ github.workspace }}\build\output\plugins\LiteLoader\7z\
${{ github.workspace }}\build\output\plugins\LiteLoader\CrashLogger_Daemon.exe
- name: Upload ScriptEngine
uses: actions/upload-artifact@v3.1.0
with:
name: ScriptEngine
path: |
${{ github.workspace }}\build\output\plugins\LiteLoader\LiteLoader.*.dll
${{ github.workspace }}\build\output\plugins\lib\*.zip
${{ github.workspace }}\build\output\plugins\lib\package.json
- name: Upload LLParticle
uses: actions/upload-artifact@v3.1.0
with:
name: LLParticle
path: |
${{ github.workspace }}\build\output\plugins\LiteLoader\ParticleAPI.dll
${{ github.workspace }}\build\output\plugins\LiteLoader\ResourcePacks\LiteLoaderBDS-CUI.tar
- name: Upload LLPermission
uses: actions/upload-artifact@v3.1.0
with:
name: LLPermission
path: ${{ github.workspace }}\build\output\plugins\LiteLoader\PermissionAPI.dll

- name: Upload PDB files
uses: actions/upload-artifact@v3.1.0
with:
Expand All @@ -229,7 +181,7 @@ jobs:
cd build/
zip -9r LiteLoaderBDS.zip LiteLoaderBDS/*
zip -9r PDB.zip PDB/*
zip -9r Modules.zip PeEditor PreLoader LiteLoader ScriptEngine LLParticle LLPermission
zip -9r Modules.zip PreLoader LiteLoader ScriptEngine LLParticle LLPermission
shell: bash

- name: Create release
Expand Down
1 change: 0 additions & 1 deletion CMake/PackSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ add_custom_command(
TARGET PackSDK POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LiteLoader_SOURCE_DIR}/include/llapi ${CMAKE_BINARY_DIR}/sdk/include/llapi
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LiteLoader_SOURCE_DIR}/third-party/include ${CMAKE_BINARY_DIR}/sdk/include
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Tools/LibraryBuilder.exe ${CMAKE_BINARY_DIR}/sdk/tools/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Tools/LLPeEditor.exe ${CMAKE_BINARY_DIR}/sdk/tools/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Tools/SDK-submodule-add.cmd ${CMAKE_BINARY_DIR}/sdk/tools/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Tools/SDK-submodule-update.cmd ${CMAKE_BINARY_DIR}/sdk/tools/
Expand Down
34 changes: 17 additions & 17 deletions LLPreLoader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ set(CMAKE_BUILD_TYPE Release)
add_definitions(-D"NDEBUG" -D"_WINDOWS" -D"_USRDLL" -D"_WINDLL" -D"_UNICODE" -D"UNICODE")

add_compile_options(
/permissive- /GS /GL /W0 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise
/errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /FC /EHsc /nologo /diagnostics:column
/permissive- /GS /GL /W0 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise
/errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /FC /EHsc /nologo /diagnostics:column
)

add_link_options(
/MANIFEST /LTCG:incremental /NXCOMPAT /DEBUG /DLL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO
/SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
/MANIFEST /LTCG /NXCOMPAT /DEBUG /DLL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO
/SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
)

aux_source_directory(${PROJECT_SOURCE_DIR}/third-party/rawpdb DIR_LIB_SRCS)
Expand All @@ -22,24 +22,24 @@ aux_source_directory(${PROJECT_SOURCE_DIR}/include PROJECT_INCLUDES)

add_library(LLPreLoader SHARED ${PROJECT_INCLUDES} ${PROJECT_SRCS} ${DIR_LIB_SRCS})
target_link_libraries(
LLPreLoader SymDBHelper Demangler
"${LiteLoader_SOURCE_DIR}/third-party/lib/detours/detours.lib"
LLPreLoader SymDBHelper Demangler
"${LiteLoader_SOURCE_DIR}/third-party/lib/detours/detours.lib"
)

target_include_directories(
LLPreLoader
PRIVATE ${LiteLoader_SOURCE_DIR}/include
PRIVATE ${LiteLoader_SOURCE_DIR}/third-party/include
PRIVATE ${PROJECT_SOURCE_DIR}/include
PRIVATE ${PROJECT_SOURCE_DIR}/third-party
PRIVATE ${Demangler_SOURCE_DIR}/include
LLPreLoader
PRIVATE ${LiteLoader_SOURCE_DIR}/include
PRIVATE ${LiteLoader_SOURCE_DIR}/third-party/include
PRIVATE ${PROJECT_SOURCE_DIR}/include
PRIVATE ${PROJECT_SOURCE_DIR}/third-party
PRIVATE ${Demangler_SOURCE_DIR}/include
)

# Copy the dll and pdb to the output directory
add_custom_command(
TARGET LLPreLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LLPreLoader> ${CMAKE_BINARY_DIR}/output/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LLPreLoader> ${CMAKE_BINARY_DIR}/pdb/
COMMENT "Copying dll and pdb to output directory"
VERBATIM
TARGET LLPreLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LLPreLoader> ${CMAKE_BINARY_DIR}/output/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LLPreLoader> ${CMAKE_BINARY_DIR}/pdb/
COMMENT "Copying dll and pdb to output directory"
VERBATIM
)
109 changes: 55 additions & 54 deletions LiteLoader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_BUILD_TYPE Release) # Always uses Release mode to build BDS plugin for ABI Compatibility

file(
GLOB_RECURSE SRC_FILES
${PROJECT_SOURCE_DIR}/third-party/include/*.h
${PROJECT_SOURCE_DIR}/third-party/include/*.hpp
${PROJECT_SOURCE_DIR}/include/*.h
${PROJECT_SOURCE_DIR}/include/*.hpp
${PROJECT_SOURCE_DIR}/src/*.cpp
${PROJECT_SOURCE_DIR}/src/*.hpp
${PROJECT_SOURCE_DIR}/src/*.h
${PROJECT_SOURCE_DIR}/src/*.rc
GLOB_RECURSE SRC_FILES
${PROJECT_SOURCE_DIR}/third-party/include/*.h
${PROJECT_SOURCE_DIR}/third-party/include/*.hpp
${PROJECT_SOURCE_DIR}/include/*.h
${PROJECT_SOURCE_DIR}/include/*.hpp
${PROJECT_SOURCE_DIR}/src/*.cpp
${PROJECT_SOURCE_DIR}/src/*.hpp
${PROJECT_SOURCE_DIR}/src/*.h
${PROJECT_SOURCE_DIR}/src/*.rc
)

# third-party source files
Expand All @@ -25,80 +25,81 @@ add_library(LiteLoader SHARED ${SRC_FILES} ${THIRD_PARTY_SRC_FILES})
string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

target_compile_options(
LiteLoader
PRIVATE /permissive- /MD /MP /analyze:external- /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /FC /nologo /Ot /diagnostics:column /utf-8
LiteLoader
PRIVATE /permissive- /MD /MP /analyze:external- /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /FC /nologo /Ot /diagnostics:column /utf-8
)

target_compile_definitions(
LiteLoader
PRIVATE -DUNICODE -DNDEBUG -DLITELOADER_EXPORTS -DWIN32_LEAN_AND_MEAN -DCPPHTTPLIB_OPENSSL_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -D_USRDLL -D_AMD64_ -DNOMINMAX
LiteLoader
PRIVATE -DUNICODE -DNDEBUG -DLITELOADER_EXPORTS -DWIN32_LEAN_AND_MEAN -DCPPHTTPLIB_OPENSSL_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -D_USRDLL -D_AMD64_ -DNOMINMAX
)

# use delayload to import BDS APIs manually(bedrock_server.dll does not need to exist)
target_link_options(
LiteLoader
PRIVATE /MANIFEST /LTCG:incremental /NXCOMPAT /DEBUG:FULL /DLL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 /DELAYLOAD:bedrock_server.dll
LiteLoader
PRIVATE /MANIFEST /LTCG /NXCOMPAT /DEBUG:FULL /DLL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 /DELAYLOAD:bedrock_server.dll
)

target_link_libraries(
LiteLoader
"${PROJECT_SOURCE_DIR}/third-party/lib/leveldb/leveldb.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/openssl/libcrypto.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/openssl/libssl.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/SQLiteCpp/SQLiteCpp.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/SQLiteCpp/sqlite3.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/mysql/mysqlclient.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/compact_enc_det/ced.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dyncall_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dyncallback_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dynload_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dbghelp/dbghelp.lib"
# Please make sure that the BDS APIs ImportLibrary is at the bottom of the list to ensure proper linking.
"${PROJECT_SOURCE_DIR}/Lib/bedrock_server_api.lib"
"${PROJECT_SOURCE_DIR}/Lib/bedrock_server_var.lib"
LLPreLoader
LiteLoader
"${PROJECT_SOURCE_DIR}/third-party/lib/leveldb/leveldb.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/openssl/libcrypto.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/openssl/libssl.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/SQLiteCpp/SQLiteCpp.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/SQLiteCpp/sqlite3.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/mysql/mysqlclient.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/compact_enc_det/ced.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dyncall_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dyncallback_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dyncall/dynload_s.lib"
"${PROJECT_SOURCE_DIR}/third-party/lib/dbghelp/dbghelp.lib"

# Please make sure that the BDS APIs ImportLibrary is at the bottom of the list to ensure proper linking.
"${PROJECT_SOURCE_DIR}/Lib/bedrock_server_api.lib"
"${PROJECT_SOURCE_DIR}/Lib/bedrock_server_var.lib"
LLPreLoader
)

target_include_directories(
LiteLoader SYSTEM
PRIVATE ${PROJECT_SOURCE_DIR}/third-party/include
LiteLoader SYSTEM
PRIVATE ${PROJECT_SOURCE_DIR}/third-party/include
)

target_include_directories(
LiteLoader
PRIVATE ${PROJECT_SOURCE_DIR}/include/
PRIVATE ${CMAKE_SOURCE_DIR}
LiteLoader
PRIVATE ${PROJECT_SOURCE_DIR}/include/
PRIVATE ${CMAKE_SOURCE_DIR}
)

add_custom_command(
TARGET LiteLoader PRE_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/scripts/PrepareLibraries.cmd ${CMAKE_SOURCE_DIR}
TARGET LiteLoader PRE_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/scripts/PrepareLibraries.cmd ${CMAKE_SOURCE_DIR}
)

# Copy the built DLL and PDB to the output directory
add_custom_command(
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/output/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/pdb/
COMMENT "Copying LiteLoader DLL and PDB to output directory"
VERBATIM
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/output/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/pdb/
COMMENT "Copying LiteLoader DLL and PDB to output directory"
VERBATIM
)

# Copy the built lib to the SDK directory
add_custom_command(
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_LINKER_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/sdk/lib/
COMMENT "Copying LiteLoader Lib to SDK directory"
VERBATIM
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_LINKER_FILE:LiteLoader> ${CMAKE_BINARY_DIR}/sdk/lib/
COMMENT "Copying LiteLoader Lib to SDK directory"
VERBATIM
)

# copy target DLL and PDB to local bds dev directory
if(NOT "${BDS_LOCAL_DEV_ENVIRONMENT_DIR}" STREQUAL "")
add_custom_command(
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LiteLoader> ${BDS_LOCAL_DEV_ENVIRONMENT_DIR}/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LiteLoader> ${BDS_LOCAL_DEV_ENVIRONMENT_DIR}/plugins/LiteLoader/pdb/
COMMENT "Copying ${PROJECT_NAME} DLL and PDB to local bds dev directory"
VERBATIM
)
add_custom_command(
TARGET LiteLoader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:LiteLoader> ${BDS_LOCAL_DEV_ENVIRONMENT_DIR}/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:LiteLoader> ${BDS_LOCAL_DEV_ENVIRONMENT_DIR}/plugins/LiteLoader/pdb/
COMMENT "Copying ${PROJECT_NAME} DLL and PDB to local bds dev directory"
VERBATIM
)
endif()
2 changes: 1 addition & 1 deletion LiteLoader/include/liteloader/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define LITELOADER_VERSION_MAJOR 2
#define LITELOADER_VERSION_MINOR 12
#define LITELOADER_VERSION_REVISION 1
#define LITELOADER_VERSION_REVISION 2
#define LITELOADER_VERSION_COMMIT_SHA UNKNOWN
#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_DEV
#define LITELOADER_VERSION_STATUS_VERSION 0
Expand Down
Loading

0 comments on commit 77dc492

Please sign in to comment.