64 lines
2.6 KiB
Python
64 lines
2.6 KiB
Python
import os
|
|
import shutil
|
|
|
|
# region Game
|
|
print("Copying Game files...")
|
|
# # Copying the LayeredFS folder
|
|
# shutil.copytree("./Data_exported/Data_mods", "./Game/Data_mods", dirs_exist_ok=True)
|
|
# Copying the game folder
|
|
shutil.copytree("./Data_exported/Data_mods", "./Game/Data", dirs_exist_ok=True)
|
|
# Copying TaikoArcadeLoader
|
|
shutil.copytree("./Assets/TaikoArcadeLoader", "./Game/Executable/Release", dirs_exist_ok=True)
|
|
|
|
# endregion
|
|
|
|
|
|
# region Server
|
|
print("Copying Server files...")
|
|
# Making folders
|
|
os.makedirs("./TaikoLocalServer/TaikoLocalServer/bin/Release/net8.0/win-x64/wwwroot", exist_ok=True)
|
|
os.makedirs("./TaikoLocalServer/TaikoLocalServer/bin/Debug/net8.0/wwwroot/", exist_ok=True)
|
|
os.makedirs("./TaikoLocalServer/TaikoLocalServer/Handlers/", exist_ok=True)
|
|
|
|
# Encrypting the required files for the server to the Server export folder
|
|
os.system(
|
|
'py .\encryption.py -i "./Data_decrypted/don_cos_reward.json" -o "./Data_exported/Server/wwwroot/data/datatable/don_cos_reward.bin" --enc'
|
|
)
|
|
os.system(
|
|
'py .\encryption.py -i "./Data_decrypted/neiro.json" -o "./Data_exported/Server/wwwroot/data/datatable/neiro.bin" --enc'
|
|
)
|
|
os.system(
|
|
'py .\encryption.py -i "./Data_decrypted/shougou.json" -o "./Data_exported/Server/wwwroot/data/datatable/shougou.bin" --enc'
|
|
)
|
|
|
|
# Copying the datatables to the Server export folder
|
|
shutil.copy2("./Data_exported/Data_mods/x64/datatable/wordlist.bin", "./Data_exported/Server/wwwroot/data/datatable")
|
|
shutil.copy2("./Data_exported/Data_mods/x64/datatable/musicinfo.bin", "./Data_exported/Server/wwwroot/data/datatable")
|
|
shutil.copy2("./Data_exported/Data_mods/x64/datatable/music_order.bin", "./Data_exported/Server/wwwroot/data/datatable")
|
|
|
|
# Copying the Server export folder to TaikoLocalServer
|
|
shutil.copytree("./Data_exported/Server/wwwroot/", "./TaikoLocalServer/TaikoLocalServer/wwwroot/", dirs_exist_ok=True)
|
|
|
|
# Copying the BaidQuery script to convert old card formats
|
|
shutil.copy2(
|
|
"./Assets/Display Card ID & Update old Card format/BaidQuery.cs",
|
|
"./TaikoLocalServer/TaikoLocalServer/Handlers/BaidQuery.cs",
|
|
)
|
|
|
|
# Copying the Intro song list
|
|
shutil.copy2(
|
|
"./Assets/New Song Intro List/intro_data.json",
|
|
"./TaikoLocalServer/TaikoLocalServer/wwwroot/data/intro_data.json",
|
|
)
|
|
|
|
# Copying the database to the Debug and Release build folders (otherwise the server will regenerate a DB file on first start)
|
|
shutil.copy2(
|
|
"./Data_exported/Server/wwwroot/taiko.db3",
|
|
"./TaikoLocalServer/TaikoLocalServer/bin/Release/net8.0/win-x64/wwwroot/",
|
|
)
|
|
shutil.copy2(
|
|
"./Data_exported/Server/wwwroot/taiko.db3",
|
|
"./TaikoLocalServer/TaikoLocalServer/bin/Debug/net8.0/wwwroot/",
|
|
)
|
|
# endregion
|