diff --git a/CMakeLists.txt b/CMakeLists.txt index 31fc89c..8fbd9d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,14 +3,14 @@ project(mod) set(CMAKE_CXX_STANDARD 17) #因为ABI原因这个项目只能msvc编译 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - add_compile_options(/wd4828 /wd4819 /Zi /EHsc /utf-8 /MP) - #set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ") - #set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF") + add_compile_options(/wd4828 /wd4819 /EHsc /utf-8) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF") else () message(this project don't support GNU gcc, please use MSVC instead) endif () -#set(CMAKE_BUILD_TYPE release) +set(CMAKE_BUILD_TYPE release) set(MOD_API_NAME trapdoor) @@ -62,8 +62,8 @@ target_include_directories(${MOD_API_NAME} target_link_libraries(${MOD_API_NAME} ${PROJECT_SOURCE_DIR}/api/lib/detours.lib) ####################这里是具体功能########################## -set(TRAPDOOR_VERSION 0.10.2) -set(MCBE_VERSION 1.18.12.01) +set(TRAPDOOR_VERSION 0.10.3) +set(MCBE_VERSION 1.18.30.04) set(BETA OFF) set(TEST_NUMBER 1) add_definitions(-DTD_VERSION="${TRAPDOOR_VERSION}") diff --git a/tools/package/npack.py b/tools/package/npack.py index 0cfb50e..321ccbb 100644 --- a/tools/package/npack.py +++ b/tools/package/npack.py @@ -1,11 +1,13 @@ import os import zipfile -project_root_dir = 'C:/Users/xhy/dev/TrapDoor/' -build_dir = 'build/' -other_files = ['changelog.md', - 'trapdoor-disclaimer.md', - 'LICENSE' +# project_root_dir = 'C:/Users/xhy/dev/TrapDoor/' +project_root_dir = os.path.abspath('../..') +build_dir = '/build/' +lang_dir = '/tools/package/lang/' +other_files = ['/changelog.md', + '/trapdoor-disclaimer.md', + '/LICENSE' ] @@ -47,10 +49,14 @@ def pack(dll_file): version + '.dll', arcname=version+'.dll') release_zip_file.write(project_root_dir + build_dir + version + '.pdb', arcname=version+'.pdb') + release_zip_file.write(project_root_dir + lang_dir + + 'zh_cn.json', arcname= 'trapdoor/lang/zh_cn.json') + release_zip_file.write(project_root_dir + lang_dir + + 'en_us.json', arcname= 'trapdoor/lang/en_us.json') for other_file in other_files: print('pack: ' + other_file) release_zip_file.write(project_root_dir+other_file, - arcname='others/'+other_file) + arcname='trapdoor/others/'+other_file) release_zip_file.close() input('success pack release:' + version+'.zip\n')