def DoCopyGameData(self):
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
        print(gameName)
        print(gameType)

        resDataName = mainResource.getGameName()#sys.argv[1]
        gameResName = self.getGameResName()

        gameResCommonRoot = mainResource.GetDirProductCommon()+"/GameResCommon"+"/"+gameResName
        gameResRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameRes"
        flag = os.path.exists(gameResRoot)
        if not flag:
            #目录不存在的话到gamerescommon里copy
            gameResRoot = gameResCommonRoot

        gameDataCommonRoot = mainResource.GetDirProductCommon()+"/GameDataCommon"
        gameDataRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameData"

        # streamingAssetsUnity = mainResource.GetRootProjectUnity()+"/Assets/StreamingAssets"
        rootAndroidStudio =mainResource.GetRootDirAndroidStudio()
        rootiOSXcode =mainResource.GetRootDirXcode()
 
    # copy GameData 游戏配置等数据 
        dirname = "GameData"

        # unity editor 
        # dir1 = gameDataRoot
        # dir2 = streamingAssetsUnity+"/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

        # ios
        # dir2 = rootiOSXcode+"/Data/Raw/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

    # android asset
        # dir2 = rootAndroidStudio+"/src/main/assets/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)


        dirname = "GameData/common"
Beispiel #2
0
    def Run(self, platform, channel, isHD):
        print("Build Run platform=" + platform + " channel=" + channel +
              " isHD=" + str(isHD))
        self.Init(channel)
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
        print("gameName=" + gameName)
        print("gameType=" + gameType)
        if platform == Source.ANDROID:
            # python 里无法直接执行cd目录,想要用chdir改变当前的工作目录
            android_studio_dir = mainResource.GetRootDirAndroidStudio()
            # python 里无法直接执行cd目录,要用chdir改变当前的工作目录
            os.chdir(android_studio_dir)
            for channel in self.listChannel:
                print("apk_build:" + channel)
                self.BuildClean()
                mainAppChannel.UpdateChannel(channel, isHD)
                self.BuildApk()
                self.CopyApk(channel)

        if platform == Source.MinProgram:
            self.DeleteCloudRes()

            if channel == Source.WEIXIN2:
                self.BuildProject(isHD, Source.WEIXIN)
            else:
                self.GenerateProject(isHD, channel)
                self.BuildProject(isHD, channel)

        print("Build sucess channel=" + channel)
    def Run(self, isHd):
        print("UpdateAppstore Run")
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()

        print(gameName)
        print(gameType)

        if len(sys.argv) > 2:
            if sys.argv[2] == "delete_screenshot":
                # delete_screenshots()
                sys.exit(0)

        #先从default 拷贝 文件模版
        dir_default = mainResource.GetProjectConfigDefault()
        dir_to = mainResource.GetProjectConfigApp()
        dir1 = dir_default + "/appstore"
        dir2 = dir_to + "/appstore"
        flag = os.path.exists(dir2)
        print("UpdateAppstore dir1=" + dir1 + "dir2=" + dir2)
        if flag:
            shutil.rmtree(dir2)

        shutil.copytree(dir1, dir2)

        # self.copy_screenshots()

        self.updateAppstore(isHd)
        # self.updateAppstore(True)

        print("UpdateAppstore sucess")
Beispiel #4
0
 def CreateApp(self, isHD):
     # ad.GoHome(isHD)
     time.sleep(1)
     print(" gp CreateApp")
     package = mainAppInfo.GetAppPackage(Source.ANDROID, isHD)
     name = mainAppInfo.GetAppName(Source.IOS, isHD, Source.LANGUAGE_EN)
     gameName = mainResource.getGameName()
     gameType = mainResource.getGameType()
     #self.driver.get(self.HTTP_HEAD+"GooglePlayDeveloperAPI/CreateApp?package="+package+"&name="+name+"&apptype="+gameType+"&appkey="+gameName+"&path="+mainResource.cmdPath)
     mainAppStoreGoogleInternal.Run("createapp", isHD)
Beispiel #5
0
    def Run(self, type):
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()

        if type == "save":
            self.SaveCode()
            self.SaveCodeMain()

        if type == "copy":
            self.CopyCode()
            self.CopyCodeMain()
    def Run(self):
 
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
        print(gameName)
        print(gameType)

        resDataName = mainResource.getGameName()#sys.argv[1]
        gameResName = self.getGameResName()

        gameResCommonRoot = mainResource.GetDirProductCommon()+"/GameResCommon"+"/"+gameResName
        gameResRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameRes"
        flag = os.path.exists(gameResRoot)
        if not flag:
            #目录不存在的话到gamerescommon里copy
            gameResRoot = gameResCommonRoot;

        gameDataRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameData"

        streamingAssetsUnity = mainResource.GetRootProjectUnity()+"/Assets/StreamingAssets"
        rootAndroidStudio = mainResource.GetRootDirAndroidStudio()
        rootiOSXcode =mainResource.GetRootDirXcode()

        
    # copy GameData 游戏配置等数据 
        dirname = "GameData/screenshot"
        # ios
        dir2 = rootiOSXcode+"/Data/Raw/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2) 

        dirname = "GameData/screenshot"
    # android asset
        dir2 = rootAndroidStudio+"/src/main/assets/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2) 


        print("clean_screenshot sucess")
    def Run(self):
        gameType = mainResource.getGameType()
        gameName = mainResource.getGameName()

        rootAndroidStudio = mainResource.GetRootDirAndroidStudio()

        # android asset
        dir_asset = "/src/main/assets/bin"
        dir1 = mainResource.GetRootDirAndroidOutput() + dir_asset
        dir2 = rootAndroidStudio + dir_asset
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1, dir2)

        dir_asset = "/src/main/assets/baidu_tts_data"
        dir1 = mainResource.GetRootDirAndroidOutput() + dir_asset
        dir2 = rootAndroidStudio + dir_asset
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1, dir2)

        # android jniLibs
        dir_asset = "/src/main/jniLibs"
        dir1 = mainResource.GetRootDirAndroidOutput() + dir_asset
        dir2 = rootAndroidStudio + dir_asset
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1, dir2)

        filename = "/libs/unity-classes.jar"
        shutil.copy2(mainResource.GetRootDirAndroidOutput() + filename,
                     rootAndroidStudio + filename)

        dataJson = self.LoadJsonAndroidAssetConfigCommon()
        appNameAndroidAsset = dataJson["APP_NAME_KEYWORD"]
        appTypeAndroidAsset = dataJson["APP_TYPE"]
        print(appTypeAndroidAsset)
        print(appNameAndroidAsset)

        if appTypeAndroidAsset != gameType or appNameAndroidAsset != gameName:
            print("mainCopyGamedata DoCopyAll")
            mainCopyGamedata.DoCopyAll()

        self.CopyConfigDataToAndroid()
        print("copy_android_output_asset sucess")
Beispiel #8
0
    def CopyApk(self,channel):
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
    # copy2 同时复制文件权限
        dirapk = mainResource.GetProjectOutPutApp() + "/apk"
        if mainResource.AppForPad(False):
            dirapk+="/heng"
            gameName += "_hd"
        else:
            dirapk+="/shu"

        if not os.path.exists(dirapk):
            os.makedirs(dirapk)

        shutil.copy2(mainResource.getAndroidProjectApk(), dirapk + "/" +
                    gameType + "_" + gameName + "_" + channel + ".apk")
Beispiel #9
0
    def Run(self,channel,isHD):  
        self.Init(channel)
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
        print("ApkBuild isHD="+str(isHD))
        print("gameName="+gameName)
        print ("gameType="+gameType) 
        print(mainResource.getAndroidProjectApk())
        # python 里无法直接执行cd目录,想要用chdir改变当前的工作目录
        android_studio_dir = mainResource.GetRootDirAndroidStudio()
        # python 里无法直接执行cd目录,要用chdir改变当前的工作目录
        os.chdir(android_studio_dir)
        for channel in self.listChannel:
            print("apk_build:" + channel)
            self.BuildClean()
            mainAppChannel.UpdateChannel(channel,isHD) 
            self.BuildApk()
            self.CopyApk(channel)

        print("apk_build sucess channel="+channel)
    def Run(self): 
        # resoucedata 
        gameType = mainResource.getGameType()
        gameName = mainResource.getGameName()
        dir1 = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/"+Source.Dir_Name_Resources+"/App"
        dir2 = mainResource.GetRootUnityAssetsResource()+"/App" 
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        print("copytree dir2 =",dir2)
        shutil.copytree(dir1,dir2)

        # AppCommon
        dir1 = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+"AppCommon/"+Source.Dir_Name_Resources
        dir2 = mainResource.GetRootUnityAssetsResource()+"/AppCommon" 
        FileUtil.CopyDir(dir1,dir2)

        self.CopyResConfigData()

        # self.CopyPlugins()

        print ("copy_resource sucess")
Beispiel #11
0
    def Run(self):
        gameType = mainResource.getGameType()
        gameName = mainResource.getGameName()

        configDirUnity = mainResource.GetRootUnityAssetsResource(
        ) + "/ConfigData/config"

        configAppType = mainConfig.GetConfigAppType(configDirUnity)
        configAppName = mainConfig.GetConfigAppName(configDirUnity)
        print("unity:" + configAppType + " " + configAppName)

        if gameType != configAppType or gameName != configAppName:
            print("check app type and name fail")
            sys.exit(0)

        dir1 = mainResource.GetRootUnityAssetsResource() + "/App"
        dir2 = mainResource.GetResourceDataRoot(
        ) + "/" + gameType + "/" + gameName + "/" + Source.Dir_Name_Resources + "/App"
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1, dir2)

        # AppCommon
        dir1 = mainResource.GetRootUnityAssetsResource() + "/AppCommon"
        dir2 = mainResource.GetResourceDataRoot(
        ) + "/" + gameType + "/" + "AppCommon/" + Source.Dir_Name_Resources
        flag = os.path.exists(dir2)
        FileUtil.CopyDir(dir1, dir2)

        # ConfigData
        dir1 = mainResource.GetRootUnityAssetsResource() + "/ConfigData"
        dir2 = mainResource.GetResourceDataRoot(
        ) + "/" + gameType + "/" + gameName + "/ConfigData"
        flag = os.path.exists(dir2)
        FileUtil.CopyDir(dir1, dir2)

        print("save_resource sucess")
Beispiel #12
0
 def UpdateApk(self, isHD):
     package = mainAppInfo.GetAppPackage(Source.ANDROID, isHD)
     gameName = mainResource.getGameName()
     gameType = mainResource.getGameType()
     mainAppStoreGoogleInternal.Run("UpdateApk", isHD)
 def getGameResName(self):
     name = mainResource.getGameName()
     idx = name.rfind('_')
     s_len=len(name)
     game = name[idx+1:s_len]
     return game
Beispiel #14
0
    def updateName(self,isHd,isAuto):

        name = mainAppInfo.GetAppStoreAcount(isHd,Source.HUAWEI)
        mainHuaweiAppGalleryApi.ClientId = mainAppStoreAcount.GetClientId(Source.HUAWEI,name)
        mainHuaweiAppGalleryApi.ClientSecret = mainAppStoreAcount.GetClientSecret(Source.HUAWEI,name) 
        
        appinfoOld = AppInfoOld(isHd)
        if appinfoOld.IsOldVersion():
            # 转换
            self.ConvertOld2New(isHd,appinfoOld)


        rootConfig = mainResource.GetProjectConfigApp()
        strHD = "HD"

        project_ios = rootConfig + "/ios/project"
        project_android = rootConfig + "/android/project"

        if isHd:
            project_ios = rootConfig + "/ios/project_hd"
            project_android = rootConfig + "/android/project_hd"

        # android
        file_name_cn_android = project_android + "/res/values/strings.xml"
        file_name_en_android = project_android + "/res/values-en/strings.xml"
        file_AndroidManifest = project_android + "/xml/AndroidManifest.xml"
        file_AndroidManifest_GP = project_android + "/xml_gp/AndroidManifest.xml"
        

        file_google_service_android = project_android + "/config/google-services.json"

        # ios
        file_name_cn_ios = project_ios + "/appname/zh-Hans.lproj/InfoPlist.strings"
        file_name_en_ios = project_ios + "/appname/en.lproj/InfoPlist.strings"
        file_info_plist_ios = project_ios + "/Info.plist"

        # loadJson
        data = self.loadJson(isHd) 

        
        appname = data["appname"]
 
        APP_NAME_CN_ANDROID = appname[Source.ANDROID]["cn"]
        APP_NAME_EN_ANDROID = appname[Source.ANDROID]["en"]
        APP_NAME_CN_IOS = appname[Source.IOS]["cn"]
        APP_NAME_EN_IOS = appname[Source.IOS]["en"]       
        PACKAGE_ANDROID = data["apppackage"][Source.ANDROID]["default"]
        PACKAGE_IOS = data["apppackage"][Source.IOS]["default"]
        self.versionCode = data["appversion"][Source.ANDROID]["code"]
        APPVERSION_IOS =  data["appversion"][Source.IOS]["value"]
        
        #appid 
        appid_ios = self.GetJsonAppId(data,Source.APPSTORE)
        appid_taptap = self.GetJsonAppId(data,Source.TAPTAP)
        appid_huawei = self.GetJsonAppId(data,Source.HUAWEI)
        self.SetConfigDataAppId(Source.IOS,Source.APPSTORE,appid_ios,isHd)
        self.SetConfigDataAppId(Source.ANDROID,Source.TAPTAP,appid_taptap,isHd)
        self.SetConfigDataAppId(Source.ANDROID,Source.HUAWEI,appid_huawei,isHd)

        csvfile = mainResource.GetConfigDataDir()+"/language/language.csv" 
        self.UpdateLanguageName(csvfile,APP_NAME_CN_ANDROID,APP_NAME_EN_ANDROID,isHd)

        csvfile = mainResource.GetRootUnityAssetsResource()+"/ConfigData/language/language.csv" 
        self.UpdateLanguageName(csvfile,APP_NAME_CN_ANDROID,APP_NAME_EN_ANDROID,isHd)

        
        # if data.has_key("PACKAGE_HD_ANDROID"):
        #     PACKAGE_HD_ANDROID = data["PACKAGE_HD_ANDROID"]


        
    
        if isAuto==True: 
            self.autoPlusVersion(isHd,data)
            # 重新加载
            data = self.loadJson(isHd)
            APPVERSION_IOS =  data["appversion"][Source.IOS]["value"]
          
            self.versionCode = data["appversion"][Source.ANDROID]["code"]

        APPVERSION_ANDROID = self.versionCodeToVersion(self.versionCode)
        APPVERSION_CODE_ANDROID = self.versionCode
        

        # appversion.json
        if isAuto==False: 
            src = mainResource.GetProjectConfigDefault()+"/appinfo/appversion.json"
            dst = mainResource.GetProjectConfigApp()+"/appinfo/appversion.json"
            flag = os.path.exists(dst)
            # 
            if not isHd:
                shutil.copyfile(src,dst)

            strfile = FileUtil.GetFileString(dst)
            key = "_VERSION_ANDROID_"
            if isHd:
                key = "_VERSION_HD_ANDROID_"

            # 保存版本
            # android
            print("appid_huawei=",appid_huawei+" ishd=",isHd)
            # if len(appid_huawei)>1: 
            version_web = mainHuaweiAppGalleryApi.GetVersion(appid_huawei)
            strfile = strfile.replace(key,version_web) 
            FileUtil.SaveString2File(strfile,dst)
            self.SetAppVersion(isHd,Source.ANDROID,version_web)
            strcode = version_web.replace(".","")
            self.SetAppVersionCode(isHd,Source.ANDROID,strcode)
                
                
       

            # ios
            appid_apple = self.GetJsonAppId(data,Source.APPSTORE)
            version_web = mainAppVersionApple.ParseVersion(appid_apple)
            print("AppVersionApple=",version_web+" appid_apple=",appid_apple)
            self.SetAppVersion(isHd,Source.IOS,version_web)
            strcode = version_web.replace(".","")
            self.SetAppVersionCode(isHd,Source.IOS,strcode)

            filepath = mainResource.GetProjectConfigAppType()+"/appversion.json" 
            flag = os.path.exists(filepath)
            strFileJson = "{}"
            if flag:
                strFileJson = FileUtil.GetFileString(filepath)
            dataRoot = json.loads(strFileJson)
            dataRoot[mainResource.getGameName()]= json.loads(strfile)
            JsonUtil.SaveJson(filepath,dataRoot)


            

        # 重新加载
        data = self.loadJson(isHd)
        APPVERSION_IOS =  data["appversion"][Source.IOS]["value"] 
        self.versionCode = data["appversion"][Source.ANDROID]["code"]
        APPVERSION_ANDROID = self.versionCodeToVersion(self.versionCode)
        APPVERSION_CODE_ANDROID = self.versionCode

        print (APP_NAME_CN_ANDROID)
        print (APP_NAME_EN_ANDROID)
        print (APP_NAME_CN_IOS)
        print (APP_NAME_EN_IOS)
        print (PACKAGE_ANDROID)

        print("android version:"+APPVERSION_ANDROID)
        print("ios version:"+APPVERSION_IOS)

    # android
        # name
        strStart = "app_name\">"
        strEnd = "<"
        # cn
        strOut = self.replaceStringOfFile(
            file_name_cn_android, strStart, strEnd, APP_NAME_CN_ANDROID)
        self.saveString2File(strOut, file_name_cn_android)
        # en
        strOut = self.replaceStringOfFile(
            file_name_en_android, strStart, strEnd, APP_NAME_EN_ANDROID)
        self.saveString2File(strOut, file_name_en_android)

        self.updateAndroidManifest(file_AndroidManifest,PACKAGE_ANDROID,APPVERSION_ANDROID,APPVERSION_CODE_ANDROID,isHd)
        self.updateAndroidManifest(file_AndroidManifest_GP,PACKAGE_ANDROID,APPVERSION_ANDROID,APPVERSION_CODE_ANDROID,isHd)

        # admob
        self.replaceGoogleServiceFile(file_google_service_android, PACKAGE_ANDROID)

    # ios

        #appname
        self.replaceFile(file_info_plist_ios,"_APP_NAME_",APP_NAME_CN_IOS)
        file_name_cn_ios = project_ios + "/appname/zh-Hans.lproj/InfoPlist.strings"
        file_name_en_ios = project_ios + "/appname/en.lproj/InfoPlist.strings" 
        # cn
        self.replaceFile(file_name_cn_ios,"_APP_NAME_",APP_NAME_CN_IOS) 
        # en
        self.replaceFile(file_name_en_ios,"_APP_NAME_",APP_NAME_EN_IOS)  


        # package 
        self.replaceFile(file_info_plist_ios,"_APP_PACKAGE_",PACKAGE_IOS)

        
        # version 
        self.replaceFile(file_info_plist_ios,"_APP_VERSION_",APPVERSION_IOS) 

        #admob appid  
        appid = mainAdConfig.GetCommonAppId(Source.ADMOB,Source.IOS,isHd)
        self.replaceFile(file_info_plist_ios,"_APP_ID_ADMOB_",appid) 

        # CFBundleURLSchemes
        src = Source.WEIBO
        appid = mainConfig.GetShareAppId(src,Source.IOS,isHd)
        self.replaceXcodeUrlScheme(file_info_plist_ios,src,appid,0)

        src = Source.WEIXIN
        appid = mainConfig.GetShareAppId(src,Source.IOS,isHd)
        self.replaceXcodeUrlScheme(file_info_plist_ios,src,appid,0)

        src = Source.QQ
        appid = mainConfig.GetShareAppId(src,Source.IOS,isHd)
        self.replaceXcodeUrlScheme(file_info_plist_ios,src,appid,0)
        self.replaceXcodeUrlScheme(file_info_plist_ios,src,appid,1)

        # xiaomi aso keyword
        self.updateXiaoASOkeyword(data,isHd)



    # win
        self.updateNameWin(isHd,isAuto)
    def DoCopyAll(self):
        gameName = mainResource.getGameName()
        gameType = mainResource.getGameType()
        print(gameName)
        print(gameType)

        resDataName = mainResource.getGameName()#sys.argv[1]
        gameResName = self.getGameResName()

        gameResCommonRoot = mainResource.GetDirProductCommon()+"/GameResCommon"+"/"+gameResName
        gameResRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameRes"
        flag = os.path.exists(gameResRoot)
        if not flag:
            #目录不存在的话到gamerescommon里copy
            gameResRoot = gameResCommonRoot

        gameDataCommonRoot = mainResource.GetDirProductCommon()+"/GameDataCommon"
        gameDataRoot = mainResource.GetResourceDataRoot()+"/"+gameType+"/"+gameName+"/GameData"

        rootAndroidStudio =mainResource.GetRootDirAndroidStudio()
        rootiOSXcode =mainResource.GetRootDirXcode()

        # copy GameRes 游戏图片等资源
        dirname = "GameRes"

        # unity editor 
        dir1 = gameResRoot
        dir2 = mainResource.GetRootUnityAssetsResource()+"/"+dirname
        flag = os.path.exists(dir2)
        print("GameRes dir1="+dir1+" dir2="+dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1,dir2)

        # ios
        dir2 = rootiOSXcode+"/Data/Raw/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1,dir2)

    # android asset
        dir2 = rootAndroidStudio+"/src/main/assets/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1,dir2)


    # copy GameData 游戏配置等数据 
        dirname = "GameData"

        # unity editor 
        # dir1 = gameDataRoot
        # dir2 = streamingAssetsUnity+"/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

        # ios
        # dir2 = rootiOSXcode+"/Data/Raw/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

    # android asset
        dir2 = rootAndroidStudio+"/src/main/assets/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        print("gamedata dir2=",dir2)
        shutil.copytree(dir1,dir2)


        dirname = "GameData/common"

        # unity editor 
        # dir1 = gameDataCommonRoot
        # dir2 = streamingAssetsUnity+"/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

        # ios
        # dir2 = rootiOSXcode+"/Data/Raw/"+dirname
        # flag = os.path.exists(dir2)
        # if flag:
        #     shutil.rmtree(dir2)
        # shutil.copytree(dir1,dir2)

    # android asset
        dir2 = rootAndroidStudio+"/src/main/assets/"+dirname
        flag = os.path.exists(dir2)
        if flag:
            shutil.rmtree(dir2)
        shutil.copytree(dir1,dir2)

        self.CopyConfigDataToAndroid()