mission-control-desktop

    Rules of the Mission Control desktop app: its arguments, its instance, its releases and how to install it

    mission-control
    proton
    desktop
    ui
    Download zip
    Author
    Version
    0.7.0
    License
    Apache-2.0
    Last updated
    12 hours ago
    Downloads
    143

    #mission-control-desktop

    The rules of the Mission Control desktop app. The module has no I/O and no window. It builds on wasm, wasm-gc, js and native, so all its rules have tests that need no browser engine.

    • DesktopCommand is what the app does: OpenWindow opens the window of an instance, and Serve runs the server of an instance. DesktopCommand::parse reads the arguments of the app, and to_arguments writes them.
    • asked_instance gives the instance of the option --instance or of the variable MISSION_CONTROL_INSTANCE.
    • installed_instance_path gives the path of the file mission-control-instance.txt of an installed app, and installed_instance reads its text. The file has the name of one instance in one line. On macOS, it is in the bundle. On the other systems, it is next to the program.
    • app_identifier gives the identifier of the app for an instance. The system opens one window for each identifier.
    • window_title gives the title of the window.
    • bundle_helper selects the helper program of Proton in a macOS bundle, so the app also opens when the bundle has another name.
    • InstallPlace is the place of an app that is installed for one instance, below the base folder: its folder, its program, and its files with the version and the name of the instance.
    • AppEntry is how a user finds an installed app: a shortcut in the Start menu, a bundle in ~/Applications, or a MenuEntry in the application menu of Linux. With MISSION_CONTROL_HOME, there is no entry.
    • AppPlatform is a platform that has an app: windows-x64, darwin-arm64 or linux-x64. Machine is the machine that asks for one.
    • ReleaseList is the file desktop.json of a release, and AppRecord is the file mission-control-app.json of an installed app.

    mission-control desktop uses DesktopCommand::to_arguments to start the app. The app itself is apps/desktop-host. It opens the window with Proton, and it is not a member of moon.work, because a build of Proton needs the CEF SDK.

    #Arguments

    ArgumentsResult
    [--instance NAME] [--folder PATH]Opens the window. With a folder, the window shows the project of that folder. PATH is a complete path.
    serve --instance NAMERuns the server of the instance. The app starts itself with these arguments.

    #The files of a release

    A release has two archives for each platform. mission-control-desktop-<platform>.tar.gz has the app, and mission-control-desktop-engine-<platform>.tar.gz has the browser engine, which is much larger. desktop.json has the name, the size and the SHA-256 of each archive and the ID of each engine. ReleaseList::parse reads it. InstallPlan selects the archives: when the machine has the engine of the release, only the app is necessary.

    mise run desktop:package makes these files for your machine.

    #Write a source or a provider

    mission-control desktop install and mission-control desktop update use two traits:

    • ReleaseSource gives the list of a release and the bytes of its archives. Write a source for another place of the files, such as a folder, a mirror or a package server. The installation checks the size and the SHA-256 of each archive, so a source does not.
    • DesktopProvider installs the app and says which app is installed. Write a provider for another way to install, such as a signed installer. A provider that installs without archives gives a DesktopRelease without files.

    The provider of the command is ArchiveProvider in apps/cli/archives. It puts an app together from the archives of a source.

    Each error has a sentence for people, and the command shows it. A source raises SourceError, and a provider raises ProviderError. When write raises an error, the source stops and passes it on.

    This source has one release in memory:

    ///|
    struct MemorySource {
    list : @desktop.ReleaseList
    archives : Map[@desktop.FileName, Bytes]
    }

    ///|
    impl @desktop.ReleaseSource for MemorySource with fn release(self, choice) {
    guard choice is Newest || choice == Exact(self.list.version()) else {
    raise NoRelease(choice, source="The memory")
    }
    self.list
    }

    ///|
    impl @desktop.ReleaseSource for MemorySource with fn fetch(
    self,
    _version,
    archive,
    write~,
    ) {
    guard self.archives.get(archive.name()) is Some(bytes) else {
    raise @desktop.SourceError::NotReceived(
    "The memory has no file \{archive.name().to_string()}.",
    )
    }
    write(bytes)
    }

    ///|
    async test "a source gives the archive that the list names" {
    let source = MemorySource::{
    list: @desktop.ReleaseList::parse(
    (
    #|{
    #| "format": 1,
    #| "version": "0.6.0",
    #| "platforms": {
    #| "linux-x64": {
    #| "app": {
    #| "file": "app.tar.gz",
    #| "size": 3,
    #| "sha256": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
    #| },
    #| "engine": {
    #| "id": "cef-1",
    #| "file": "engine.tar.gz",
    #| "size": 3,
    #| "sha256": "cb8379ac2098aa165029e3938a51da0bcecfc008fd6795f401178647f96c5b34"
    #| }
    #| }
    #| }
    #|}
    ),
    ),
    archives: Map([(@desktop.FileName::FileName("app.tar.gz"), b"abc")]),
    }
    let list = @desktop.ReleaseSource::release(source, Newest)
    guard list.files(LinuxX64) is Some(files) else {
    fail("The list has no app for Linux")
    }
    // The machine has the engine of this release, so only the app comes from the source.
    guard @desktop.InstallPlan::InstallPlan(files, Some(files.engine_id))
    is AppOnly(app~, _) else {
    fail("The plan also gets the engine")
    }
    let received = []
    @desktop.ReleaseSource::fetch(source, list.version(), app, write=bytes => {
    received.push(bytes.to_owned())
    })
    assert_eq(received, [b"abc"])
    }

    This provider only says what it would do. A provider keeps the old app until the new one is complete, because the app must open after an error:

    ///|
    struct DryRun {
    version : @contracts.Version
    program : @core.FolderPath
    }

    ///|
    impl @desktop.DesktopProvider for DryRun with fn installed(_, _) {
    None
    }

    ///|
    impl @desktop.DesktopProvider for DryRun with fn available(self, choice) {
    guard choice is Newest || choice == Exact(self.version) else {
    raise FromSource(NoRelease(choice, source="The dry run"))
    }
    { version: self.version, files: None, }
    }

    ///|
    impl @desktop.DesktopProvider for DryRun with fn install(
    self,
    instance,
    release,
    report~,
    ) {
    report(Replacing)
    report(Installed(release.version))
    { instance, version: Some(release.version), program: self.program, }
    }

    ///|
    async test "a provider reports its steps" {
    let provider = DryRun::{
    version: @contracts.Version::Version("0.6.0"),
    program: @core.FolderPath::FolderPath("/opt/mission-control", Linux),
    }
    let steps = []
    let app = @desktop.DesktopProvider::install(
    provider,
    @app.InstanceName::InstanceName("dev"),
    @desktop.DesktopProvider::available(provider, Newest),
    report=step => steps.push(step),
    )
    assert_eq(app.version, Some(provider.version))
    assert_eq(steps, [Replacing, Installed(provider.version)])
    }

    DesktopProvider

    pub(open) trait DesktopProvider {
    async fn installed(Self,
    InstanceName
    ) -> InstalledApp? raise ProviderError
    async fn available(Self, VersionChoice) -> DesktopRelease raise ProviderError
    async fn install(Self,
    InstanceName
    , DesktopRelease, report~ : async (InstallEvent) -> Unit noraise) -> InstalledApp raise ProviderError
    }

    Installs the desktop app and says which one is installed. mission-control desktopinstall and mission-control desktop update use only this trait, so another program can give another installation, for example one with a signed installer.

    ReleaseSource

    pub(open) trait ReleaseSource {
    async fn release(Self, VersionChoice) -> ReleaseList raise SourceError
    async fn fetch(Self,
    Version
    , ArchiveFile, write~ : async (BytesView) -> Unit) -> Unit
    }

    Gives the files of the releases. The installation checks the size and the SHA-256 of each archive, so a source has no check.

    AppRecordError

    pub(all) suberror AppRecordError {
    InvalidAppRecord
    InvalidEnginePath(String)
    } derive(Eq,
    Debug
    )

    Raised when the text of mission-control-app.json is wrong. An installation then replaces the app completely.

    AppRecordError::equal

    automatically derived

    AppRecordError::not_equal

    fn AppRecordError::not_equal(x : AppRecordError, y : AppRecordError) -> Bool
    automatically derived

    AppRecordError::to_repr

    automatically derived

    ArgumentError

    pub(all) suberror ArgumentError {
    UnknownArgument(String)
    MissingValue(DesktopOption)
    RepeatedOption(DesktopOption)
    MissingInstance
    WrongInstance(
    InstanceNameError
    )
    WrongFolder(
    FolderPathError
    )
    } derive(Eq,
    Debug
    )

    Raised when the desktop app cannot use its arguments.

    ArgumentError::equal

    automatically derived

    ArgumentError::message

    fn ArgumentError::message(self : ArgumentError) -> String

    The problem, as text for people.

    ArgumentError::not_equal

    fn ArgumentError::not_equal(x : ArgumentError, y : ArgumentError) -> Bool
    automatically derived

    ArgumentError::to_repr

    automatically derived

    FileAddressError

    pub(all) suberror FileAddressError {
    NotEncrypted(String)
    NotFileAddress(String)
    } derive(Eq,
    Debug
    )

    Raised when an address for files is wrong. No text in it has a login or a query.

    FileAddressError::equal

    automatically derived

    FileAddressError::message

    fn FileAddressError::message(self : FileAddressError) -> String

    The problem, as text for people.

    FileAddressError::not_equal

    fn FileAddressError::not_equal(x : FileAddressError, y : FileAddressError) -> Bool
    automatically derived

    FileAddressError::to_repr

    automatically derived

    HostNameError

    pub(all) suberror HostNameError {
    InvalidHostName(String)
    } derive(Eq,
    Debug
    )

    Raised when a text is not the name of a host. It has the text.

    HostNameError::equal

    automatically derived

    HostNameError::not_equal

    fn HostNameError::not_equal(x : HostNameError, y : HostNameError) -> Bool
    automatically derived

    HostNameError::to_repr

    automatically derived

    InstanceError

    Raised when the app cannot know its instance from the variable or the file.

    InstanceError::equal

    automatically derived

    InstanceError::message

    fn InstanceError::message(self : InstanceError) -> String

    The problem, as text for people.

    InstanceError::not_equal

    fn InstanceError::not_equal(x : InstanceError, y : InstanceError) -> Bool
    automatically derived

    InstanceError::to_repr

    automatically derived

    ProviderError

    pub(all) suberror ProviderError {
    NoAppForMachine(String)
    FromSource(SourceError)
    WrongArchive(FileName)
    AppRuns(folder~ :
    FolderPath
    )
    OtherRun(
    InstanceName
    )
    Failed(String)
    } derive(Eq,
    Debug
    )

    Raised when a provider did not do its work. The installed app then did not change. Each text is a sentence for people.

    ProviderError::equal

    automatically derived

    ProviderError::message

    fn ProviderError::message(self : ProviderError) -> String

    The problem, as text for people.

    ProviderError::not_equal

    fn ProviderError::not_equal(x : ProviderError, y : ProviderError) -> Bool
    automatically derived

    ProviderError::to_repr

    automatically derived

    ProxyAddressError

    pub(all) suberror ProxyAddressError {
    LoginInAddress
    OtherProxyType(String)
    NotProxyAddress(String)
    } derive(Eq,
    Debug
    )

    Raised when the address of a proxy is wrong. No text in it has a login.

    ProxyAddressError::equal

    automatically derived

    ProxyAddressError::message

    fn ProxyAddressError::message(self : ProxyAddressError) -> String

    The problem, as text for people.

    ProxyAddressError::not_equal

    fn ProxyAddressError::not_equal(x : ProxyAddressError, y : ProxyAddressError) -> Bool
    automatically derived

    ProxyAddressError::to_repr

    automatically derived

    ProxyLoginError

    pub(all) suberror ProxyLoginError {
    InvalidProxyLogin
    } derive(Eq,
    Debug
    )

    Raised when a text is not a login. It does not have the text.

    ProxyLoginError::equal

    automatically derived

    ProxyLoginError::not_equal

    fn ProxyLoginError::not_equal(x : ProxyLoginError, y : ProxyLoginError) -> Bool
    automatically derived

    ProxyLoginError::to_repr

    automatically derived

    ProxyVariableError

    pub(all) suberror ProxyVariableError {
    WrongProxyVariable(variable~ : String, ProxyAddressError)
    } derive(Eq,
    Debug
    )

    Raised when a variable of the shell has a wrong proxy.

    ProxyVariableError::equal

    automatically derived

    ProxyVariableError::message

    fn ProxyVariableError::message(self : ProxyVariableError) -> String

    The problem, as text for people.

    ProxyVariableError::not_equal

    automatically derived

    ProxyVariableError::to_repr

    automatically derived

    ReleaseError

    pub(all) suberror ReleaseError {
    NewerFormat(Int)
    WrongList(String)
    InvalidFileName(String)
    InvalidSize(Double)
    InvalidSha256(String)
    InvalidEngineId(String)
    } derive(Eq,
    Debug
    )

    Raised when a text is not a part of a release.

    ReleaseError::equal

    automatically derived

    ReleaseError::message

    fn ReleaseError::message(self : ReleaseError) -> String

    The problem with a release, as text for people. The command adds which release it is.

    ReleaseError::not_equal

    fn ReleaseError::not_equal(x : ReleaseError, y : ReleaseError) -> Bool
    automatically derived

    ReleaseError::to_repr

    automatically derived

    SourceError

    pub(all) suberror SourceError {
    NoRelease(VersionChoice, source~ : String)
    BadRelease(ReleaseError, source~ : String)
    NotReceived(String)
    } derive(Eq,
    Debug
    )

    Raised when a source cannot give a release. Each text is a sentence for people.

    SourceError::equal

    fn SourceError::equal(SourceError, SourceError) -> Bool
    automatically derived

    SourceError::message

    fn SourceError::message(self : SourceError) -> String

    The problem, as text for people.

    SourceError::not_equal

    fn SourceError::not_equal(x : SourceError, y : SourceError) -> Bool
    automatically derived

    SourceError::to_repr

    automatically derived

    AppEntry

    pub(all) enum AppEntry {
    NoEntry
    StartMenu(name~ : String)
    Applications(bundle~ :
    FolderPath
    )
    ApplicationMenu(MenuEntry)
    } derive(Eq,
    Debug
    )

    How a user opens an installed app without a terminal.

    AppEntry::equal

    fn AppEntry::equal(AppEntry, AppEntry) -> Bool
    automatically derived

    AppEntry::not_equal

    fn AppEntry::not_equal(x : AppEntry, y : AppEntry) -> Bool
    automatically derived

    AppEntry::of_env

    The entry of an app that is installed with these variables.

    AppEntry::to_repr

    automatically derived

    AppPlatform

    pub(all) enum AppPlatform {
    WindowsX64
    DarwinArm64
    LinuxX64
    } derive(Eq, Hash,
    Debug
    )

    A platform that has a desktop app. Proton has an engine for these only, and MoonBit can build the app for them.

    AppPlatform::equal

    fn AppPlatform::equal(AppPlatform, AppPlatform) -> Bool
    automatically derived

    AppPlatform::hash

    fn AppPlatform::hash(self : AppPlatform) -> Int
    automatically derived

    AppPlatform::hash_combine

    fn AppPlatform::hash_combine(AppPlatform, Hasher) -> Unit
    automatically derived

    AppPlatform::name

    fn AppPlatform::name(self : AppPlatform) -> String

    The name of the platform in the files of a release, such as windows-x64.

    AppPlatform::not_equal

    fn AppPlatform::not_equal(x : AppPlatform, y : AppPlatform) -> Bool
    automatically derived

    AppPlatform::of_name

    fn AppPlatform::of_name(name : String) -> AppPlatform?

    The platform with this name.

    AppPlatform::to_repr

    automatically derived

    AppRecord

    What an installation knows about the app that it installed. It is the content of mission-control-app.json.

    AppRecord::equal

    fn AppRecord::equal(AppRecord, AppRecord) -> Bool
    automatically derived

    AppRecord::not_equal

    fn AppRecord::not_equal(x : AppRecord, y : AppRecord) -> Bool
    automatically derived

    AppRecord::parse

    fn AppRecord::parse(text : String) -> AppRecord raise AppRecordError

    Reads the text of mission-control-app.json.

    AppRecord::to_json

    AppRecord::to_repr

    automatically derived

    ArchiveFile

    type ArchiveFile derive(Eq,
    Debug
    )

    One archive of a release.

    ArchiveFile::ArchiveFile

    fn ArchiveFile::ArchiveFile(name : FileName, size : Double, sha256 : Sha256) -> ArchiveFile raise ReleaseError

    The size is a number of bytes from 1 to 4 GB.

    ArchiveFile::equal

    fn ArchiveFile::equal(ArchiveFile, ArchiveFile) -> Bool
    automatically derived

    ArchiveFile::name

    fn ArchiveFile::name(self : ArchiveFile) -> FileName

    ArchiveFile::not_equal

    fn ArchiveFile::not_equal(x : ArchiveFile, y : ArchiveFile) -> Bool
    automatically derived

    ArchiveFile::sha256

    fn ArchiveFile::sha256(self : ArchiveFile) -> Sha256

    ArchiveFile::size

    fn ArchiveFile::size(self : ArchiveFile) -> Int64

    The size in bytes.

    ArchiveFile::to_repr

    automatically derived

    DesktopCommand

    What the desktop app does.

    DesktopCommand::equal

    automatically derived

    DesktopCommand::not_equal

    fn DesktopCommand::not_equal(x : DesktopCommand, y : DesktopCommand) -> Bool
    automatically derived

    DesktopCommand::parse

    Reads the arguments after the name of the program:

    • [--instance NAME] [--folder PATH] opens the window.
    • serve --instance NAME runs the server.

    --folder needs a complete path, because the working directory of an app depends on how the user opens it. The platform gives the rules for the path.

    DesktopCommand::to_arguments

    fn DesktopCommand::to_arguments(self : DesktopCommand) -> ReadOnlyArray[String]

    The arguments that give this command.

    DesktopCommand::to_repr

    automatically derived

    DesktopOption

    pub(all) enum DesktopOption {
    Instance
    Folder
    } derive(Eq,
    Debug
    )

    An option of the desktop app.

    DesktopOption::equal

    automatically derived

    DesktopOption::not_equal

    fn DesktopOption::not_equal(x : DesktopOption, y : DesktopOption) -> Bool
    automatically derived

    DesktopOption::text

    fn DesktopOption::text(self : DesktopOption) -> String

    The text of the option.

    DesktopOption::to_repr

    automatically derived

    DesktopRelease

    A release of the app that a provider can install.

    DesktopRelease::equal

    automatically derived

    DesktopRelease::not_equal

    fn DesktopRelease::not_equal(x : DesktopRelease, y : DesktopRelease) -> Bool
    automatically derived

    DesktopRelease::to_repr

    automatically derived

    EngineId

    The ID of an engine. Two builds with the same engine files have the same ID. On Linux it is a part of the name of a folder.

    EngineId::EngineId

    fn EngineId::EngineId(text : String) -> EngineId raise ReleaseError

    An ID has 1 to 80 lower-case letters, digits, periods and hyphens. It starts with a letter.

    EngineId::equal

    fn EngineId::equal(EngineId, EngineId) -> Bool
    automatically derived

    EngineId::hash

    fn EngineId::hash(self : EngineId) -> Int
    automatically derived

    EngineId::hash_combine

    fn EngineId::hash_combine(EngineId, Hasher) -> Unit
    automatically derived

    EngineId::not_equal

    fn EngineId::not_equal(x : EngineId, y : EngineId) -> Bool
    automatically derived

    EngineId::to_repr

    automatically derived

    EngineId::to_string

    fn EngineId::to_string(self : EngineId) -> String

    EnginePath

    type EnginePath derive(Eq,
    Debug
    )

    The path of a file of the engine, from the folder of the app and with / between its names.

    EnginePath::EnginePath

    fn EnginePath::EnginePath(text : String) -> EnginePath raise AppRecordError

    A path has names that are not empty, . or ... A name has no backslash and no colon, because these have a meaning on Windows.

    EnginePath::equal

    fn EnginePath::equal(EnginePath, EnginePath) -> Bool
    automatically derived

    EnginePath::not_equal

    fn EnginePath::not_equal(x : EnginePath, y : EnginePath) -> Bool
    automatically derived

    EnginePath::to_repr

    automatically derived

    EnginePath::to_string

    fn EnginePath::to_string(self : EnginePath) -> String

    FileAddress

    type FileAddress

    The address of a file that the command downloads. It is encrypted, or its host is this machine. A query can have a token, so shown gives the address for people.

    FileAddress::host

    fn FileAddress::host(self : FileAddress) -> HostName

    FileAddress::origin

    fn FileAddress::origin(self : FileAddress) -> String

    The scheme, the host and the port, such as https://example.com.

    FileAddress::parse

    fn FileAddress::parse(text : String) -> FileAddress raise FileAddressError

    FileAddress::redirect

    fn FileAddress::redirect(self : FileAddress, location : String) -> FileAddress raise FileAddressError

    The address to which a server sends the command. location is a complete address, or it starts at this address, as in RFC 3986: /a is on the same server, a and ../a start at the folder of the file, and ?a is the same file with another query.

    FileAddress::shown

    fn FileAddress::shown(self : FileAddress) -> String

    The address for people and for a log, without its query.

    FileAddress::target

    fn FileAddress::target(self : FileAddress) -> String

    The path and the query, for a request. Do not show it.

    FileName

    The name of one file, without a folder. So a list cannot select a path.

    FileName::FileName

    fn FileName::FileName(text : String) -> FileName raise ReleaseError

    A name has 1 to 120 letters, digits, periods, hyphens and underscores. It starts with a letter or a digit.

    FileName::equal

    fn FileName::equal(FileName, FileName) -> Bool
    automatically derived

    FileName::hash

    fn FileName::hash(self : FileName) -> Int
    automatically derived

    FileName::hash_combine

    fn FileName::hash_combine(FileName, Hasher) -> Unit
    automatically derived

    FileName::not_equal

    fn FileName::not_equal(x : FileName, y : FileName) -> Bool
    automatically derived

    FileName::to_repr

    automatically derived

    FileName::to_string

    fn FileName::to_string(self : FileName) -> String

    HostName

    type HostName derive(Eq,
    Debug
    )

    The name or the IP address of a host, in lower case. An IPv6 address has its brackets.

    HostName::HostName

    fn HostName::HostName(text : String) -> HostName raise HostNameError

    A name has 1 to 253 ASCII letters, digits, hyphens and underscores, with periods between its parts. A period at the end goes. An IPv6 address is in brackets.

    HostName::equal

    fn HostName::equal(HostName, HostName) -> Bool
    automatically derived

    HostName::is_loopback

    fn HostName::is_loopback(self : HostName) -> Bool

    True for a name or an address that is always this machine.

    HostName::not_equal

    fn HostName::not_equal(x : HostName, y : HostName) -> Bool
    automatically derived

    HostName::to_repr

    automatically derived

    HostName::to_string

    fn HostName::to_string(self : HostName) -> String

    HostRule

    pub(all) enum HostRule {
    AnyHost
    HostAndBelow(HostName)
    } derive(Eq,
    Debug
    )

    Hosts to which the command connects without the proxy.

    HostRule::equal

    fn HostRule::equal(HostRule, HostRule) -> Bool
    automatically derived

    HostRule::matches

    fn HostRule::matches(self : HostRule, host : HostName) -> Bool

    HostRule::not_equal

    fn HostRule::not_equal(x : HostRule, y : HostRule) -> Bool
    automatically derived

    HostRule::parse

    fn HostRule::parse(text : String) -> HostRule raise HostNameError

    Reads one entry of no_proxy: * or a host name. .example.com and *.example.com are other forms of example.com.

    HostRule::to_repr

    automatically derived

    HttpScheme

    pub(all) enum HttpScheme {
    Http
    Https
    } derive(Eq,
    Debug
    )

    How a connection starts.

    HttpScheme::equal

    fn HttpScheme::equal(HttpScheme, HttpScheme) -> Bool
    automatically derived

    HttpScheme::name

    fn HttpScheme::name(self : HttpScheme) -> String

    The text before ://.

    HttpScheme::not_equal

    fn HttpScheme::not_equal(x : HttpScheme, y : HttpScheme) -> Bool
    automatically derived

    HttpScheme::to_repr

    automatically derived

    InstallEvent

    pub(all) enum InstallEvent {
    ArchiveStarted(ArchiveFile)
    ArchiveProgress(ReceivedPart)
    EngineKept(EngineId)
    Replacing
    Incomplete(String)
    Installed(
    Version
    )
    } derive(Eq,
    Debug
    )

    A step of an installation, in the order in which the steps occur.

    InstallEvent::equal

    automatically derived

    InstallEvent::not_equal

    fn InstallEvent::not_equal(x : InstallEvent, y : InstallEvent) -> Bool
    automatically derived

    InstallEvent::to_repr

    automatically derived

    InstallPlace

    type InstallPlace derive(Eq,
    Debug
    )

    The place of an app that is installed for one instance, below the base folder. mission-control desktop install installs an app there, and mission-control desktop finds it there.

    InstallPlace::app

    The app itself. On macOS it is the bundle in the folder, which can be a link to the bundle in ~/Applications. On Windows and Linux it is the folder.

    InstallPlace::binary

    The path of the program that runs. On Linux program is a script that gives this program its engine. On Windows and macOS it is the same file as program.

    InstallPlace::equal

    automatically derived

    InstallPlace::folder

    The folder that has the app, and nothing else.

    InstallPlace::instance

    The instance that the app opens.

    InstallPlace::instance_file

    The path of the file with the name of the instance. An app on macOS for the instance of its channel has no such file.

    InstallPlace::not_equal

    fn InstallPlace::not_equal(x : InstallPlace, y : InstallPlace) -> Bool
    automatically derived

    InstallPlace::program

    The path of the program in the folder that mission-control desktop starts.

    InstallPlace::record_file

    The path of the file with the version of the app and its engine, in the folder.

    InstallPlace::to_repr

    automatically derived

    InstallPlan

    pub(all) enum InstallPlan {
    AppOnly(app~ : ArchiveFile, EngineId)
    AppAndEngine(app~ : ArchiveFile, engine~ : ArchiveFile, EngineId)
    } derive(Eq,
    Debug
    )

    What an installation gets from its source.

    InstallPlan::InstallPlan

    fn InstallPlan::InstallPlan(files : ReleaseFiles, here : EngineId?) -> InstallPlan

    Selects the archives. here is the engine that the machine has and that is complete.

    InstallPlan::equal

    fn InstallPlan::equal(InstallPlan, InstallPlan) -> Bool
    automatically derived

    InstallPlan::not_equal

    fn InstallPlan::not_equal(x : InstallPlan, y : InstallPlan) -> Bool
    automatically derived

    InstallPlan::to_repr

    automatically derived

    InstalledApp

    An app that is installed for an instance.

    InstalledApp::equal

    automatically derived

    InstalledApp::not_equal

    fn InstalledApp::not_equal(x : InstalledApp, y : InstalledApp) -> Bool
    automatically derived

    InstalledApp::to_repr

    automatically derived

    InstalledEngine

    type InstalledEngine derive(Eq,
    Debug
    )

    The engine of an installed app.

    InstalledEngine::InstalledEngine

    fn InstalledEngine::InstalledEngine(id : EngineId, paths : ArrayView[EnginePath], size~ : UInt64) -> InstalledEngine

    size is the number of bytes of all files in the paths. An installation uses the engine again only when it still has this size. On Linux there are no paths, because the apps share the folder of the engine.

    InstalledEngine::equal

    automatically derived

    InstalledEngine::id

    InstalledEngine::not_equal

    fn InstalledEngine::not_equal(x : InstalledEngine, y : InstalledEngine) -> Bool
    automatically derived

    InstalledEngine::paths

    fn InstalledEngine::paths(self : InstalledEngine) -> ReadOnlyArray[EnginePath]

    The files of the engine in the folder of the app.

    InstalledEngine::size

    fn InstalledEngine::size(self : InstalledEngine) -> UInt64

    The number of bytes of the engine files.

    InstalledEngine::to_repr

    automatically derived

    Machine

    The operating system and the processor of a machine.

    Machine::Machine

    fn Machine::Machine(system :
    Platform
    , processor : String) -> Machine

    The machine with this operating system. processor is the text that the system gives, such as AMD64 or aarch64. Windows on arm64 runs programs for x64.

    Machine::app

    fn Machine::app(self : Machine) -> AppPlatform?

    The app that runs on this machine, if there is one.

    Machine::equal

    fn Machine::equal(Machine, Machine) -> Bool
    automatically derived

    Machine::name

    fn Machine::name(self : Machine) -> String

    The operating system and the processor for people, such as linux-arm64.

    Machine::not_equal

    fn Machine::not_equal(x : Machine, y : Machine) -> Bool
    automatically derived

    Machine::to_repr

    automatically derived
    type MenuEntry derive(Eq,
    Debug
    )

    The entry of an installed app in the application menu of Linux, and the place of its icon.
    fn MenuEntry::equal(MenuEntry, MenuEntry) -> Bool
    automatically derived

    The path of the file of the entry.
    fn MenuEntry::icon_file(self : MenuEntry) -> String

    The name of the file of each icon.

    The folder of the icon theme. An icon of 48 pixels is at 48x48/apps/<icon_file> in it.
    fn MenuEntry::not_equal(x : MenuEntry, y : MenuEntry) -> Bool
    automatically derived
    fn MenuEntry::text(self : MenuEntry) -> String

    The text of the file of the entry.
    automatically derived

    Proxy

    pub(all) struct Proxy {
    address : ProxyAddress
    login : ProxyLogin?
    } derive(Eq,
    Debug
    )

    A proxy and the login for it.

    Proxy::equal

    fn Proxy::equal(Proxy, Proxy) -> Bool
    automatically derived

    Proxy::not_equal

    fn Proxy::not_equal(x : Proxy, y : Proxy) -> Bool
    automatically derived

    Proxy::to_repr

    automatically derived

    ProxyAddress

    type ProxyAddress derive(Eq,
    Debug
    )

    The address of an HTTP proxy: http:// or https://, a host and a port. Without a port, it is the one of the scheme.

    ProxyAddress::equal

    automatically derived

    ProxyAddress::not_equal

    fn ProxyAddress::not_equal(x : ProxyAddress, y : ProxyAddress) -> Bool
    automatically derived

    ProxyAddress::parse

    fn ProxyAddress::parse(text : String) -> ProxyAddress raise ProxyAddressError

    Reads the address in a setting. It has no login, because a file is not a place for a password.

    ProxyAddress::to_repr

    automatically derived

    ProxyAddress::to_string

    fn ProxyAddress::to_string(self : ProxyAddress) -> String

    ProxyChoice

    pub(all) enum ProxyChoice {
    FromVariables
    NoProxy
    Use(ProxyAddress)
    } derive(Eq,
    Debug
    )

    The proxy that a user selects in the configuration.

    ProxyChoice::equal

    fn ProxyChoice::equal(ProxyChoice, ProxyChoice) -> Bool
    automatically derived

    ProxyChoice::not_equal

    fn ProxyChoice::not_equal(x : ProxyChoice, y : ProxyChoice) -> Bool
    automatically derived

    ProxyChoice::parse

    fn ProxyChoice::parse(text : String) -> ProxyChoice raise ProxyAddressError

    Reads the setting download.proxy: an address, or none.

    ProxyChoice::to_repr

    automatically derived

    ProxyLogin

    type ProxyLogin derive(Eq)

    The user name and the password for a proxy. Debug does not show them.

    ProxyLogin::equal

    fn ProxyLogin::equal(ProxyLogin, ProxyLogin) -> Bool
    automatically derived

    ProxyLogin::expose

    fn ProxyLogin::expose(self : ProxyLogin) -> String

    The user name and the password with : between them, for the header of a request. Do not show it.

    ProxyLogin::not_equal

    fn ProxyLogin::not_equal(x : ProxyLogin, y : ProxyLogin) -> Bool
    automatically derived

    ProxyLogin::parse

    fn ProxyLogin::parse(text : String) -> ProxyLogin raise ProxyLoginError

    Reads a user name and a password with : between them. The password can have a :.

    ProxyLogin::to_repr

    ProxyRules

    type ProxyRules derive(Eq,
    Debug
    )

    Which proxy the command uses for a host.

    ProxyRules::ProxyRules

    fn ProxyRules::ProxyRules(choice : ProxyChoice, env_vars : Map[String, String], login? : ProxyLogin, direct? : ArrayView[HostRule]) -> ProxyRules raise ProxyVariableError

    The rules of the settings and of the variables of the shell. login is the one of the setting download.proxy_login, and direct is download.no_proxy. The settings win.

    NO_PROXY is for all programs, so it can have entries that the command does not know, such as a network. The command ignores these.

    ProxyRules::equal

    fn ProxyRules::equal(ProxyRules, ProxyRules) -> Bool
    automatically derived

    ProxyRules::not_equal

    fn ProxyRules::not_equal(x : ProxyRules, y : ProxyRules) -> Bool
    automatically derived

    ProxyRules::proxy_for

    fn ProxyRules::proxy_for(self : ProxyRules, host : HostName) -> Proxy?

    The proxy for a connection to this host. None is a connection without a proxy. A connection to this machine has none, because the proxy would connect to its own machine.

    ProxyRules::to_repr

    automatically derived

    ReceivedPart

    type ReceivedPart derive(Eq,
    Debug
    )

    The part of an archive that came from a source. It never has more bytes than the archive.

    ReceivedPart::ReceivedPart

    fn ReceivedPart::ReceivedPart(archive : ArchiveFile) -> ReceivedPart

    The part before the first byte.

    ReceivedPart::add

    fn ReceivedPart::add(self : ReceivedPart, chunk : BytesView) -> ReceivedPart?

    The part with these bytes at its end. None when the archive has not so many bytes.

    ReceivedPart::archive

    fn ReceivedPart::archive(self : ReceivedPart) -> ArchiveFile

    ReceivedPart::bytes

    fn ReceivedPart::bytes(self : ReceivedPart) -> Int64

    The number of bytes, from 0 to the size of the archive.

    ReceivedPart::equal

    automatically derived

    ReceivedPart::is_complete

    fn ReceivedPart::is_complete(self : ReceivedPart) -> Bool

    True when the part has as many bytes as the archive.

    ReceivedPart::not_equal

    fn ReceivedPart::not_equal(x : ReceivedPart, y : ReceivedPart) -> Bool
    automatically derived

    ReceivedPart::to_repr

    automatically derived

    ReleaseFiles

    pub(all) struct ReleaseFiles {
    app : ArchiveFile
    engine_id : EngineId
    engine : ArchiveFile
    } derive(Eq,
    Debug
    )

    The archives of the app for one platform.

    ReleaseFiles::equal

    automatically derived

    ReleaseFiles::not_equal

    fn ReleaseFiles::not_equal(x : ReleaseFiles, y : ReleaseFiles) -> Bool
    automatically derived

    ReleaseFiles::to_repr

    automatically derived

    ReleaseFolder

    pub(all) enum ReleaseFolder {
    LatestFolder
    VersionFolder(
    Version
    )
    } derive(Eq,
    Debug
    )

    A folder with the files of one release.

    ReleaseFolder::equal

    automatically derived

    ReleaseFolder::not_equal

    fn ReleaseFolder::not_equal(x : ReleaseFolder, y : ReleaseFolder) -> Bool
    automatically derived

    ReleaseFolder::to_repr

    automatically derived

    ReleaseList

    type ReleaseList derive(Eq,
    Debug
    )

    The list of the files of one release.

    ReleaseList::ReleaseList

    ReleaseList::equal

    fn ReleaseList::equal(ReleaseList, ReleaseList) -> Bool
    automatically derived

    ReleaseList::files

    fn ReleaseList::files(self : ReleaseList, platform : AppPlatform) -> ReleaseFiles?

    The archives for a platform. A release can have no app for it.

    ReleaseList::not_equal

    fn ReleaseList::not_equal(x : ReleaseList, y : ReleaseList) -> Bool
    automatically derived

    ReleaseList::parse

    fn ReleaseList::parse(text : String) -> ReleaseList raise ReleaseError

    Reads the text of desktop.json. The list of a later version can have more platforms and more keys in the same format, so the function ignores those that it does not know.

    ReleaseList::to_json

    The JSON form is the content of desktop.json.

    ReleaseList::to_repr

    automatically derived

    ReleaseSite

    pub(all) enum ReleaseSite {
    GitHub
    Mirror(SourceAddress)
    } derive(Eq,
    Debug
    )

    Where the releases are.

    ReleaseSite::equal

    fn ReleaseSite::equal(ReleaseSite, ReleaseSite) -> Bool
    automatically derived

    ReleaseSite::file

    fn ReleaseSite::file(self : ReleaseSite, folder : ReleaseFolder, name : FileName) -> FileAddress raise FileAddressError

    The address of a file of a release.

    ReleaseSite::not_equal

    fn ReleaseSite::not_equal(x : ReleaseSite, y : ReleaseSite) -> Bool
    automatically derived

    ReleaseSite::to_repr

    automatically derived

    ReleaseSite::to_string

    fn ReleaseSite::to_string(self : ReleaseSite) -> String

    The address of the site.

    Sha256

    The SHA-256 of a file.

    Sha256::Sha256

    fn Sha256::Sha256(text : String) -> Sha256 raise ReleaseError

    Reads 64 lower-case hexadecimal digits.

    Sha256::equal

    fn Sha256::equal(Sha256, Sha256) -> Bool
    automatically derived

    Sha256::hash

    fn Sha256::hash(self : Sha256) -> Int
    automatically derived

    Sha256::hash_combine

    fn Sha256::hash_combine(Sha256, Hasher) -> Unit
    automatically derived

    Sha256::not_equal

    fn Sha256::not_equal(x : Sha256, y : Sha256) -> Bool
    automatically derived

    Sha256::to_repr

    automatically derived

    Sha256::to_string

    fn Sha256::to_string(self : Sha256) -> String

    SourceAddress

    type SourceAddress derive(Eq,
    Debug
    )

    The address of a mirror with the releases of the app, such as https://mirror.example.com/mission-control. It is encrypted, or its host is this machine, and it has no login and no query.

    SourceAddress::equal

    automatically derived

    SourceAddress::not_equal

    fn SourceAddress::not_equal(x : SourceAddress, y : SourceAddress) -> Bool
    automatically derived

    SourceAddress::parse

    fn SourceAddress::parse(text : String) -> SourceAddress raise FileAddressError

    A / at the end goes.

    SourceAddress::to_repr

    automatically derived

    SourceAddress::to_string

    fn SourceAddress::to_string(self : SourceAddress) -> String

    VersionChoice

    The version of the app that a user asks for.

    VersionChoice::equal

    automatically derived

    VersionChoice::not_equal

    fn VersionChoice::not_equal(x : VersionChoice, y : VersionChoice) -> Bool
    automatically derived

    VersionChoice::to_repr

    automatically derived

    app_identifier

    The identifier of the desktop app for an instance. The system opens one app for each identifier, and keeps the data of its window under it.

    app_platforms

    let app_platforms : ReadOnlyArray[AppPlatform]

    Every platform with an app, in a fixed order.

    app_record_file

    let app_record_file : String

    The name of the file with the version of an installed app and its engine.

    asked_instance

    The instance that the user asks for: the one of the option, or else the one of the variable MISSION_CONTROL_INSTANCE. An empty variable has no name. The option wins over a variable that has a wrong value.

    Without an answer, the app uses the instance of its file, or else the one of its channel.

    bundle_contents

    The folder Contents of the bundle NAME.app that contains the program. There is none for a program that is not in a bundle of macOS.

    bundle_helper

    The path of the helper of Proton in a bundle of macOS. names are the names in the folder Contents/Frameworks.

    Proton makes this path from the file name of the bundle, so a bundle with another name does not open. The helper has no suffix, such as (GPU).

    installed_instance

    Reads the text of the file of an installed app: the name of its instance in one line. Spaces around the name and the end of the line do not count.

    installed_instance_file

    let installed_instance_file : String

    The name of the file of an installed app that has the name of its instance.

    installed_instance_path

    The path of the file with the name of the instance, from the complete path of the program. It is next to the program, or on macOS in the folder Resources of the bundle NAME.app, because the folder Applications can have the apps of more instances.

    FolderPath has the rules for the path of each file also.

    release_list_file

    let release_list_file : String

    The name of the file with the list of a release.

    subprocess_variable

    let subprocess_variable : String

    The variable with the path of the program that Proton starts for each helper.

    window_title

    The title of the window. It is the title that the server gives to the page.