How to use the briefcase.commands.BuildCommand function in briefcase

To help you get started, we’ve selected a few briefcase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beeware / briefcase / src / briefcase / platforms / windows / msi.py View on Github external
)
        pth_file = self.support_path(app) / 'python{version_tag}._pth'.format(
            version_tag=version_tag
        )
        with pth_file.open('w') as f:
            f.write('python{version_tag}.zip\n'.format(version_tag=version_tag))
            f.write(".\n")
            f.write("..\\\\app\n")
            f.write("..\\\\app_packages\n")


class WindowsMSIUpdateCommand(WindowsMSIMixin, UpdateCommand):
    description = "Update an existing Windows app packaged as an MSI."


class WindowsMSIBuildCommand(WindowsMSIMixin, BuildCommand):
    description = "Build an MSI for a Windows app."

    def build_app(self, app: BaseConfig, **kwargs):
        """
        Build an application.

        :param app: The application to build
        """
        print()
        print("[{app.name}] Building MSI...".format(app=app))

        try:
            print()
            print("Compiling application manifest...")
            self.subprocess.run(
                [
github beeware / briefcase / src / briefcase / platforms / macOS / app.py View on Github external
def binary_path(self, app):
        return self.bundle_path(app) / '{app.formal_name}.app'.format(app=app)

    def distribution_path(self, app):
        return self.binary_path(app)


class macOSAppCreateCommand(macOSAppMixin, CreateCommand):
    description = "Create and populate a macOS app."


class macOSAppUpdateCommand(macOSAppMixin, UpdateCommand):
    description = "Update an existing macOS app."


class macOSAppBuildCommand(macOSAppMixin, BuildCommand):
    description = "Build a macOS app."


class macOSAppRunCommand(macOSAppMixin, RunCommand):
    description = "Run a macOS app."

    def run_app(self, app: BaseConfig, **kwargs):
        """
        Start the application.

        :param app: The config object for the app
        :param base_path: The path to the project directory.
        """
        print()
        print('[{app.name}] Starting app...'.format(
            app=app
github beeware / briefcase / src / briefcase / platforms / linux / appimage.py View on Github external
class LinuxAppImageCreateCommand(LinuxAppImageMixin, CreateCommand):
    description = "Create and populate a Linux AppImage."

    @property
    def support_package_key_prefix(self):
        return 'python/{self.python_version_tag}/{self.platform}/{self.host_arch}/'.format(
            self=self,
        )


class LinuxAppImageUpdateCommand(LinuxAppImageMixin, UpdateCommand):
    description = "Update an existing Linux AppImage."


class LinuxAppImageBuildCommand(LinuxAppImageMixin, BuildCommand):
    description = "Build a Linux AppImage."

    @property
    def linuxdeploy_download_url(self):
        return (
            'https://github.com/linuxdeploy/linuxdeploy/'
            'releases/download/continuous/linuxdeploy-{self.host_arch}.AppImage'.format(
                self=self
            )
        )

    def verify_tools(self):
        super().verify_tools()

        try:
            print()
github beeware / briefcase / src / briefcase / platforms / iOS / xcode.py View on Github external
udid = select_option(devices, input=self.input)

        device = devices[udid]

        return udid, iOS_version, device


class iOSXcodeCreateCommand(iOSXcodePassiveMixin, CreateCommand):
    description = "Create and populate a iOS Xcode project."


class iOSXcodeUpdateCommand(iOSXcodePassiveMixin, UpdateCommand):
    description = "Update an existing iOS Xcode project."


class iOSXcodeBuildCommand(iOSXcodeMixin, BuildCommand):
    description = "Build an iOS Xcode project."

    def build_app(self, app: BaseConfig, udid=None, **kwargs):
        """
        Build the Xcode project for the application.

        :param app: The application to build
        :param udid: The device UDID to target. If ``None``, the user will
            be asked to select a device at runtime.
        """
        udid, iOS_version, device = self.select_target_device(udid)

        print()
        print("Targeting an {device} running iOS {iOS_version} (device UDID {udid})".format(
            device=device,
            iOS_version=iOS_version,