mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
cli / debugging dogs [no ci]
This commit is contained in:
88
docs/cli.md
Normal file
88
docs/cli.md
Normal file
@@ -0,0 +1,88 @@
|
||||
| [docs](.) / cli.md |
|
||||
|:---|
|
||||
|
||||
# Velopack Command Line Reference
|
||||
|
||||
## vpk
|
||||
```txt
|
||||
Description:
|
||||
Velopack CLI 0.0.61-g2e7ffeb (prerelease) for creating and distributing releases.
|
||||
|
||||
Usage:
|
||||
vpk [command] [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
--version Show version information
|
||||
--verbose Print diagnostic messages.
|
||||
|
||||
Commands:
|
||||
pack Creates a release from a folder containing application files.
|
||||
download Download's the latest release from a remote update source.
|
||||
upload Upload local package(s) to a remote update source.
|
||||
delta Utilities for creating or applying delta packages.
|
||||
```
|
||||
|
||||
## Update.exe & UpdateMac
|
||||
```txt
|
||||
Velopack Updater (0.0.66) manages packages and installs updates.
|
||||
https://github.com/velopack/velopack
|
||||
|
||||
Usage: update [OPTIONS]
|
||||
update apply [OPTIONS] [-- [EXE_ARGS]...]
|
||||
update patch [OPTIONS] --old <FILE> --patch <FILE> --output <FILE>
|
||||
update start [OPTIONS] [EXE_NAME] [-- [EXE_ARGS]...]
|
||||
update uninstall [OPTIONS]
|
||||
|
||||
Options:
|
||||
--verbose Print debug messages to console / log
|
||||
-s, --silent Don't show any prompts / dialogs
|
||||
-l, --log <PATH> Override the default log file location
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
|
||||
update apply:
|
||||
Applies a staged / prepared update, installing prerequisite runtimes if necessary
|
||||
-r, --restart Restart the application after the update
|
||||
-w, --wait Wait for the parent process to terminate before applying the update
|
||||
-p, --package <FILE> Update package to apply
|
||||
--noelevate If the application does not have sufficient privileges, do not elevate to admin
|
||||
-h, --help Print help
|
||||
[EXE_ARGS]... Arguments to pass to the started executable. Must be preceeded by '--'.
|
||||
|
||||
update patch:
|
||||
Applies a Zstd patch file
|
||||
--old <FILE> Base / old file to apply the patch to
|
||||
--patch <FILE> The Zstd patch to apply to the old file
|
||||
--output <FILE> The file to create with the patch applied
|
||||
-h, --help Print help
|
||||
|
||||
update start:
|
||||
Starts the currently installed version of the application
|
||||
-w, --wait Wait for the parent process to terminate before starting the application
|
||||
-h, --help Print help
|
||||
[EXE_ARGS]... Arguments to pass to the started executable. Must be preceeded by '--'.
|
||||
[EXE_NAME] The optional name of the binary to execute
|
||||
|
||||
update uninstall:
|
||||
Remove all app shortcuts, files, and registry entries.
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
|
||||
## Setup.exe
|
||||
|
||||
```txt
|
||||
Velopack Setup (0.0.66) installs applications.
|
||||
https://github.com/velopack/velopack
|
||||
|
||||
Usage: setup [OPTIONS]
|
||||
|
||||
Options:
|
||||
-s, --silent Hides all dialogs and answers 'yes' to all prompts
|
||||
-v, --verbose Print debug messages to console
|
||||
-l, --log <FILE> Enable file logging and set location
|
||||
-t, --installto <DIR> Installation directory to install the application
|
||||
-d, --debug <FILE> Debug mode, install from a nupkg file
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||
tbc
|
||||
35
docs/debugging.md
Normal file
35
docs/debugging.md
Normal file
@@ -0,0 +1,35 @@
|
||||
| [docs](.) / debugging.md |
|
||||
|:---|
|
||||
|
||||
# Debugging Velopack
|
||||
|
||||
## Logging
|
||||
All parts of Velopack have logging built in to help troubleshoot issues, and you should provide these logs when opening a GitHub issue about a potential bug.
|
||||
|
||||
### UpdateManager / In your application
|
||||
You should provide an instance of `Microsoft.Extensions.Logging.ILogger` to `VelopackApp` and to `UpdateManager` to record potential issues. If you are not using Microsoft Hosting or Logging already, it is very simple to implement this interface yourself and log to a file, or integrate with another logging framework.
|
||||
|
||||
For example:
|
||||
```cs
|
||||
using Microsoft.Extensions.Logging;
|
||||
class ConsoleLogger : ILogger
|
||||
{
|
||||
public IDisposable BeginScope<TState>(TState state) where TState : notnull => null;
|
||||
public bool IsEnabled(LogLevel logLevel) => true;
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
|
||||
=> Console.WriteLine(formatter(state, exception));
|
||||
}
|
||||
```
|
||||
|
||||
### Update.exe & Setup.exe
|
||||
Running Update.exe will log most output to it's base directory as `Velopack.log`. Setup.exe will not log to file by default. However, you can override the log location for both binaries with the `--log {path}` parameter. You can also use the `--verbose` flag to capture debug/trace output to log. Unfortunately, on Windows, to avoid showing up as a console window, these binaries are compiled as a WinExe and there will be no console output by default. Please see the [command line reference](cli.md) for a comprehensive list of arguments supported.
|
||||
|
||||
### UpdateMac
|
||||
All logs will be sent to `/tmp/velopack/{appid}.log`.
|
||||
|
||||
## Advanced Debugging
|
||||
The debug builds of Velopack binaries have additional logging/debugging capabilities, and will produce console output. In some instances, it may be useful to [compile Velopack](compiling.md) for your platform, and replace the release binaries of Setup.exe and Update.exe with debug versions.
|
||||
|
||||
If your issue is with package building, after building the rust binaries in Debug mode, it can also be useful to run the Velopack.Vpk project from Visual Studio with your intended command line arguments rather than running the `vpk` tool directly.
|
||||
|
||||
If doing this has not helped, you may need to debug and step through the rust binaries - for which I recommend the CodeLLDB VSCode extension.
|
||||
@@ -1 +1,30 @@
|
||||
tbc
|
||||
| [docs](.) |
|
||||
|:---|
|
||||
|
||||
# Velopack Documentation
|
||||
🚧🚧This documentation is still under construction.🚧🚧
|
||||
|
||||
## General
|
||||
- FAQ
|
||||
- [Migrating to Velopack](migrating.md)
|
||||
- [Logging & Debugging](debugging.md)
|
||||
|
||||
|
||||
## Using Velopack
|
||||
|
||||
|
||||
- Packaging Releases
|
||||
- Customizing Installer
|
||||
- Code Signing
|
||||
|
||||
- Distributing Releases
|
||||
- File share
|
||||
- GitHub Releases
|
||||
- HTTP Server
|
||||
- AWS S3 or compatible (eg. B2, Digital Ocean)
|
||||
|
||||
- Installing
|
||||
- Overview
|
||||
|
||||
- Updating
|
||||
-
|
||||
Reference in New Issue
Block a user