Table of Contents

Class StubBuilder

Namespace
ZeroInstall.DesktopIntegration.Windows
Assembly
ZeroInstall.DesktopIntegration.dll

Builds stub EXEs that execute "0install" commands.

public class StubBuilder
Inheritance
StubBuilder
Inherited Members

Constructors

StubBuilder(IIconStore)

Builds stub EXEs that execute "0install" commands.

public StubBuilder(IIconStore iconStore)

Parameters

iconStore IIconStore

Methods

BuildRunStub(string, FeedTarget, string?, bool)

Builds a stub EXE that executes the "0install run" command at a specific path.

public void BuildRunStub(string path, FeedTarget target, string? command = null, bool gui = false)

Parameters

path string

The path to store the generated EXE file.

target FeedTarget

The application to be launched.

command string

The command argument to be passed to the the "0install run" command; can be null.

gui bool

true to build a GUI stub, false to build a CLI stub.

Exceptions

OperationCanceledException

The user canceled the task.

InvalidOperationException

There was a compilation error while generating the stub EXE.

IOException

A problem occurred while writing to the filesystem.

WebException

A problem occurred while downloading additional data (such as icons).

UnauthorizedAccessException

Write access to the filesystem is not permitted.

GetRunCommandLine(FeedTarget, string?, bool)

Returns a command-line for executing the "0install run" command. Generates and returns a stub EXE if possible, falls back to directly pointing to the "0install" EXE otherwise.

public IReadOnlyList<string> GetRunCommandLine(FeedTarget target, string? command = null, bool machineWide = false)

Parameters

target FeedTarget

The application to be launched.

command string

The command argument to be passed to the the "0install run" command; can be null.

machineWide bool

true place the generated stub in a machine-wide location; false to place it in the current user profile.

Returns

IReadOnlyList<string>

Exceptions

OperationCanceledException

The user canceled the task.

InvalidOperationException

There was a compilation error while generating the stub EXE.

IOException

A problem occurred while writing to the filesystem.

WebException

A problem occurred while downloading additional data (such as icons).

UnauthorizedAccessException

Write access to the filesystem is not permitted.