Skip to content

Commit

Permalink
把语言文件添加进打包文件
Browse files Browse the repository at this point in the history
  • Loading branch information
quizhizhe committed Apr 24, 2022
1 parent eb54822 commit f43d704
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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}")
Expand Down
18 changes: 12 additions & 6 deletions tools/package/npack.py
Original file line number Diff line number Diff line change
@@ -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'
]


Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit f43d704

Please sign in to comment.