Skip to content

Commit

Permalink
修改打包脚本,现在release中会包含pdb文件
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhxiao committed Feb 21, 2022
1 parent 227dcf0 commit 838d127
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ target_include_directories(${MOD_API_NAME}
target_link_libraries(${MOD_API_NAME} ${PROJECT_SOURCE_DIR}/api/lib/detours.lib)

####################这里是具体功能##########################
set(TRAPDOOR_VERSION 0.10.0)
set(TRAPDOOR_VERSION 0.10.2)
set(MCBE_VERSION 1.18.2.03)
set(BETA OFF)
set(TEST_NUMBER 1)
Expand Down
4 changes: 3 additions & 1 deletion api/language/lang/en_us
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ R"=====(
"command.tick.fw.desc": "Step the world [num] gt",
"command.tick.q.desc": "Query tick status",
"command.prof.desc": "Game performance analysis",
"command.prof.actor.desc": "Entities ticking prformance analysis",
"command.prof.actor.desc": "Entities ticking performance analysis",
"command.prof.chunk.desc": "Chunks ticking performance analysis",
"command.prof.pt.desc": "Pending tick performance analysis",
"command.mspt.desc": "Display Mspt and tps",
"tick.fz.set": "The world ticking has stopped",
"tick.r.set": "The world has been back to normal state",
Expand Down
2 changes: 2 additions & 0 deletions api/language/lang/zh_cn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ R"=====(
"command.tick.q.desc": "查询tick状态",
"command.prof.desc": "游戏性能分析",
"command.prof.actor.desc": "实体性能分析",
"command.prof.chunk.desc": "区块更新性能分析",
"command.prof.pt.desc": "计划刻(PendingTick)性能分析",
"command.mspt.desc": "显示Mspt和tps",
"tick.fz.set": "世界运行已经停止",
"tick.r.set": "世界已恢复初始状态",
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.18.2.03-0.10.2
- 新加`prof chunk`显示每个区块的卡顿情况(固定测量20gt)
- 新加 `prof pt`显示每个区块的计划刻(Pending tick)队列溢出情况(固定测量20gt)
- 修复`self`的东西方向错误(#72)
- 修复`os`的可能闪退(#71)



# 1.18.2.03-0.9.96
2022-02-05
- 如果配置文件不存在可以选择自动生成
Expand Down
2 changes: 1 addition & 1 deletion mod/tick/SimpleProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace mod {
}
trapdoor::MessageBuilder builder;
builder.textF(
"%zu chunks ticked,here are the cached pending tick size\n",
"%zu chunks ticked,here are the cached pending tick queue length\n",
this->chunkStat.counter.size());
for (int i = 0; i < count; i++) {
auto &d = data[i];
Expand Down
59 changes: 59 additions & 0 deletions tools/package/npack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import os
import zipfile

project_root_dir = 'C:/Users/xhy/dev/TrapDoor/'
build_dir = 'build/'
other_files = ['changelog.md',
'trapdoor-disclaimer.md',
'LICENSE'
]


def get_versions():
dll_dir = project_root_dir + build_dir
dll_files = []
for f in os.listdir(dll_dir):
if f.endswith('.dll'):
dll_files.append(f)
if len(dll_files) == 0:
input('warning: no valid files')
exit(0)

dll_files.sort()
tips = 'choose one to pack\n'
index = 0
for file in reversed(dll_files):
tips += '[' + str(index) + '] : ' + file+'\n'
index += 1
# print(tips)

idx = 0
if len(dll_files) > 1:
idx = input(tips)
idx = int(idx)
if idx < 0 or idx >= len(dll_files):
input('invalid files\n')
exit(0)

return dll_files[len(dll_files)-1-idx]


def pack(dll_file):
version = dll_file[:-4]
print('version is '+version)
print('begin packing...')
release_zip_file = zipfile.ZipFile(version + '.zip', 'w')
release_zip_file.write(project_root_dir + build_dir +
version + '.dll', arcname=version+'.dll')
release_zip_file.write(project_root_dir + build_dir +
version + '.pdb', arcname=version+'.pdb')
for other_file in other_files:
print('pack: ' + other_file)
release_zip_file.write(project_root_dir+other_file,
arcname='others/'+other_file)
release_zip_file.close()
input('success pack release:' + version+'.zip\n')


if __name__ == '__main__':
pack(get_versions())

0 comments on commit 838d127

Please sign in to comment.