40 lines
981 B
Bash
40 lines
981 B
Bash
#!/bin/bash
|
|
|
|
SHELL_DIR=$(dirname $0)
|
|
echo "change dir to $SHELL_DIR"
|
|
cd "$SHELL_DIR"
|
|
|
|
echo "Start export config ...\n"
|
|
|
|
CUR_PATH=`pwd`
|
|
echo "current work path:$CUR_PATH\n\n\n"
|
|
|
|
OUTPUT_DIR=$(dirname $(dirname "$PWD"))
|
|
|
|
PATH_LUBAN_DLL=$CUR_PATH/Luban.ClientServer/Luban.ClientServer.dll
|
|
INPUT_DATA_DIR=$CUR_PATH/Datas
|
|
PATH_DEFINE_FILE=$CUR_PATH/Defines/__root__.xml
|
|
|
|
OUTPUT_CODE_DIR=$OUTPUT_DIR/Forest/Assets/Scripts/Gameplay/DataTable
|
|
OUTPUT_DATA_DIR=$OUTPUT_DIR/Forest/Assets/Config/Data
|
|
|
|
|
|
echo "current code path:$OUTPUT_CODE_DIR\n"
|
|
echo "current data path:$OUTPUT_DATA_DIR\n"
|
|
|
|
rm -rf $OUTPUT_CODE_DIR
|
|
rm -rf $OUTPUT_DATA_DIR
|
|
|
|
mkdir -p $OUTPUT_CODE_DIR
|
|
mkdir -p $OUTPUT_DATA_DIR
|
|
|
|
echo "start export .."
|
|
dotnet $PATH_LUBAN_DLL -j cfg -- \
|
|
--input_data_dir $INPUT_DATA_DIR \
|
|
--output_code_dir $OUTPUT_CODE_DIR \
|
|
--output_data_dir $OUTPUT_DATA_DIR \
|
|
--gen_types data_json,code_cs_unity_json -s client \
|
|
--define_file $PATH_DEFINE_FILE
|
|
|
|
echo "export done ..."
|