You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
33 lines
1.3 KiB
import os
|
|
import shutil
|
|
import sys
|
|
|
|
def copy_files(product):
|
|
cur_dir = os.path.curdir
|
|
|
|
google_services_path = f"{cur_dir}/productConfig/{product}/google-services.json"
|
|
herosdkcfg_path = f"{cur_dir}/productConfig/{product}/herosdkcfg.xml"
|
|
unityForXcodeConfig_path = f"{cur_dir}/productConfig/{product}/UnityForXcodeConfig.json"
|
|
hero_BDC_path = f"{cur_dir}/productConfig/{product}/Hero-BDC.asset"
|
|
|
|
google_services_target_dir = f"{cur_dir}/pandora/Assets/"
|
|
herosdkcfg_target_dir = f"{cur_dir}/pandora/Assets/Plugins/Android/assets"
|
|
unityForXcodeConfig_dir = f"{cur_dir}/pandora/Assets/Plugins/IOS/HeroUSDKForIOS"
|
|
hero_BDC_dir = f"{cur_dir}/pandora/Assets/Resources/"
|
|
|
|
if not os.path.exists(google_services_target_dir) or not os.path.exists(herosdkcfg_target_dir):
|
|
print("Error: dir not exist!")
|
|
sys.exit(1)
|
|
|
|
shutil.copy(google_services_path, google_services_target_dir)
|
|
shutil.copy(herosdkcfg_path, herosdkcfg_target_dir)
|
|
shutil.copy(unityForXcodeConfig_path, unityForXcodeConfig_dir)
|
|
shutil.copy(hero_BDC_path, hero_BDC_dir)
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) != 2:
|
|
print("Error: copy product config should has parameter!")
|
|
sys.exit(1)
|
|
|
|
product = sys.argv[1]
|
|
copy_files(product)
|
|
|