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, bool needsTerminal)
Parameters
path
stringThe path to store the generated EXE file.
target
FeedTargetThe application to be launched.
command
stringThe command argument to be passed to the
0install run
command; can benull
.needsTerminal
booltrue
if the sub should be a command-line app,false
if it should be a GUI app.
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, 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, bool machineWide, bool? needsTerminal = null)
Parameters
target
FeedTargetThe application to be launched.
command
stringThe command argument to be passed to the
0install run
command; can benull
.machineWide
booltrue
place the generated stub in a machine-wide location;false
to place it in the current user profile.needsTerminal
bool?true
if the sub should be a command-line app,false
if it should be a GUI app,null
if it should be auto-detected.
Returns
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.