def appleProvisioningProfile(self): if self._currentPlatformID != self.IOS_PLATFORM: return None certPaths = [ FileUtils.createPath( self.platformProjectPath, 'cert', self.buildTypeFolderName, isDir=True), FileUtils.createPath(self.platformProjectPath, 'cert', isDir=True) ] if self.iosAdHoc: certPaths.insert(0, FileUtils.createPath( self.platformProjectPath, 'cert', 'adhoc', isDir=True)) for certPath in certPaths: if not os.path.exists(certPath): continue filename = self.getSetting('PROVISIONING_PROFILE', None) if filename is None: for path in FileUtils.getFilesOnPath(certPath): if path.endswith('.mobileprovision'): return path continue filename = filename.replace('\\', '/').strip('/').split('/') path = FileUtils.createPath(certPath, filename, isFile=True) if not os.path.exists(path) and os.path.exists(path + '.mobileprovision'): path += '.mobileprovision' if os.path.exists(path): return path return None
def certificate(self): """Returns the absolute path to the certificate file needed for packaging.""" certPaths = [ FileUtils.createPath( self.platformProjectPath, 'cert', self.buildTypeFolderName, isDir=True), FileUtils.createPath(self.platformProjectPath, 'cert', isDir=True) ] for certPath in certPaths: if not os.path.exists(certPath): continue certFileName = self.getSetting('CERTIFICATE') if certFileName is None: for path in FileUtils.getFilesOnPath(certPath): if path.endswith('.p12'): return path continue certFileName = certFileName.replace('\\', '/').strip('/').split('/') certPath = FileUtils.createPath(certPath, certFileName, isFile=True) if not os.path.exists(certPath) and os.path.exists(certPath + '.p12'): certPath += '.p12' if os.path.exists(certPath): return certPath return None
def _createEngineCss(self): resourcePath = StaticFlowEnvironment.rootResourcePath sourceFolder = FileUtils.createPath(resourcePath, '..', 'css', isDir=True) targetFolder = FileUtils.createPath(resourcePath, 'web', 'css', isDir=True) tempPath = FileUtils.createPath(targetFolder, 'engine.temp.css', isFile=True) SystemUtils.remove(tempPath) destF = open(tempPath, 'a') for item in FileUtils.getFilesOnPath(sourceFolder): try: f = open(item, 'r') destF.write('\n' + f.read()) f.close() except Exception , err: print 'ERROR: Failed to read CSS file:', item