Пример #1
0
	def loadData(self,dataFile="repodata.index"):
		repodata_xml = os.path.join(self.basePath,dataFile)
		repodata = minidom.parse(repodata_xml)
		# print(repodata.toxml(encoding="utf-8"),end="\n")
		packages=repodata.getElementsByTagName("package")

		for i in range(packages.length):
			self.packages.append(winPackage.package(os.path.join(self.basePath,packages.item(i).getAttribute("path"),packages.item(i).getAttribute("path")+".winpackage")))
Пример #2
0
	def fileSelected():
		filename = tkinter.filedialog.askopenfilename()
		if filename is not "":
			source_description.set("file name:")
			source_path.set(os.path.basename(filename))
			long_name.set(os.path.basename(filename).rpartition(".")[0])
			packageData['path'] = filename
			package = winPackage.package(Name=long_name.get(),DestinationPath=os.path.join("..","repo"),SourcePath=packageData['path'])
			tree = tkinter.ttk.Treeview(managerWindow_mainframe, columns=('installer', 'parameters', 'size'))
			tree.grid(column=1, row=5, sticky=(tkinter.S, tkinter.W))
			
			tree.column('installer', width=10, anchor='center')
			tree.column('parameters', width=300, anchor='e')
			tree.column('size', width=100, anchor='w')
			
			tree.heading('installer', text='Installer?')
			tree.heading('parameters', text='Parameters')
			tree.heading('size', text='Size')
			
			tree.insert('', 'end', text=package.FileTree.Trunk.Name)
Пример #3
0
	def createPackage():
		package = winPackage.package(Name=long_name.get(),DestinationPath=os.path.join("..","repo"),SourcePath=packageData['path'])
		package.build()