Skip to content

Commit

Permalink
2.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed May 29, 2020
1 parent 7c07309 commit 16f727f
Show file tree
Hide file tree
Showing 101 changed files with 2,150 additions and 371 deletions.
9 changes: 9 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
更新记录
==========

2.7.3
------

1. 修复UE-CSV格式输出的一处空数据的崩溃BUG
2. 增加BUG上报说明
3. 修复启用多文件合并功能时,UE-CSV格式输出会输出多次Header的BUG
4. sample输出增加递归模式的UE-Csv
5. [实验性] UE-CSV格式输出的现在也支持plain模式了

2.7.2
------

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.xresloader</groupId>
<artifactId>xresloader</artifactId>
<version>2.7.2</version>
<version>2.7.3</version>
<packaging>jar</packaging>
<name>xresloader</name>

Expand Down
4 changes: 3 additions & 1 deletion sample/gen_sample_output.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ foreach ($proto_dir in "proto_v2", "proto_v3") {
"-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|arr_in_arr|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=arr_in_arr_cfg -m OutputFile=ArrInArrCfg.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config -m UeCfg-RecursiveMode=false",
"-t ue-json -o '$proto_dir/json' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|arr_in_arr|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=arr_in_arr_cfg -m OutputFile=ArrInArrCfg.json -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config",
"-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|upgrade_10001|3,1' -m 'DataSource=$XLSX_FILE|upgrade_10002|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfg.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config -m UeCfg-RecursiveMode=false",
"-t ue-json -o '$proto_dir/json' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|upgrade_10001|3,1' -m 'DataSource=$XLSX_FILE|upgrade_10002|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfg.json -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config"
"-t ue-json -o '$proto_dir/json' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|upgrade_10001|3,1' -m 'DataSource=$XLSX_FILE|upgrade_10002|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfg.json -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config",
"-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|arr_in_arr|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=arr_in_arr_cfg -m OutputFile=ArrInArrCfgRec.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/ConfigRec|Private/ConfigRec",
"-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m 'DataSource=$XLSX_FILE|upgrade_10001|3,1' -m 'DataSource=$XLSX_FILE|upgrade_10002|3,1' -m 'MacroSource=$XLSX_FILE|macro|2,1' -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfgRec.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/ConfigRec|Private/ConfigRec"
)
Write-Output "Write-Output '$(Join-String -Separator `n -InputObject $TASK_LINES)' | java `"-Dfile.encoding=UTF-8`" -client -jar `"$XRESLOADER`" --stdin --data-version 1.0.0.0"
Join-String -Separator "`n" -InputObject $TASK_LINES | java "-Dfile.encoding=UTF-8" -client -jar "$XRESLOADER" --stdin --data-version 1.0.0.0
Expand Down
2 changes: 2 additions & 0 deletions sample/gen_sample_output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ for proto_dir in proto_v2 proto_v3; do
-t ue-json -o '$proto_dir/json' -f '$proto_dir/kind.pb' -m DataSource='$XLSX_FILE'|arr_in_arr|3,1 -m MacroSource='$XLSX_FILE'|macro|2,1 -m ProtoName=arr_in_arr_cfg -m OutputFile=ArrInArrCfg.json -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config
-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m DataSource='$XLSX_FILE'|upgrade_10001|3,1 -m DataSource='$XLSX_FILE'|upgrade_10002|3,1 -m MacroSource='$XLSX_FILE'|macro|2,1 -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfg.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config -m UeCfg-RecursiveMode=false
-t ue-json -o '$proto_dir/json' -f '$proto_dir/kind.pb' -m DataSource='$XLSX_FILE'|upgrade_10001|3,1 -m DataSource='$XLSX_FILE'|upgrade_10002|3,1 -m MacroSource='$XLSX_FILE'|macro|2,1 -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfg.json -m KeyRow=2 -m UeCfg-CodeOutput=|Public/Config|Private/Config
-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m DataSource='$XLSX_FILE'|arr_in_arr|3,1 -m MacroSource='$XLSX_FILE'|macro|2,1 -m ProtoName=arr_in_arr_cfg -m OutputFile=ArrInArrCfgRec.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/ConfigRec|Private/ConfigRec
-t ue-csv -o '$proto_dir/csv' -f '$proto_dir/kind.pb' -m DataSource='$XLSX_FILE'|upgrade_10001|3,1 -m DataSource='$XLSX_FILE'|upgrade_10002|3,1 -m MacroSource='$XLSX_FILE'|macro|2,1 -m ProtoName=role_upgrade_cfg -m OutputFile=RoleUpgradeCfgRec.csv -m KeyRow=2 -m UeCfg-CodeOutput=|Public/ConfigRec|Private/ConfigRec
';
echo "Run with --stdin: $CMDS";
echo "$CMDS" | java -client -jar "$XRESLOADER" --stdin;
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/arr_in_arr_cfg.bin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

p
2.7.21.0.0.0"Gsha256:596e52aeeea5deb359b68cbe785e2ad04563610e106daeaff14bd5658fd4cf21*Test arr_in_arr_cfg��N-
2.7.31.0.0.0"Gsha256:596e52aeeea5deb359b68cbe785e2ad04563610e106daeaff14bd5658fd4cf21*Test arr_in_arr_cfg��N-
第一个-Aef 啦啦啦啦 嘞嘞嘞嘞-
第一个-Bop 嘟嘟嘟嘟 嚓嚓嚓嚓 �N �N �N*����2����2����2������N/
测试项-A�� biubiubiubiu 唰唰唰唰/
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/arr_in_arr_cfg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
data_ver = "1.0.0.0",
description = "Test arr_in_arr_cfg",
hash_code = "no hash code",
xres_ver = "2.7.2",
xres_ver = "2.7.3",
},
[2] = "arr_in_arr_cfg",
arr_in_arr_cfg = {
Expand Down
4 changes: 4 additions & 0 deletions sample/proto_v2/csv/ArrInArrCfgRec.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"Name","Id","Arr","TestPlainIntArr","TestPlainEnumArr","TestPlainMsg","TestPlainMsgArr"
"10001","10001","((StrArr=(""啦啦啦啦"",""嘞嘞嘞嘞""),IntArr=(101,102),Name=""第一个-A""),(StrArr=(""嘟嘟嘟嘟"",""嚓嚓嚓嚓""),IntArr=(111,112),Name=""第一个-B""))","(1,2,3)","(10001,10001,10001)","(TestId1=1,TestId2=2)","((TestId1=1,TestId2=2),(TestId1=3,TestId2=4),(TestId1=5,TestId2=6))"
"10002","10002","((StrArr=(""biubiubiubiu"",""唰唰唰唰""),IntArr=(201,202),Name=""测试项-A""),(StrArr=(""哦哦哦哦"",""哈哈哈哈""),IntArr=(211,212),Name=""测试项-B""))","(4,5,6)","(10101,10101,10101)","(TestId1=3,TestId2=4)","((TestId1=7,TestId2=8),(TestId1=9,TestId2=10))"
"10003","10003","((StrArr=(),IntArr=(301),Name=""测试项-C""),(StrArr=(""哦哦哦哦""),IntArr=(311),Name=""测试项-B""))","(7,8,9)","(10001,10001,10001)","(TestId1=5,TestId2=6)","((TestId1=11,TestId2=12))"
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/KindConst.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/KindConst.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/Private/Config/ArrInArrCfg.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/Private/Config/RoleUpgradeCfg.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
26 changes: 26 additions & 0 deletions sample/proto_v2/csv/Private/ConfigRec/ArrInArr.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
#include "ConfigRec/ArrInArr.h"



UArrInArrHelper::UArrInArrHelper() : Super()
{
UArrInArrHelper::ClearRow(this->Empty);
}

void UArrInArrHelper::ClearRow(FArrInArr& TableRow)
{
TableRow.Name = TEXT("");
TableRow.IntArr.Reset(0);
TableRow.StrArr.Reset(0);
}

void UArrInArrHelper::ClearDataRow(FArrInArr& TableRow) const
{
UArrInArrHelper::ClearRow(TableRow);
}

108 changes: 108 additions & 0 deletions sample/proto_v2/csv/Private/ConfigRec/ArrInArrCfg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
// Test arr_in_arr_cfg

#include "ConfigRec/ArrInArrCfg.h"



UArrInArrCfgHelper::UArrInArrCfgHelper() : Super()
{
UArrInArrCfgHelper::ClearRow(this->Empty);
this->Loader = MakeShareable(new ConstructorHelpers::FObjectFinder<UDataTable>(TEXT("DataTable'/Game/ConfigRec/ArrInArrCfg'")));
if (this->Loader && this->Loader->Succeeded())
{
this->DataTable = this->Loader->Object;
this->DataTable->OnDataTableChanged().AddUObject(this, &UArrInArrCfgHelper::OnReload);
OnReload();
}
else
{
this->DataTable = nullptr;
}
}

void UArrInArrCfgHelper::OnReload()
{
// TODO Rebuild Index
}

FName UArrInArrCfgHelper::GetRowName(int32 Id)
{
return *FString::Printf(TEXT("%lld"), static_cast<long long>(Id));
}

FName UArrInArrCfgHelper::GetDataRowName(int32 Id) const
{
return UArrInArrCfgHelper::GetRowName(Id);
}

FName UArrInArrCfgHelper::GetTableRowName(const FArrInArrCfg& TableRow) const
{
return GetDataRowName(TableRow.Id);
}

const FArrInArrCfg& UArrInArrCfgHelper::GetDataRowByName(const FName& Name, bool& IsValid) const
{
IsValid = false;
if (!this->DataTable) {
return this->Empty;
}

FString Context;
FArrInArrCfg* LookupRow = DataTable->FindRow<FArrInArrCfg>(Name, Context, false);
if (!LookupRow) {
return this->Empty;
};

IsValid = true;
return *LookupRow;
}

const FArrInArrCfg& UArrInArrCfgHelper::GetDataRowByKey(int32 Id, bool& IsValid) const
{
return GetDataRowByName(GetDataRowName(Id), IsValid);
}

bool UArrInArrCfgHelper::ForeachRow(TFunctionRef<void (const FName& Key, const FArrInArrCfg& Value)> Predicate) const
{
if (!this->DataTable) {
return false;
}

FString Context;
this->DataTable->ForeachRow(Context, Predicate);
return true;
}

UDataTable* UArrInArrCfgHelper::GetRawDataTable(bool& IsValid) const
{
IsValid = false;
if (!this->DataTable) {
return NULL;
}

IsValid = true;
return this->DataTable;
}

void UArrInArrCfgHelper::ClearRow(FArrInArrCfg& TableRow)
{
TableRow.Name = TEXT("");
TableRow.Id = 0;
TableRow.Arr.Reset(0);
TableRow.TestPlainIntArr.Reset(0);
TableRow.TestPlainEnumArr.Reset(0);
TableRow.TestPlainMsg.TestId1 = 0;
TableRow.TestPlainMsg.TestId2 = 0;
TableRow.TestPlainMsgArr.Reset(0);
}

void UArrInArrCfgHelper::ClearDataRow(FArrInArrCfg& TableRow) const
{
UArrInArrCfgHelper::ClearRow(TableRow);
}

106 changes: 106 additions & 0 deletions sample/proto_v2/csv/Private/ConfigRec/RoleUpgradeCfg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/**
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
// Test role_upgrade_cfg with multi keys

#include "ConfigRec/RoleUpgradeCfg.h"



URoleUpgradeCfgHelper::URoleUpgradeCfgHelper() : Super()
{
URoleUpgradeCfgHelper::ClearRow(this->Empty);
this->Loader = MakeShareable(new ConstructorHelpers::FObjectFinder<UDataTable>(TEXT("DataTable'/Game/ConfigRec/RoleUpgradeCfg'")));
if (this->Loader && this->Loader->Succeeded())
{
this->DataTable = this->Loader->Object;
this->DataTable->OnDataTableChanged().AddUObject(this, &URoleUpgradeCfgHelper::OnReload);
OnReload();
}
else
{
this->DataTable = nullptr;
}
}

void URoleUpgradeCfgHelper::OnReload()
{
// TODO Rebuild Index
}

FName URoleUpgradeCfgHelper::GetRowName(int32 Id, int32 Level)
{
return *FString::Printf(TEXT("%lld"), static_cast<long long>(Id) * 1000 + static_cast<long long>(Level));
}

FName URoleUpgradeCfgHelper::GetDataRowName(int32 Id, int32 Level) const
{
return URoleUpgradeCfgHelper::GetRowName(Id, Level);
}

FName URoleUpgradeCfgHelper::GetTableRowName(const FRoleUpgradeCfg& TableRow) const
{
return GetDataRowName(TableRow.Id, TableRow.Level);
}

const FRoleUpgradeCfg& URoleUpgradeCfgHelper::GetDataRowByName(const FName& Name, bool& IsValid) const
{
IsValid = false;
if (!this->DataTable) {
return this->Empty;
}

FString Context;
FRoleUpgradeCfg* LookupRow = DataTable->FindRow<FRoleUpgradeCfg>(Name, Context, false);
if (!LookupRow) {
return this->Empty;
};

IsValid = true;
return *LookupRow;
}

const FRoleUpgradeCfg& URoleUpgradeCfgHelper::GetDataRowByKey(int32 Id, int32 Level, bool& IsValid) const
{
return GetDataRowByName(GetDataRowName(Id, Level), IsValid);
}

bool URoleUpgradeCfgHelper::ForeachRow(TFunctionRef<void (const FName& Key, const FRoleUpgradeCfg& Value)> Predicate) const
{
if (!this->DataTable) {
return false;
}

FString Context;
this->DataTable->ForeachRow(Context, Predicate);
return true;
}

UDataTable* URoleUpgradeCfgHelper::GetRawDataTable(bool& IsValid) const
{
IsValid = false;
if (!this->DataTable) {
return NULL;
}

IsValid = true;
return this->DataTable;
}

void URoleUpgradeCfgHelper::ClearRow(FRoleUpgradeCfg& TableRow)
{
TableRow.Name = TEXT("");
TableRow.Id = 0;
TableRow.Level = 0;
TableRow.CostType = 0;
TableRow.CostValue = 0;
TableRow.ScoreAdd = 0;
}

void URoleUpgradeCfgHelper::ClearDataRow(FRoleUpgradeCfg& TableRow) const
{
URoleUpgradeCfgHelper::ClearRow(TableRow);
}

6 changes: 6 additions & 0 deletions sample/proto_v2/csv/Private/ConfigRec/TestMsgVerifier.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
#include "ConfigRec/TestMsgVerifier.h"
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/Public/Config/ArrInArrCfg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
2 changes: 1 addition & 1 deletion sample/proto_v2/csv/Public/Config/RoleUpgradeCfg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is generated by xresloader 2.7.2, please don't edit it.
* This file is generated by xresloader 2.7.3, please don't edit it.
* You can find more information about this xresloader on https://xresloader.atframe.work/ .
* If there is any problem, please find or report issues on https://github.com/xresloader/xresloader/issues .
*/
Expand Down
Loading

0 comments on commit 16f727f

Please sign in to comment.