def __init__(self, distribution: str, os: str, version: str, arch: str):
        self.phoencisWinePackager = PhoenicisWinePackageCreator(
        ).with_output_callback(self._building_hook)
        self.distribution = distribution
        self.version = version
        self.os = os
        self.arch = arch
        self.builder_stage_reader = BuilderStageReader()

        Task.__init__(self)
class PhoenicisWinePackageCreationTask(Task):
    def __init__(self, distribution: str, os: str, version: str, arch: str):
        self.phoencisWinePackager = PhoenicisWinePackageCreator(
        ).with_output_callback(self._building_hook)
        self.distribution = distribution
        self.version = version
        self.os = os
        self.arch = arch
        self.builder_stage_reader = BuilderStageReader()

        Task.__init__(self)

    def description(self):
        return "Phoenicis Wine Package Creation: %s / %s / %s / %s" % (
            self.distribution, self.version, self.os, self.arch)

    def argument(self):
        return {
            "os": self.os,
            "version": self.version,
            "arch": self.arch,
            "distribution": self.distribution
        }

    def get_progress(self):
        return self._progress

    def get_message(self):
        return self.builder_stage_reader.get_message()

    def set_progress(self, progress):
        self._progress = progress

    def handle(self):
        self.phoencisWinePackager.build(self.distribution, self.version,
                                        self.os, self.arch)

    def _building_hook(self, line):
        self.builder_stage_reader.feed(line)
        self.last_update_date = datetime.datetime.now()
        self.set_progress(
            self.builder_stage_reader.get_percentage_estimation())
コード例 #3
0
#!/usr/bin/env python
from wine.WineVersionFetcher import WineVersionFetcher
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator


def input_from_choices(choices, text):
    print("Choices: " + ", ".join(choices))
    result = input(text)
    if result not in choices:
        print("Invalid value")
        return input_from_choices(choices, text)
    return result


version = input_from_choices([version["name"] for version in WineVersionFetcher().fetch_versions(majors=[1, 2, 3, 4])],
                             "Please select a wine version to build: ")

arch = input_from_choices(["x86", "amd64"], "Choose an architecture: ")
os = input_from_choices(["linux", "darwin"], "Choose an OS: ")
distribution = input_from_choices(["upstream", "staging", "cx", "dos_support", "proton"], "Choose a distribution: ")

builder = PhoenicisWinePackageCreator()

builder.build(distribution, version, os, arch)
コード例 #4
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("cx", "winecx-18.1.0", "linux", "x86")
コード例 #5
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("upstream", "wine-4.0.1", "darwin", "mac32")
コード例 #6
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("cx", "winecx-18.1.0", "darwin", "amd64")
コード例 #7
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("staging", "wine-4.0", "linux", "x86")
コード例 #8
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("cx", "winecx-19.0.0", "darwin", "x86on64")
コード例 #9
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("upstream", "wine-4.0", "darwin", "amd64")
コード例 #10
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("upstream", "winecx-4.0", "linux", "x86")
コード例 #11
0
#!/usr/bin/env python
from packagers.PhoenicisWinePackageCreator import PhoenicisWinePackageCreator

builder = PhoenicisWinePackageCreator()

builder.build("upstream", "wine-4.9", "linux", "amd64")