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
iconStoreIIconStore
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
pathstringThe path to store the generated EXE file.
targetFeedTargetThe application to be launched.
commandstringThe command argument to be passed to the
0install runcommand; can benull.needsTerminalbooltrueif the sub should be a command-line app,falseif 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
targetFeedTargetThe application to be launched.
commandstringThe command argument to be passed to the
0install runcommand; can benull.machineWidebooltrueplace the generated stub in a machine-wide location;falseto place it in the current user profile.needsTerminalbool?trueif the sub should be a command-line app,falseif it should be a GUI app,nullif 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.