Пример #1
0
    def UpdateAppInfo(self, isHD):
        appid = mainAppInfo.GetAppId(isHD, Source.HUAWEI)
        defaultLang = "en-US"
        policyUrl = self.GetPrivacy(isHD)
        mainHuaweiAppGalleryApi.UpdateAppBaseInfo(appid, defaultLang,
                                                  policyUrl)

        idx = 0
        for country in self.listCountry:
            lan = self.listCountryLanguage[idx]
            title = mainAppInfo.GetAppName(Source.ANDROID, isHD, lan)
            detail = mainAppInfo.GetAppDetail(isHD, lan)
            shortDetail = mainAppInfo.GetAppPromotion(isHD, lan)
            whatsNew = mainAppInfo.GetAppUpdate(isHD, lan)
            mainHuaweiAppGalleryApi.UpdateAppInfo(appid, country, title,
                                                  detail, shortDetail,
                                                  whatsNew)

            # subtitle= mainAppInfo.GetAppSubtitle(isHD,lan)
            #
            # policyText =""

            # keywords = mainAppInfo.GetAso(isHD,Source.APPSTORE,lan)
            # marketingUrl = mainAppInfo.GetAppSoftwareUrl(isHD)
            # promotionalText =  mainAppInfo.GetAppPromotion(isHD, lan)
            # supportUrl =  mainAppInfo.GetAppSupportUrl(isHD)

            idx += 1
Пример #2
0
 def GetAso(self, isHD):  
     applans = [Source.LANGUAGE_CN,Source.LANGUAGE_EN]
     for lan in applans:    
         name = mainAppInfo.GetAppName(Source.IOS, isHD,lan) 
         # self.GetKeyWord(name)
         aso = self.GetKeyWord(name)
         mainAppInfo.SetAso(isHD,Source.APPSTORE,lan,aso)
Пример #3
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)
Пример #4
0
    def GetAso(self, isHD):
        applans = [Source.LANGUAGE_CN, Source.LANGUAGE_EN]
        lankeys = ["cn", "us"]

        idx = 0
        for lan in applans:
            name = mainAppInfo.GetAppName(Source.IOS, isHD, lan)
            # self.GetKeyWord(name)
            aso = self.GetKeyWord(name, lankeys[idx])
            mainAppInfo.SetAso(isHD, Source.APPSTORE, lan, aso)
            idx = idx + 1
    def UpdateAppInfo(self, isHD):

        package = mainAppInfo.GetAppPackage(Source.ANDROID, isHD)
        version = mainAppInfo.GetAppVersion(Source.ANDROID, isHD)
        idx = 0
        print("google UpdateAppInfo=", package)

        for country in self.listCountry:
            lan = self.listCountryLanguage[idx]
            name = mainAppInfo.GetAppName(Source.IOS, isHD, lan)
            description = mainAppInfo.GetAppDetail(isHD, lan)
            promotionalText = mainAppInfo.GetAppPromotion(isHD, lan)
            mainGooglePlayApi.UpdateAppInfo(package, country, name,
                                            description, promotionalText,
                                            str(isHD), lan)
            idx += 1
Пример #6
0
    def MakeCodeDoc(self, isHd):
        title = mainAppInfo.GetAppName(Source.ANDROID, isHd,
                                       Source.LANGUAGE_CN) + "V1.0.0"
        codedir = "/Users/moon/sourcecode/LearnWord"
        codedir = mainResource.GetRootUnityAssets(
        ) + "/Script/Apps/" + mainResource.getGameType()
        # codedir = mainResource.GetRootUnityAssets()+"/Script/Apps/"+mainResource.getGameType()+"/Base"
        outputdir = mainResource.GetProjectOutPutApp()
        FileUtil.CreateDir(outputdir)

        docoutput = outputdir + "/" + mainResource.getGameType() + ".docx"
        if isHd:
            docoutput = outputdir + "/" + mainResource.getGameType(
            ) + "_HD.docx"

        os.system("pyerz -e cs -i " + codedir + " -o " + docoutput + " -t " +
                  title)

        self.WordToPdf(docoutput)
Пример #7
0
    def UpdateAppInfo(self, isHD, isUpdateName=True):

        if not Platform.isWindowsSystem():
            # self.UpdateAppstore(isHD)
            self.UpdateIAPInfo(isHD)

        appid = mainAppInfo.GetAppId(isHD, Source.APPSTORE)
        version = mainAppInfo.GetAppVersion(Source.IOS, isHD)
        idx = 0
        print("UpdateAppInfo 1 appid=" + appid + " isHD=" + str(isHD))
        for country in self.listCountry:
            lan = self.listCountryLanguage[idx]
            name = mainAppInfo.GetAppName(Source.IOS, isHD, lan)
            subtitle = mainAppInfo.GetAppSubtitle(isHD, lan)
            # policyUrl= mainAppInfo.GetAppPrivacyUrl(isHD)
            policyUrl = mainAppStoreAcount.GetPrivacy(
                Source.APPSTORE,
                mainAppInfo.GetAppStoreAcount(isHD, Source.APPSTORE))
            policyText = ""

            description = mainAppInfo.GetAppDetail(isHD, lan)
            keywords = mainAppInfo.GetAso(isHD, Source.APPSTORE, lan)
            marketingUrl = mainAppInfo.GetAppSoftwareUrl(isHD)
            promotionalText = mainAppInfo.GetAppPromotion(isHD, lan)
            supportUrl = mainAppInfo.GetAppSupportUrl(isHD)
            whatsNew = mainAppInfo.GetAppUpdate(isHD, lan)
            print("UpdateAppInfo  whatsNew=" + whatsNew + " lan=" + lan)
            mainAppConnectApi.UpdateAppInfo(appid, version, country,
                                            description, keywords,
                                            marketingUrl, promotionalText,
                                            supportUrl, whatsNew)
            if isUpdateName:
                try:
                    test = 0
                    mainAppConnectApi.UpdateAppName(appid, version, country,
                                                    name, policyText,
                                                    policyUrl, subtitle)
                except Exception as e:
                    print("UpdateAppName eror=", e)

            idx += 1
Пример #8
0
    def MakeGuideDoc(self, isHd):
        title = mainAppInfo.GetAppName(Source.ANDROID, isHd,
                                       Source.LANGUAGE_CN) + "V1.0.0"
        detail = mainAppInfo.GetAppDetail(isHd, Source.LANGUAGE_CN)
        # detail +="/n"
        detail += mainAppInfo.GetAppDetail(isHd, Source.LANGUAGE_EN)

        outputdir = mainResource.GetProjectOutPutApp()
        FileUtil.CreateDir(outputdir)

        docoutput = outputdir + "/" + mainResource.getGameType(
        ) + "_guide.docx"
        dirscreenshot = mainResource.GetProjectOutPutApp(
        ) + "/screenshot/shu/cn/1080p"
        filedetail = mainResource.GetProjectConfigApp(
        ) + "/appinfo/app_description.xml"
        if isHd:
            dirscreenshot = mainResource.GetProjectOutPutApp(
            ) + "/screenshot/heng/cn/1080p"
            filedetail = mainResource.GetProjectConfigApp(
            ) + "/appinfo/app_description_hd.xml"
            docoutput = outputdir + "/" + mainResource.getGameType(
            ) + "_guide_hd.docx"

        filedst = dirscreenshot + "/detail.xml"
        FileUtil.SaveString2File(detail, filedst)
        # FileUtil.CopyFile(filedetail,filedst)
        cmd = "pyerz -e xml -i " + dirscreenshot + " -o " + docoutput + " -t " + title + " --font-size 16 --space-before 2 --space-after 10 --line-spacing 16 "
        # print("cmd=",cmd)
        for i in range(5):
            pic = dirscreenshot + "/" + str(i + 1) + ".jpg"
            if os.path.exists(pic):
                cmd += " -pic " + pic

        os.system(cmd)

        os.remove(filedst)

        self.WordToPdf(docoutput)
Пример #9
0
    def GetAppName(self, ishd):
        name = mainAppInfo.GetAppName(self.osApp, ishd, Source.LANGUAGE_CN)
        # if self.osApp == Source.IOS:
        #     AppInfo.GetAppName(self.osApp, ishd)+self.osApp

        return name
Пример #10
0
 def GetAppName(self, ishd,lan):
     name = mainAppInfo.GetAppName(Source.ANDROID, ishd,lan) 
     return name
Пример #11
0
    def CreateApp(self, isHD):
        appid = mainAppInfo.GetAppId(isHD, Source.APPSTORE)
        package = mainAppInfo.GetAppPackage(Source.IOS, isHD)
        if appid != "0":
            self.FillAppInfo(isHD)
            # self.UpdateAppInfo(isHD)
            # self.UploadScreenShot(isHD)
            # self.Init()
            # self.GoHome(isHD)

            return

        # mainAppConnectApi.GetAppProfile(package,appid)
        # package = mainAppInfo.GetAppPackage(Source.IOS,isHD)
        bundleid = mainAppConnectApi.GetBundleIdByPackage(package)
        webcmd = WebDriverCmd(self.driver)
        url = "https://appstoreconnect.apple.com/apps"
        self.driver.get(url)
        time.sleep(2)
        self.urlold = self.driver.current_url

        webcmd.AddCmdWait(CmdType.CLICK, "//button[@id='new-app-btn-icon']")
        webcmd.AddCmd(CmdType.CLICK, "//button[@id='new-app-btn']")
        webcmd.AddCmdWait(CmdType.CLICK,
                          "//input[@name='appStoreVersionsIOS']")
        webcmd.AddCmd(
            CmdType.INPUT, "//input[@id='name']",
            mainAppInfo.GetAppName(Source.IOS, isHD, Source.LANGUAGE_EN))
        webcmd.AddCmd(CmdType.INPUT, "//input[@id='sku']",
                      mainAppInfo.GetAppSKU(isHD))

        key = "//select[@name='primaryLocale']"
        item = webcmd.AddCmd(CmdType.CLICK, key)
        webcmd.Run(True)
        if item == None:
            item = webcmd.Find(key)

        key = ".//option[@value='en-US']"
        subitem = webcmd.FindChild(item, key)
        webcmd.DoCmd(subitem, CmdType.CLICK)

        item = webcmd.AddCmd(CmdType.CLICK, "//select[@name='bundleId']")
        webcmd.Run(True)
        # time.sleep(2)
        key = ".//option[@value='" + package + "']"
        subitem = webcmd.FindChild(item, key, True)
        webcmd.DoCmd(subitem, CmdType.CLICK)
        time.sleep(1)

        webcmd.AddCmd(CmdType.INPUT, "//input[@id='sku']",
                      mainAppInfo.GetAppSKU(isHD))

        # item=webcmd.AddCmd(CmdType.CLICK_SCRIPT, "//button[@type='primary'] and text()='创建'")
        # webcmd.Run(True)
        # webcmd.WaitKeyBoard("q")

        # 等待创建成功
        while True:
            time.sleep(1)
            self.urlnew = self.driver.current_url
            print("CreateApp urlnew=", self.urlnew)
            if self.urlnew != self.urlold:
                print("CreateApp Finish =", self.urlnew)
                break

        time.sleep(2)

        # https://appstoreconnect.apple.com/apps/1525843317/appstore/ios/version/inflight
        url = self.driver.current_url
        print(url)
        head = "/apps/"
        idx = url.find(head) + len(head)
        url = url[idx:]
        idx = url.find("/")
        appid = url[0:idx]
        print("appid create =", appid)
        if len(appid) > 2:
            mainAppInfo.SetAppId(isHD, Source.IOS, Source.APPSTORE, appid)
            self.FillAppInfo(isHD)
Пример #12
0
 def GetAppName(self, ishd):
     name = mainAppInfo.GetAppName(self.osApp, ishd, Source.LANGUAGE_CN)
     return name