How to use the briefcase.commands.CreateCommand 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 / linux / appimage.py View on Github external
)

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

    def verify_tools(self):
        """
        Verify that we're on Linux.
        """
        if self.host_os != 'Linux':
            raise BriefcaseCommandError("""
Linux AppImages can only be generated on Linux.
""")


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."
github beeware / briefcase / src / briefcase / platforms / macOS / app.py View on Github external
from briefcase.exceptions import BriefcaseCommandError
from briefcase.integrations.xcode import get_identities
from briefcase.platforms.macOS import macOSMixin


class macOSAppMixin(macOSMixin):
    output_format = 'app'

    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):
        """
github beeware / briefcase / src / briefcase / platforms / windows / msi.py View on Github external
before installing WiX. Open the Control Panel, select "Programs and Features",
then "Turn Windows features on or off". Ensure ".NET Framework 3.5 (Includes
.NET 2.0 and 3.0)" is enabled.
""")
        elif not (
            self.heat_exe.exists()
            and self.light_exe.exists()
            and self.candle_exe.exists()
        ):
            raise BriefcaseCommandError("""
The WIX environment variable does not point to an install of the WiX Toolset.
Current value: {wix_path!r}
""".format(wix_path=wix_path))


class WindowsMSICreateCommand(WindowsMSIMixin, CreateCommand):
    description = "Create and populate a Windows app packaged as an MSI."

    @property
    def support_package_url(self):
        """
        Gets the URL to the embedded Python support package.

        Python provides redistributable zip files containing the Windows builds,
        making it easy to redistribute Python as part of another software
        package.

        :returns: The support package URL.
        """
        version = "%s.%s.%s" % sys.version_info[:3]
        arch = "amd64" if (struct.calcsize("P") * 8) == 64 else "win32"
github beeware / briefcase / src / briefcase / platforms / iOS / xcode.py View on Github external
)
            )
        elif len(devices) == 1:
            udid = list(devices.keys())[0]
        else:
            print()
            print("Select simulator device:")
            print()
            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