Skip to content

Commit 17de8d4

Browse files
automatic update
1 parent 49cc201 commit 17de8d4

File tree

569 files changed

+2942
-2921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

569 files changed

+2942
-2921
lines changed

docs/getting-started/rust.mdx

Lines changed: 55 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,63 @@
1-
import InstallVpk from './content/_install-vpk.mdx';
2-
import BuildRelease from './content/_build-release.mdx';
3-
import Completion from './content/_completion.mdx';
4-
51
# Getting Started: Rust
62
<AppliesTo all />
73
Get started with our official cross-platform Rust crate.
84

95
:::tip
106
To find the most accurate and complete documentation for Rust please visit https://docs.rs/velopack
117
:::
12-
13-
148
## Quick Start
15-
<FancyStep step={1}>
16-
Add Velopack to your `Cargo.toml`:
17-
```toml
18-
[dependencies]
19-
velopack = { version = "0.0", features = ["async"] } # Replace with actual version and desired features
20-
```
21-
</FancyStep>
22-
23-
<FancyStep step={2}>
24-
Add the following code to your `main()` function:
25-
```rust
26-
use velopack::*;
27-
28-
fn main() {
29-
// VelopackApp should be the first thing to run, in some circumstances it may terminate/restart the process to perform tasks.
30-
VelopackApp::build().run();
31-
// Your other app startup code here
32-
}
33-
```
34-
</FancyStep>
35-
36-
<FancyStep step={3}>
37-
Add auto-updates somewhere to your app:
38-
```rust
39-
use velopack::*;
40-
41-
fn update_my_app() {
42-
let source = sources::HttpSource::new("https://the.place/you-host/updates");
43-
let um = UpdateManager::new(source, None, None).unwrap();
44-
45-
if let UpdateCheck::UpdateAvailable(updates) = um.check_for_updates().unwrap() {
46-
// there was an update available. Download it.
47-
um.download_updates(&updates, None).unwrap();
48-
49-
// download completed, let's restart and update
50-
um.apply_updates_and_restart(&updates).unwrap();
51-
}
52-
}
53-
```
54-
</FancyStep>
55-
56-
<FancyStep step={4}>
57-
Build your app with cargo:
58-
```sh
59-
cargo build --release
60-
```
61-
</FancyStep>
62-
63-
<FancyStep step={5}>
64-
<InstallVpk />
65-
</FancyStep>
66-
67-
<FancyStep step={6} noline={true}>
68-
<BuildRelease />
69-
</FancyStep>
70-
71-
<Completion />
9+
1. Add Velopack to your `Cargo.toml`:
10+
```toml
11+
[dependencies]
12+
velopack = { version = "0.0", features = ["async"] } # Replace with actual version and desired features
13+
```
14+
15+
2. Add the following code to your `main()` function:
16+
```rust
17+
use velopack::*;
18+
19+
fn main() {
20+
// VelopackApp should be the first thing to run, in some circumstances it may terminate/restart the process to perform tasks.
21+
VelopackApp::build().run();
22+
// Your other app startup code here
23+
}
24+
```
25+
26+
3. Add auto-updates somewhere to your app:
27+
```rust
28+
use velopack::*;
29+
30+
fn update_my_app() {
31+
let source = sources::HttpSource::new("https://the.place/you-host/updates");
32+
let um = UpdateManager::new(source, None, None).unwrap();
33+
34+
if let UpdateCheck::UpdateAvailable(updates) = um.check_for_updates().unwrap() {
35+
// there was an update available. Download it.
36+
um.download_updates(&updates, None).unwrap();
37+
38+
// download completed, let's restart and update
39+
um.apply_updates_and_restart(&updates).unwrap();
40+
}
41+
}
42+
```
43+
44+
4. Build your app with cargo:
45+
```sh
46+
cargo build --release
47+
```
48+
49+
5. Install the `vpk` command line tool:
50+
```sh
51+
dotnet tool update -g vpk
52+
```
53+
***Note: you must have the .NET Core SDK 8 installed to use and update `vpk`***
54+
55+
6. Package your Velopack release / installers:
56+
```sh
57+
vpk pack -u MyAppUniqueId -v 1.0.0 -p /target/release -e myexename.exe
58+
```
59+
60+
✅ You're Done! Your app now has auto-updates and an installer.
61+
You can upload your release to your website, or use the `vpk upload` command to publish it to the destination of your choice.
62+
63+
Read the Velopack documentation at [https://docs.velopack.io/](https://docs.velopack.io/) for more information.

docs/reference/cli/content/setup-windows.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Setup.exe (Windows)
22
```
3-
Velopack Setup (0.0.1053) installs applications.
4-
https://github.com/velopack/velopack
3+
Velopack Setup (0.0.1298) installs applications.
4+
https://velopack.io
55
66
Usage: setup.exe [OPTIONS] [-- [EXE_ARGS]...]
77

0 commit comments

Comments
 (0)