Rename to Velopack

This commit is contained in:
Caelan Sayler
2023-12-31 10:59:34 +00:00
parent 1ad0b01eda
commit eff71d9b3f
255 changed files with 190 additions and 2292 deletions

View File

@@ -65,14 +65,14 @@ jobs:
- name: Build .NET
run: dotnet build -c Release
- name: Test .NET Squirrel.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Squirrel.Tests/Squirrel.Tests.csproj
- name: Test .NET Velopack.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.Tests/Velopack.Tests.csproj
- name: Test .NET Squirrel.Packaging.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Squirrel.Packaging.Tests/Squirrel.Packaging.Tests.csproj
- name: Test .NET Velopack.Packaging.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.Packaging.Tests/Velopack.Packaging.Tests.csproj
- name: Test .NET Squirrel.CommandLine.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Squirrel.CommandLine.Tests/Squirrel.CommandLine.Tests.csproj
- name: Test .NET Velopack.CommandLine.Tests
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.CommandLine.Tests/Velopack.CommandLine.Tests.csproj
- name: Upload Rust Artifacts
uses: actions/upload-artifact@v4

View File

@@ -1,4 +1,3 @@
Copyright (c) 2012 GitHub, Inc.
Copyright (c) 2021 Caelan Sayler
Permission is hereby granted, free of charge, to any person obtaining a

206
README.md
View File

@@ -1,203 +1,7 @@
[![Nuget](https://img.shields.io/nuget/v/Clowd.Squirrel?style=flat-square)](https://www.nuget.org/packages/Clowd.Squirrel/)
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Clowd.Squirrel?style=flat-square)](https://www.nuget.org/packages/Clowd.Squirrel/)
[![Nuget](https://img.shields.io/nuget/v/Velopack?style=flat-square)](https://www.nuget.org/packages/Velopack/)
[![Discord](https://img.shields.io/discord/767856501477343282?style=flat-square&color=purple)](https://discord.gg/CjrCrNzd3F)
[![Build](https://img.shields.io/github/actions/workflow/status/clowd/Clowd.Squirrel/build.yml?branch=develop&style=flat-square)](https://github.com/clowd/Clowd.Squirrel/actions)
[![Codecov](https://img.shields.io/codecov/c/github/clowd/Clowd.Squirrel?style=flat-square)](https://app.codecov.io/gh/clowd/Clowd.Squirrel)
[![License](https://img.shields.io/github/license/clowd/Clowd.Squirrel?style=flat-square)](https://github.com/clowd/Clowd.Squirrel/blob/develop/LICENSE)
[![Build](https://img.shields.io/github/actions/workflow/status/velopack/velopack/build.yml?branch=develop&style=flat-square)](https://github.com/velopack/velopack/actions)
[![Codecov](https://img.shields.io/codecov/c/github/velopack/velopack?style=flat-square)](https://app.codecov.io/gh/velopack/velopack)
[![License](https://img.shields.io/github/license/velopack/velopack?style=flat-square)](https://github.com/velopack/velopack/blob/develop/LICENSE)
# Clowd.Squirrel
Squirrel is both a set of tools and a library, to completely manage both installation and updating your desktop application.
Feel free to join our discord to recieve updates or to ask questions:
[![discordimg2](https://user-images.githubusercontent.com/1287295/150318745-cbfcf5d0-3697-4bef-ac1a-b0d751f53b48.png)](https://discord.gg/CjrCrNzd3F)
---
## Looking for info on v3.0 / cross-platform?
Clowd.Squirrel v3.0 is a ground-up re-write and now supports macos (linux in the future?). Documentation for this is very limited but I have started working on this [in the docs-v3 folder](docs-v3). This work is being done in the `develop` branch.
I will continue to support 2.x with critical fixes until further notice. This is currently the `master` branch.
---
## What Do We Want?
Apps should be as fast easy to install. Update should be seamless like Google Chrome. From a developer's side, it should be really straightforward to create an installer for my app, and publish updates to it, without having to jump through insane hoops.
* **Integrating** an app to use Squirrel should be extremely easy, provide a client API, and be developer friendly.
* **Packaging** is really easy, can be automated, and supports delta update packages.
* **Distributing** should be straightforward, use simple HTTP updates, and provide multiple "channels" (a-la Chrome Dev/Beta/Release).
* **Installing** is Wizard-Free™, with no UAC dialogs, does not require reboot, and is .NET Framework friendly.
* **Updating** is in the background, doesn't interrupt the user, and does not require a reboot.
---
## Migrating from Squirrel.Windows?
- The command line interface for Squirrel.exe is different. Check 'Squirrel.exe -h' for more info.
- The command line for Update.exe here is compatible with the old Squirrel.
- Update.exe here is bigger and is included in your packages. This means Update.exe will be updated each time you update your app. As long as you build delta packages, this will not impact the size of your updates.
- Migrating to this library is fully compatible, except for the way we detect SquirrelAware binaries. Follow the Quick Start guide.
- There have been a great many other improvements here. To see some of them [have a look at the feature matrix](#feature-matrix).
- Something detected as a virus? This was an issue at the old Squirrel, and also see [issue #28](https://github.com/clowd/Clowd.Squirrel/issues/28)
---
## Quick Start For .NET Apps
1. Install the [Clowd.Squirrel Nuget Package](https://www.nuget.org/packages/Clowd.Squirrel/)
2. Add SquirrelAwareVersion to your assembly manifest to indicate that your exe supports Squirrel.
Note: In newer .NET Core versions you first need to add the Application Manifest through New Item window.
```xml
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<SquirrelAwareVersion xmlns="urn:schema-squirrel-com:asm.v1">1</SquirrelAwareVersion>
</assembly>
```
3. Handle Squirrel events somewhere very early in your application startup (such as the beginning of `main()` or `Application.OnStartup()` for WPF).
```cs
public static void Main(string[] args)
{
// run Squirrel first, as the app may exit after these run
SquirrelAwareApp.HandleEvents(
onInitialInstall: OnAppInstall,
onAppUninstall: OnAppUninstall,
onEveryRun: OnAppRun);
// ... other app init code after ...
}
private static void OnAppInstall(SemanticVersion version, IAppTools tools)
{
tools.CreateShortcutForThisExe(ShortcutLocation.StartMenu | ShortcutLocation.Desktop);
}
private static void OnAppUninstall(SemanticVersion version, IAppTools tools)
{
tools.RemoveShortcutForThisExe(ShortcutLocation.StartMenu | ShortcutLocation.Desktop);
}
private static void OnAppRun(SemanticVersion version, IAppTools tools, bool firstRun)
{
tools.SetProcessAppUserModelId();
// show a welcome message when the app is first installed
if (firstRun) MessageBox.Show("Thanks for installing my application!");
}
```
When installed, uninstalled or updated, these methods will be executed, giving your app a chance to add or remove application shortcuts or perform other tasks. You should not update your app from the hooks.
4. Build/Publish your app (with `msbuild`, `dotnet publish` or similar)
5. Create a Squirrel release using the `Squirrel.exe` command line tool.
The tool can be downloaded from GitHub Releases, and it is also bundled into the [Clowd.Squirrel](https://www.nuget.org/packages/Clowd.Squirrel/) nuget package.
If installed through NuGet, the tools can usually be found at:
- `%userprofile%\.nuget\packages\clowd.squirrel\2.9.40\tools`, or;
- `..\packages\clowd.squirrel\2.9.40\tools`
Once you have located the tools folder, create a release. Minimal example below with some useful options, but explore `Squirrel.exe -h` for a complete list.
```cmd
Squirrel.exe pack --packId "YourApp" --packVersion "1.0.0" --packDirectory "path-to/publish/folder"
```
Important Notes:
- The same `--releaseDir` (default `.\Releases` if not specified) should be used each time, so delta updates can be generated.
- The package version must comply to strict 3-part SemVer syntax. (eg. `1.0.0`, `1.0.1-pre`)
- A list of supported runtimes for the `--framework` argument is [available here](https://github.com/clowd/Clowd.Squirrel/blob/develop/src/Squirrel/Runtimes.cs)
6. Distribute your entire `--releaseDir` folder online. This folder can be hosted on any static web/file server, [Amazon S3](docs/using/amazon-s3.md), BackBlaze B2, or even via [GitHub Releases](docs/using/github.md).
If using CI to deploy releases, you can use the package syncing commands to download the currently live version, before creating a package. This means delta/patch updates can be generated. Complete powershell example:
```ps1
# build / publish your app
dotnet publish -c Release -o ".\publish"
# find Squirrel.exe path and add an alias
Set-Alias Squirrel ($env:USERPROFILE + "\.nuget\packages\clowd.squirrel\2.9.40\tools\Squirrel.exe");
# download currently live version
Squirrel http-down --url "https://the.place/you-host/updates"
# build new version and delta updates.
Squirrel pack`
--framework net6,vcredist143-x86` # Install .NET 6.0 (x64) and vcredist143 (x86) during setup, if not installed
--packId "YourApp"` # Application / package name
--packVersion "1.0.0"` # Version to build. Should be supplied by your CI
--packAuthors "YourCompany"` # Your name, or your company name
--packDir ".\publish"` # The directory the application was published to
--icon "mySetupIcon.ico"` # Icon for Setup.exe and Update.exe
--splashImage "install.gif" # The splash artwork (or animation) to be shown during install
```
7. Update your app on startup / periodically with UpdateManager.
```cs
private static async Task UpdateMyApp()
{
using var mgr = new UpdateManager("https://the.place/you-host/updates");
var newVersion = await mgr.UpdateApp();
// optionally restart the app automatically, or ask the user if/when they want to restart
if (newVersion != null) {
UpdateManager.RestartApp();
}
}
```
---
## Feature Matrix
| Feature | Clowd.Squirrel | Squirrel.Windows |
|---|---|---|
| Continuous updates, bug fixes, and other improvements | ✅ | ❌ |
| Provides a command line update interface (Update.exe) with your app | ✅ | ✅ |
| Update.exe Size | ❌ 12.5mb | ✅ 2mb |
| Provides a C# SDK | netstandard2.0<br>net461<br>net5.0<br>net6.0 | netstandard2.0 |
| SDK has 100% XML comment coverage in Nuget Pacakge | ✅ | None, does not ship comments in NuGet |
| SDK Dependencies | SharpCompress | SharpCompress (outdated & security vulnerability)<br>NuGet (outdated and bugs)<br>Mono.Cecil (outdated and bugs)<br>Microsoft.Web.Xdt<br>Microsoft.CSharp<br>Microsoft.Win32.Registry<br>System.Drawing.Common<br>System.Net.Http<br>System.Web |
| SDK is strong-name signed | ✅ | ❌ |
| Provides an update package builder (Squirrel.exe) | ✅ | ✅ |
| Supports building tiny delta updates | ✅ | ✅ |
| Can compile a release/setup in a single easy command | ✅ | ❌ |
| Command line tool for package building that actually prints helpful messages to the console | ✅ | ❌ |
| CLI help text that is command-based and easily understandable | ✅ | ❌ |
| Supports building packages for native apps | ✅ | ✅ |
| Supports building packages for .Net/Core | ✅ | Limited/Buggy |
| Supports building packages for PublishSingleFile apps | ✅ | ❌ |
| Supports fully automated CI package deployments easily | ✅ | ❌ |
| Compiles an installer (Setup.exe) | ✅ | ✅ |
| Setup Splash Gif | ✅ | ✅ |
| Setup Splash Png,Jpeg,Tiff,Etc | ✅ | ❌ |
| Setup Splash Progress Bar | ✅ | ❌ |
| Setup Splash has Multi-Monitor DPI support | ✅ | ❌ |
| No internal dependencies on external frameworks/runtimes | ✅ | ❌ |
| Can deploy an application that has no dependencies | ✅ | ❌ (always installs .Net Framework with your app) |
| Can install .Net Full Framework during setup | ✅ | ✅ |
| Can install .Net/Core during setup | ✅ | ❌ |
| Can install vcredist during setup | ✅ | ❌ |
| Can install new runtimes (see above) during updates | ✅ | ❌ |
| Cleans up after itself | ✅ | Leaves huge log files everywhere<br>Does not delete itself during uninstall |
| Can build an MSI enterprise machine-wide deployment tool | ✅ | ✅ |
---
## Building Squirrel
For the impatient:
```cmd
git clone https://github.com/clowd/Clowd.Squirrel
cd clowd/Clowd.Squirrel
build.cmd
```
See [Contributing](docs/contributing/contributing.md) for additional information on building and contributing to Squirrel.
## License and Usage
See [COPYING](COPYING) for details on copyright and usage.
# Velopack

View File

@@ -3,36 +3,36 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31815.197
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel", "src\Squirrel\Squirrel.csproj", "{1436E22A-FE3C-4D68-9A85-9E74DF2E6A92}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack", "src\Velopack\Velopack.csproj", "{1436E22A-FE3C-4D68-9A85-9E74DF2E6A92}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Tests", "test\Squirrel.Tests\Squirrel.Tests.csproj", "{98AEB048-E27D-42F4-9440-505B7F78BAFD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Tests", "test\Velopack.Tests\Velopack.Tests.csproj", "{98AEB048-E27D-42F4-9440-505B7F78BAFD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionLevel", "SolutionLevel", "{ED657D2C-F8A0-4012-A64F-7367D41BE4D2}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.github\workflows\build.yml = .github\workflows\build.yml
src\Directory.Build.props = src\Directory.Build.props
Squirrel.entitlements = Squirrel.entitlements
Velopack.entitlements = Velopack.entitlements
version.json = version.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Packaging", "src\Squirrel.Packaging\Squirrel.Packaging.csproj", "{352C15EA-622F-4132-80D8-9B6E3C83404E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Packaging", "src\Velopack.Packaging\Velopack.Packaging.csproj", "{352C15EA-622F-4132-80D8-9B6E3C83404E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Csq", "src\Squirrel.Csq\Squirrel.Csq.csproj", "{9E769C7E-A54C-4844-8362-727D37BB1578}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Vpk", "src\Velopack.Vpk\Velopack.Vpk.csproj", "{9E769C7E-A54C-4844-8362-727D37BB1578}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.CommandLine.Tests", "test\Squirrel.CommandLine.Tests\Squirrel.CommandLine.Tests.csproj", "{519EAB50-47B8-425F-8B20-AB9548F220B4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.CommandLine.Tests", "test\Velopack.CommandLine.Tests\Velopack.CommandLine.Tests.csproj", "{519EAB50-47B8-425F-8B20-AB9548F220B4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7AC3A776-B582-4B65-9D03-BD52332B5CA3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Packaging.Windows", "src\Squirrel.Packaging.Windows\Squirrel.Packaging.Windows.csproj", "{E35039C8-1F98-48EB-B7D5-08E33DF061A7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Packaging.Windows", "src\Velopack.Packaging.Windows\Velopack.Packaging.Windows.csproj", "{E35039C8-1F98-48EB-B7D5-08E33DF061A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Packaging.OSX", "src\Squirrel.Packaging.OSX\Squirrel.Packaging.OSX.csproj", "{3382BCB7-657E-4E7B-A2B9-D65AA4DA073B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Packaging.OSX", "src\Velopack.Packaging.OSX\Velopack.Packaging.OSX.csproj", "{3382BCB7-657E-4E7B-A2B9-D65AA4DA073B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Deployment", "src\Squirrel.Deployment\Squirrel.Deployment.csproj", "{D19EA72C-E7AE-4A7B-924A-E7550901A49C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Deployment", "src\Velopack.Deployment\Velopack.Deployment.csproj", "{D19EA72C-E7AE-4A7B-924A-E7550901A49C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrel.Packaging.Tests", "test\Squirrel.Packaging.Tests\Squirrel.Packaging.Tests.csproj", "{175B06A5-5C09-4DAB-A6AF-C8A2257BD1B6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Velopack.Packaging.Tests", "test\Velopack.Packaging.Tests\Velopack.Packaging.Tests.csproj", "{175B06A5-5C09-4DAB-A6AF-C8A2257BD1B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "test\TestApp\TestApp.csproj", "{784B5987-2E71-4AEE-81B9-E0CC7F1DBEB3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp", "test\TestApp\TestApp.csproj", "{784B5987-2E71-4AEE-81B9-E0CC7F1DBEB3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1,69 +0,0 @@
# Building Squirrel
You can compile Squirrel on the command line, or via an alternative IDE like VSC or Rider, but you will need VS2022 installed, or you will need to install all of Squirrel's VS requirements separately.
## Prerequisites
- Be on Windows 10/11
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
- **Workload**: Desktop development with C++
- **Individual**: MSVC v143 x86 / x64
- **Individual**: C++ MFC for v143 (x86 & x64)
- **Workload**: .NET desktop development
- **Individual**: .NET Framework 4.6.1 SDK
- **Individual**: .NET Framework 4.6.1 targeting pack
- [dotnet 5.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/5.0)
- [dotnet 6.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- dotnet tool install -g [nbgv](https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md)
## Components
- `/vendor` - third party binaries
- `/src/Squirrel` - core Squirrel.Core.dll library, used by installed applications to update. Packaged as .nupkg
- `/src/Squirrel.Tool` - csq locator tool, for building releases. Packaged as .nupkg (dotnet tool)
- `/src/Squirrel.CommandLine` - used by csq
- `/src/Setup` - windows Setup.exe. This is a small self-extractor that runs Update.Windows.
- `/src/StubExecutable` - windows stubs (for running installed apps)
- `/src/Update.Windows` - windows Update.exe, used by installed apps to install updates. Published as single-file exe.
- `/src/Update.OSX` - UpdateMac, used by apps on macOS to install updates. Published as single-file exe.
## Compiling on the command line
There is a one-command build script. Use this to test if you are unable to build with Visual Studio, or when distributing squirrel.
> ./build.cmd
This script will compile the whole solution, package the single-file projects (Update.Windows & Update.OSX) and bundle all the required files into two nupkg's. The two complete nupkg's will be placed in `/build/Release`.
## Compiling in your favorite IDE
This should be fairly straight forward. Open the solution file, run the build-all command (usually F6). This will compile all the Squirrel binaries, and will create nupkg's in `/build/Debug`.
Note that these packages generated on build are incomplete, as they will not contain `Update.exe` or `UpdateMac`. You will need to run the build script if you wish to create a package intended for release.
## Debugging Squirrel
You can run any of the Squirrel projects in your debugger with the appropriate command line arguments to find issues or test how Squirrel works. Below is examples on how you might debug various features of squirrel.
[If you are looking for help troubleshooting an installed application, that is available here.](troubleshooting.md)
### Package Creation
- Debug csq (src/Squirrel.Tool) with the argument `--csq-embedded` and any other arguments required to create your package. Example:
> `csq --csq-embedded pack -u MyTestApp -v 1.0.1 -p "path-to/files"`
### Debug Windows Extractor (Setup.exe)
- Compile Setup.exe (src/Setup) in Debug mode
- Attach a package to this binary with csq and the `--debugSetupExe` argument. Example:
> `csq --csq-embedded pack -u MyTestApp -v 1.0.1 -p "path-to/files" --debugSetupExe "path-to/Setup.exe"`
- Run debugger for Setup.exe (without re-compiling)
### Windows Install (Partial)
- Create a update package (-full.nupkg) using csq (src/Squirrel.Tool).
- Debug Update.exe (src/Update.Windows) with the arguments `"--install {directoryContainingNupkg}"`
### Windows Install (Full)
- Create a Setup bundle using csq (src/Squirrel.Tool). Note the path to generaged Setup.exe, and the `setupBundleOffset` which is printed to the console.
- Debug Update.exe (src/Update.Windows) with the arguments `"--setup {setupExePath} --setupOffset {setupBundleOffset}"`
## Distributing
Before distributing a nupkg to end users, it is necessary to code-sign `UpdateMac` with a valid Apple developer certificate, and send it to Apple for notarization. This will need to be performed on a computer running macOS after the nupkg's has been created.

View File

@@ -1,59 +0,0 @@
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Clowd.Squirrel?style=flat-square)](https://www.nuget.org/packages/Clowd.Squirrel/)
# Clowd.Squirrel
Squirrel is both a set of tools and a library, to completely manage both installation and updating your desktop application.
Feel free to join our discord to recieve updates or to ask questions:
[![discordimg2](https://user-images.githubusercontent.com/1287295/150318745-cbfcf5d0-3697-4bef-ac1a-b0d751f53b48.png)](https://discord.gg/CjrCrNzd3F)
## What Do We Want?
Apps should be as fast easy to install. Update should be seamless like Google Chrome. From a developer's side, it should be really straightforward to create an installer for my app, and publish updates to it, without having to jump through insane hoops.
* **Integrating** an app to use Squirrel should be extremely easy, provide a client API, and be developer friendly.
* **Packaging** is really easy, can be automated, and supports delta update packages.
* **Distributing** should be straightforward, use simple HTTP updates, and provide multiple "channels" (a-la Chrome Dev/Beta/Release).
* **Installing** is Wizard-Free™, with no UAC dialogs, does not require reboot, and is .NET Framework friendly.
* **Updating** is in the background, doesn't interrupt the user, and does not require a reboot.
## Clowd.Squirrel is now cross-platform
## Quick Start Guide!
*This guide contains everything you need to know to publish your first app. I know, it's short and sweet. Squirrel can do lots more than what you see here, so once you've tried the instructions here, check out some of our other docs!*
### Prerequisites
These are required to build packages with Squirrel, but are not required for applications using Squirrel.
- [Install dotnet 6.0 runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [Install Squirrel Tool (csq)](https://www.nuget.org/packages/csq/)
> dotnet tool install -g csq
### Adding Squirrel to your App
- Install the [Clowd.Squirrel](https://www.nuget.org/packages/Clowd.Squirrel/) NuGet package
- **IMPORTANT:** Add `SquirrelAwareApp.HandleEvents();` to the beginning of `Main()`
### Building a package / installer
Instructions may vary by OS. Consult `csq -h` on your target platform for more info.
```txt
> dotnet publish YourApp.csproj -o ./publish
> csq pack -u YourApp -v 1.0.1 -p ./publish -e YourApp.exe
```
### Updating your App
You can host releases in a directory/file share, online on any static web/file server, [Amazon S3](docs/using/amazon-s3.md), BackBlaze B2, or even via [GitHub Releases](docs/using/github.md).
```cs
private static async Task UpdateMyApp()
{
using var mgr = new UpdateManager("https://the.place/you-host/releases");
var newVersion = await mgr.UpdateApp();
// You must restart to complete the update.
// This can be done later / at any time.
if (newVersion != null) UpdateManager.RestartApp();
}
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,28 +0,0 @@
| [docs](..) / [contributing](.) / branching-strategy.md
|:---|
# tl;dr
1. Fork Squirrel.Windows on GitHub
2. Send features/fixes via pull request targeting the default branch: `develop`
# Branching Strategy
Squirrel.Windows uses a very lightweight rendition of [gitflow](https://nvie.com/posts/a-successful-git-branching-model/).
* `master` branch - the `master` branch is where official releases of squirrel are built. Changes to `master` are made only via merge commits from the `develop` branch. Tags are made for each each release.
* `develop` branch - the `develop` branch is where the next version of squirrel is under development. Changes to `develop` are made via pull request from forks and feature branches. So `develop` is the default branch on GitHub.
* fork - your development takes place in fork. When a feature/fix is ready, a pull request is sent to Squirrel.Windows targeting the `develop` branch.
**Why gitflow?** This lightweight rendition of giflow adds minimal "overhead" in the `develop` branch. The `develop` branch allows us to experiment with new ideas and iterate on features. When "enough" work is completed for a release, complete integration testing--including multi-version upgrades--is done on the `develop` branch. When the testing is completed successfully, the `develop` branch is integrated into `master` and a release is automatically built and released.
## See Also
* [Building Squirrel](building-squirrel.md) - steps to build squirrel for the impatient.
* [VS Solution Overview](vs-solution-overview.md) - overview of the various projects in the Squirrel.Windows Visual Studio solution.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,23 +0,0 @@
| [docs](..) / [contributing](.) / building-squirrel.md
|:---|
# Building Squirrel
Squirrel.Windows is a fairly typical C# / C++ project, the only special part is making sure to clone submodules via the command shown below.
For the Impatient:
```sh
git clone https://github.com/squirrel/squirrel.windows
cd squirrel.windows
git submodule update --init --recursive ## THIS IS THE PART YOU PROBABLY FORGOT
devbuild.cmd
```
**Tip:** You can compile the Squirrel.Windows solution with Visual Studio version 2019 and above (including community edition).
**Tip:** For Visual Studio versions that use the Visual Studio Installer (2017/2019 and above), you will need to have at least both Desktop .NET development and Desktop C++ development workloads checked in the Visual Studio Installer. You will also need to make sure that the individual package for the VC++ version used by Squirrel is checked.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,20 +0,0 @@
| [docs](..) / [contributing](.) / contributing.md
|:---|
# Contributing
Why not give back and help make Squirrel even better? Here is an overview of ways you can become more involved.
* **Contribute Documentation** - improve the documentation or provide additional code examples to benefit others.
* **Subscribe to Issues on GitHub** - have some experience using Squirrel? Help answer questions under issues or post a Pull Request fixing a bug.
* **Contribute Code** - have a great feature that you feel is a good fit for Squirrel? Send a Pull Request.
## See Also
* [Building Squirrel](building-squirrel.md) - steps to build squirrel for the impatient.
* [VS Solution Overview](vs-solution-overview.md) - overview of the various projects in the Squirrel.Windows Visual Studio solution.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,29 +0,0 @@
| [docs](..) / [contributing](.) / vs-solution-overview.md
|:---|
# Visual Studio Solution Overview
An overview of the various projects in the Squirrel.Windows Visual Studio solution and how they relate to different aspects of the update process.
| Project / Assembly Name | Libraries (NuGet) | Libraries (NuGet) | Releases Directory (releasify output) | MyApp (install location) |
|--------------------------------|---------|-----|------------------|-------------|
| **Core** NuGet.Squirrel.dll | NuGet.Squirrel.dll | | | |
| **Squirrel** Squirrel.dll | Squirrel.dll | | | |
| **SyncRelease** SyncRelease.exe | | SyncRelease.exe | | |
| **Update** Update.exe | | Squirrel.exe | | Update.exe |
| **Setup** Setup.exe | | Setup.exe | Setup.exe (+MyApp.Latest.nupkg) | |
| **WriteZipToSetup** WriteZipToSetup.exe | | WriteZipToSetup.exe | | |
* **Project / Assembly Name**: Solution project name (from Squirrel.sln) and output assembly name.
* **Libraries (NuGet)**: Program libraries installed added as references in your MyApp solution when adding the Squirrel.Windows NuGet package to your project.
* **Libraries (NuGet)**: Executable tools included in the Squirrel.Windows NuGet package used to prepare deployments via the Package Manager Console (e.g., Squirrel.exe).
* **Releases Directory (releasify output)**: Directory where the Squirrel --releasify process outputs the packages and Setup application for your project (e.g., MyAppSourceCode/Releases).
* **MyApp (install location)**: MyApp install directory (e.g., %LOCALAPPDATA%\MyApp) where the application is actually installed and updated via Squirrel.Windows.
**Note**: Note that the Squirrel.exe application found in the tools directory of the Squirrel.Windows NuGet package is actually a renamed version of the Update.exe application (see Squirrel.Windows\src\Squirrel.nuspec)
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,73 +0,0 @@
| [docs](.) / faq.md |
|:---|
# Frequently Asked Questions (FAQ)
Frequently Asked Questions for Squirrel.Windows, organized by area below.
## Integrating
1. **Can Squirrel.Windows be used on applications that aren't made with .Net?**
Yes, you can package a non-c# application in the same manner as described in the Getting Started guide. For additional customization, see [custom squirrel events for non-c# apps](using/custom-squirrel-events-non-cs.md).
1. **How do I migrate a ClickOnce app to Squirrel?**
You may want to look into the [ClickOnceToSquirrelMigrator](https://github.com/flagbug/ClickOnceToSquirrelMigrator) migration helper.
1. **How can I determine if my app is a Squirrel app? I provide a squirrel and non-squirrel install version and want to know which is running.**
You can check for the `Update.exe` in the parent directory to determine if the app is using Squirrel ([see #574](https://github.com/Squirrel/Squirrel.Windows/issues/574#issuecomment-176043311)).
```
var assembly = Assembly.GetEntryAssembly();
var updateDotExe = Path.Combine(Path.GetDirectoryName(assembly.Location), "..", "Update.exe");
var isSquirrelInstall = File.Exists(updateDotExe);
```
## Packaging
1. **How can I tell what is going wrong with the releasify?**
Check `packages\Squirrel.Windows.VERSION\tools\SquirrelSetup.log` for logging information when creating packages.
2. **Do I really have to add all the Squirrel DLLs to my app ?**
Yes, you have to add them all to the NuGet package, however, [others](https://github.com/Squirrel/Squirrel.Windows/issues/531) have used [ILMerge](https://www.microsoft.com/en-us/research/people/mbarnett/#ilmerge) to generate a single assembly.
## Distributing
1. **Can I distribute update files on IIS?**
Yes you can, see [Microsoft IIS](using/microsoft-iis.md) for details.
## Installing
1. **The Initial Install via `Setup.exe` is failing. How do I learn what is going wrong?**
Check `%LocalAppData%\SquirrelTemp\SquirrelSetup.log` for logs related to the initial install.
1. **Installer application doesn't do anything. The animation flashes but the application never starts.**
The app is likely crashing on the first run (see [Debugging Installs](using/debugging-installs.md) for details).
1. **The Installer seems to be blocked in Enterprise environments. How can I confirm this?**
Squirrel may be prevented from installing if Group Policy disallows the running of executables from `%LocalAppData%`. In this case, the "show log" button on the "installation failed" dialog will fail because `Update.exe` can not run to create a log file.
The `Setup.exe` for your application should still copy files to `%LocalAppData%\SquirrelTemp` as a pre-installation step. To verify that Group Policy is restricting you, execute `Update.exe` from the command line as follows:
```
C:\>%LocalAppData\MyApp\Update.exe
This program is blocked by group policy. For more information, contact your system administrator.
```
The best course of action is to request that executables for Squirrel and your application be whitelisted by your corporate overlords.
1. **No Shortcuts are Created for my Application**
Verify that the NuGet Package Metadata `id` property doesn't have a [space or \[dot\]](https://github.com/Squirrel/Squirrel.Windows/issues/530) in it.
1. **Can I use a different name for the `Setup.exe` install application?**
Yes, you can rename the `Setup.exe` to what ever you wish (e.g., `MyAppSetup.exe`) ([see #611](https://github.com/Squirrel/Squirrel.Windows/issues/611))
1. **Virus scanner is returning false positives on `MyApp.exe` or `Update.exe`. What can I do?**
[Application Signing](using/application-signing.md) will help. In addition, you can submit false positives to the various antivirus authors (e.g., [Symantec](https://submit.symantec.com/false_positive/), [Microsoft](https://www.microsoft.com/security/portal/Submission/Submit.aspx), [AVG](http://www.avg.com/submit-sample), [Comodo](https://www.comodo.com/home/internet-security/submit.php), [McAfee](https://support.mcafeesaas.com/MCAFEE/_cs/AnswerDetail.aspx?aid=65), [List of Submission Locations](http://www.techsupportalert.com/content/how-report-malware-or-false-positives-multiple-antivirus-vendors.htm), [see #218](https://github.com/Squirrel/Squirrel.Windows/issues/218#issuecomment-166406180)).
1. **Why is my application icon mangled after installation?**
Application icons specified in the [NuGet Package Metadata](using/nuget-package-metadata.md) must be of type icon (.ICO) rather than an image file (source: [issue #745](https://github.com/Squirrel/Squirrel.Windows/issues/745))
## Updating
1. **How do I determine what is going wrong with the UpdateManager in MyApp?**
You can setup your `\bin` directory so you can execute MyApp in the Visual Studio debugger and simply step through the update process as well as catch exceptions and log the results (see [Debugging Updates](using/debugging-updates.md) for details)
2. **I've Distributed a Broken Copy of Update.exe. How can I fix this?**
Sometimes, you might ship a broken copy of `Update.exe` that succeeds the initial install, but doesn't do what you want for some reason. To fix this, you can force an update of the `Update.exe` by including a copy of `Squirrel.exe` in your app update package. If Squirrel sees this, it will copy in this latest version to the local app installation.
3. **How can you replace DLLs while they're loaded? Impossible!**
You can't. So, how can you do it? The basic trick that ClickOnce uses is, you have a folder of EXEs and DLLs, and an Application Shortcut. When ClickOnce goes to update its stuff, it builds a completely *new* folder of binaries, then the last thing it does is rewrite the app shortcut to point to the new folder.
4. **My previous application version is still around after the update. Doesn't Squirrel clean up old versions?**
The current and immediately previous version of your application are not deleted on clean up (see [issue #589](https://github.com/Squirrel/Squirrel.Windows/issues/589)).
5. **How can I persist the [.NET Application Settings](https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/application-settings-overview) after an update?**
See (https://github.com/Squirrel/Squirrel.Windows/issues/198#issuecomment-299262613) for a simple workaround if you want to keep using .NET Application Settings. Alternatively, consider using a solution that lets you control where the settings are persisted, and store settings in an app-specific location under `%LOCALAPPDATA%`.
---
| Return: [Table of Contents](readme.md) |
|:---|

View File

@@ -1,34 +0,0 @@
| [docs](..) / [getting-started](.) / 0-overview.md|
|:---|
# Getting Started Guide
Getting Started will walk you through the integration of Squirrel.Windows for a basic c# Windows Forms application named MyApp.
## MyApp
MyApp simply displays the assembly location and application version on a simple form.
![](images/1-MyApp.png)
For simplicity, any unneeded references and files have been removed from the solution.
![](images/1-MyApp-Solution.png)
If you wish to follow along, you can [download](example/MyApp.zip) a zip file of the MyApp solution.
## Overview
This guide will go over the following steps to demonstrate using Squirrel.Windows to distribute and update MyApp.
1. [Integrating](1-integrating.md) - integrating Squirrel `UpdateManager` into your application.
1. [Packaging](2-packaging.md) - packaging application files and preparing them for release.
1. [Distributing](3-distributing.md) - providing install and update files for users.
1. [Installing](4-installing.md) - process of initial installation of your application.
1. [Updating](5-updating.md) - process of updating an existing install.
---
| Next: [1. Integrating](1-integrating.md)|
|:---|

View File

@@ -1,62 +0,0 @@
| [docs](..) / [getting-started](.) / 1-integrating.md |
|:---|
# Step 1. Integrating
The first step is to configure MyApp to work with Squirrel.Windows. This requires you to install the Squirrel.Windows NuGet Package into the `MyApp.sln`.
## Installing Squirrel.Windows
The easiest way to install the Squirrel.Windows is using the [Package Manager Console](https://docs.NuGet.org/consume/package-manager-console) in Visual Studio after loading the MyApp solution.
~~~powershell
PM> Install-Package Squirrel.Windows
~~~
### Squirrel.Windows References
The package will install a number of dependent packages as well as tools that will be used to prepare MyApp to be released. The References in the Solution Explorer of the MyApp project now looks like the following (as of Squirrel.Windows version 1.2.2):
![](images/1.1-post-package-install.png)
**Tip:** Alternatively, you can use the "Manage NuGet Packages" GUI to install Squirrel.Windows (right clicking on your project in the Solution Explorer of Visual Studio and select "Manage NuGet Packages...").
## Basic Updating
For the basic example we are going to have MyApp update from your local file system rather than distributing the files via the web. See section [Packaging](2-packaging.md) for additional options related to the distributing the update files.
### Basic Squirrel.Windows Update Code
The following code is added to MyApp `Program.cs` to cause the application to check for, download, and install any new releases of MyApp in the background while you use the application.
**`Program.cs`**
~~~cs
using Squirrel;
using System.Threading.Tasks;
~~~
**`static async Task Main()`**
~~~cs
using (var mgr = new UpdateManager("C:\\Projects\\MyApp\\Releases"))
{
await mgr.UpdateApp();
}
~~~
The code above demonstrates the most basic update mechanism using the `UpdateApp()` method in an asynchronous task. The actions it takes will be discussed further in section [Updating](5-updating.md).
**Caution:** The path you provide the `UpdateManager` is the path to the directory where the `RELEASES` file is located (which is also named `Releases` by default), and not the actual `RELEASES` file.
**Tip:** By default, the files for updating MyApp will be placed in the same directory as your `MyApp.sln` file under a `Releases` directory (e.g., `C:\Projects\MyApp\Releases`).
**Tip:** In this example we simply put the code in the `Program.cs` file. For a production application, place the update code later in start-up process so as to avoid slowing down your program start.
**Tip:** If you attempt to debug the application via Visual Studio, you will get an exception of `Update.exe not found, not a Squirrel-installed app?`. You can resolve this by placing a copy of the Update.exe in your bin directory (see [Debugging Updates: Update.exe not found?](../using/debugging-updates.md) section for details).
---
| Previous: [Getting Started Guide](0-overview.md) | Next: [2. Packaging](2-packaging.md)|
|:---|:---|

View File

@@ -1,80 +0,0 @@
| [docs](..) / [getting-started](.) / 2-packaging.md |
|:---|
# Step 2. Packaging
Packaging is the process of building, packing, and preparing MyApp release packages for distribution.
## Building
The first step in preparing the application for distribution is to build the application.
1. **Set MyApp Version** - set the initial application version.
**`Properties\AssemblyInfo.cs`**
~~~cs
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
~~~
2. **Switch to Release** - switch your build configuration to `Release`.
3. **Build MyApp** - build your application to ensure the latest changes are included in the package we will be creating.
## Packing
Squirrel uses [NuGet](https://www.NuGet.org/) for bundling application files and various application properties (e.g., application name, version, description) in a single release package.
Section [NuGet Package Metadata](../using/nuget-package-metadata.md) provides additional details on using NuGet and `.nuspec` files to automate the packing of your application. We will be going through the process using the [NuGet Package Explorer](https://github.com/NuGetPackageExplorer/NuGetPackageExplorer) to manually create a NuGet package.
1. **Creating a New NuGet Package** - the first step is to create a new NuGet package.
2. **Edit Metadata** - update package metadata for MyApp.
* **Id** - name of the application (no spaces)
* **Version** - version specified in `Properties\Assembly.cs`
* **Dependencies** - Squirrel expects no dependencies in the package (all files should be explicitly added to the package)
3. **Add lib & net45** - add the `lib` folder and the `net45` folder to the project. Squirrel is expecting a single `lib / net45` directory provided regardless of whether your app is a `net45` application.
4. **Add Release Files** - add all the files from `bin\Release` needed by MyApp to execute (including the various files required by Squirrel).
* **Include MyApp Files:** MyApp.exe, MyApp.exe.config, any non-standard .NET dll's needed by MyApp.exe.
* **Include Squirrel Files:** Squirrel.dll, Splat.dll, NuGet.Squirrel.dll, Mono.Cecil.\*, DeltaCompressionDotNet.\*,
* **Exclude:** *.vshost.\*, *.pdb files
5. **Save the NuGet Package File** - save the NuGet package file to where you can easily access later (e.g., `MyApp.sln` directory). Follow the given naming format (e.g., `MyApp.1.0.0.nupkg`).
![](images/1.2-nuget-package-explorer.png)
## Releasifying
Releasifying is the process of preparing the `MyApp.1.0.0.nupkg` for distribution.
### Using Releasify
You use the `Squirrel.exe` tool that was included in the Squirrel.Windows package you installed in the `MyApp.sln` previously.
Use the [Package Manager Console](https://docs.NuGet.org/consume/package-manager-console) to execute `Squirrel.exe --releasify` command.
~~~powershell
PM> Squirrel --releasify MyApp.1.0.0.nupkg
~~~
**Tip:** If you get an error stating that `...'Squirrel' is not recognized...` then you may simply need to restart Visual Studio so the `Package Manager Console` will have loaded all the package tools.
### Releasify Output
The `Squirrel --releasify` command completes the following:
* **Create `Releases` Directory** - creates a Releases directory (in the `MyApp.sln` directory by default).
* **Create `Setup.exe`** - creates a `Setup.exe` file which includes the latest version of the application to be installed.
* **Create `RELEASES` File** - creates a file that provides a list of all release files for MyApp to be used during the update process
* **Create `MyApp.1.0.0-full.nupkg`** - copies the package you created to the `Releases` directory.
* **Create `MyApp.*.*.*-delta.nupkg`** - if you are releasing an update, releasify creates a delta file package to reduce the update package size (see [Updating](5-updating.md) for details).
**`C:\Projects\MyApp\Releases`**
![](images/1.2-releases-directory.png)
## See Also
* [Visual Studio Build Packaging](../using/visual-studio-packaging.md) - integrating NuGet packaging into your visual studio build process to include packing and releasifying.
---
| Previous: [1. Integrating](1-integrating.md) | Next: [3. Distributing](3-distributing.md)|
|:---|:---|

View File

@@ -1,22 +0,0 @@
| [docs](..) / [getting-started](.) / 3-distributing.md |
|:---|
# Step 3. Distributing
After packaging MyApp for distribution, the various files in the `Releases` directory are used to distribute MyApp to users.
* **Setup Application** - the `Setup.exe` application is provided to new users to install the current version of MyApp (see [Installing](4-installing.md) for details).
* **Update Files** - the `RELEASES` file, along with versioned full and delta packages, are used by the update process (see [Updating](5-updating.md) for details).
## Local File Distribution
For simplicity, this Getting Started guide uses a local file system location for updates. The location is defined in the update location provided to the `UpdateManager` (see code in [Integrating: Basic Updating](1-integrating.md)).
This generally is not practical for updates, unless all your users have access to similar network path where the files could be easily placed.
---
| Previous: [2. Packaging](2-packaging.md) | Next: [4. Installing](4-installing.md)|
|:---|:---|

View File

@@ -1,31 +0,0 @@
| [docs](..) / [getting-started](.) / 4-installing.md |
|:---|
# Step 4. Installing
The process to install MyApp is as simple as executing the `Setup.exe` application. `Setup.exe` is generated by the `Squirrel --releasify` process and is located in the `Releases` directory.
## Setup.exe
`Setup.exe` is a C++ bootstrapper application used to install MyApp on the user's local system. It includes the latest full version of the MyApp package files embedded in the exe file (see [Install Process](../using/install-process.md) for details).
## Install Process Overview
The `Setup.exe` application does the following (see [Install Process](../using/install-process.md) for details):
* Creates a `%LocalAppData%\MyApp` directory for the MyApp to be installed.
* Extracts and prepares the MyApp files under an `app-1.0.0` directory.
* Launches `app-1.0.0\MyApp.exe` at the end of the setup process.
### Installed File Structure
An installation for MyApp will look like the following after the initial installation.
#### `%LocalAppData%\MyApp` Directory
![](images/1.3-local-app-data-dir.png)
---
| Previous: [3. Distributing](3-distributing.md) | Next: [5. Updating](5-updating.md)|
|:---|:---|

View File

@@ -1,99 +0,0 @@
| [docs](..) / [getting-started](.) / 5-updating.md |
|:---|
# Step 5. Updating
The update process uses the update files generated by the `Squirrel --releasify` process. This includes the `RELEASES` file as well as versioned full and delta packages as required. The location of where to look for the distributed update files is provided to the `UpdateManager` in the MyApp code (see code in [Integrating: Basic Updating](1-integrating.md)).
Updating MyApp to a new version is the culmination of integrating, packaging, and distributing after installing MyApp. The process will cause you to revisit the packaging and distributing steps.
HH
To release a new update, you must first build, pack, and releasify your updated application.
### Building
1. **Update MyApp Version** - update the application version.
**`Properties\AssemblyInfo.cs`**
~~~cs
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.1")]
~~~
2. **Switch to Release** - switch your build configuration to `Release`.
3. **Build MyApp** - build your application to ensure the latest changes are included in the package we will be creating.
### Packing
Using [NuGet Package Explorer](https://npe.codeplex.com/) complete the following:
1. **Open Previous NuGet Package** - open the previous NuGet package you created for MyApp version 1.0.0.
2. **Update Version** - update the version in the metadata.
4. **Replace Release Files** - replace the changed files under `lib\net45`. You can simply drag and drop any program specific files that have changed (i.e., the `MyApp.exe` file is the only one that has updated in the example).
5. **Save the NuGet Package File as New Version** - use the "Save As..." feature to save the new version of the package `MyApp.1.0.1.nupkg`.
### Releasifying
Use the [Package Manager Console](https://docs.NuGet.org/consume/package-manager-console) to execute `Squirrel.exe --releasify` command using the new `MyApp.1.0.1.nupkg` package.
~~~powershell
PM> Squirrel --releasify MyApp.1.0.1.nupkg
~~~
**Tip:** If you get an error stating that `...'Squirrel' is not recognized...` then you may simply need to restart Visual Studio so the `Package Manager Console` will have loaded all the package tools. This behavior has been seen on the Community Edition of VS 2013 and 2015.
#### Releasify Output
After packaging the new MyApp version 1.0.1, the `Releases` directory has been updated as follows:
* **Updated Setup Application** - the `Setup.exe` application has been updated to include the latest MyApp version 1.0.1 package.
* **Updated Files** - the `RELEASES` file has been appended to include the newly created full and delta packages.
## Distributing the New Release
The `Releases` directory now includes the updated files to distribute to your users.
**`Releases` Directory**
![](images/1.5-releases-directory.png)
The `RELEASES` file contains SHA1 hash, filename, and file size for each package. This information is utilized by the application update process.
**`RELEASES` File**
~~~
E3F67244E4166A65310C816221A12685C83F8E6F MyApp-1.0.0-full.nupkg 600725
0D777EA94C612E8BF1EA7379164CAEFBA6E24463 MyApp-1.0.1-delta.nupkg 6030
85F4D657F8424DD437D1B33CC4511EA7AD86B1A7 MyApp-1.0.1-full.nupkg 600752
~~~
## Application Updating
In [Step 1. Integrating](1-integrating.md), we configured MyApp to look for and install any updates in the background each time MyApp is executed. In the MyApp example, a path to the `Releases` directory on the file system was specified.
### Updating Process Overview
The following steps are performed by the `UpdateManager` each time MyApp is executed (see [Update Process](../using/update-process.md) for details):
* The `UpdateManager` checks the `RELEASES` file at the distribution location for any updates.
* Any update packages are downloaded and the new MyApp is prepared for execution.
* App shortcuts are updated and old versions of MyApp are cleaned up.
### MyApp Example
The first time I run MyApp after providing the update the application is executed like normal.
![](images/1-MyApp.png)
In the background, MyApp has obtained and applied the updates in the installation directory.
![](images/1.5-local-app-data-dir.png)
The next time MyApp is executed, it will be the newly installed version.
![](images/1.5-MyApp.png)
---
| Previous: [4. Installing](4-installing.md) | Return: [Table of Contents](../readme.md)|
|:---|:---|

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,46 +0,0 @@
| [docs](.) / goals.md |
|:---|
# What Do We Want?
Deployment and Updates for Desktop applications are a real drag. ClickOnce almost works, but has some glaring bugs that don't seem like they'll ever be fixed. So let's own our own future and build a new one.
Windows apps should be as fast and as easy to install and update as apps like Google Chrome. From an app developer's side, it should be really straightforward to create an installer for my app, and publish updates to it, without having to jump through insane hoops
## Configuring
* Integrating the installer for an existing .NET application should be really easy.
* The client API should be able to check for updates and receive a (preferably in HTML) ChangeLog.
* Developer should have control over custom actions and events during installing and updating.
* Uninstall gives a chance for the application to clean up (i.e. I get to run a chunk of code on uninstall)
## Packaging
* Generating an installer given an existing .NET application should be really easy, like it is for ClickOnce.
* Creating an update for my app should be a very simple process that is easily automated.
* Packaging will support delta files to reduce the size of update packages.
## Distributing
* Hosting an update server should be really straightforward, and should be able to be done using simple HTTP (i.e. I should be able to host my installer and update feed via S3).
* Support for multiple "channels" (a-la Chrome Dev/Beta/Release).
## Installing
* Install is Wizard-Free™ and doesn't look awful (or at least, it should have the *possibility* to not look awful).
* No UAC dialogs, which means....
* ...installs to the local user account (i.e. under `%LocalAppData%`).
* No Reboots. None!
* Can pull down the .NET Framework if need be.
## Updating
* Updates should be able to be applied while the application is running.
* At no time should the user ever be forced to stop what he or she is doing.
* No Reboots. None!
---
| Return: [Table of Contents](readme.md) |
|:---|

View File

@@ -1,63 +0,0 @@
| [docs](.) / readme.md |
|:---|
![](artwork/Squirrel-Logo.png)
# Table of Contents
This document provides a table of contents for all the Squirrel documentation.
## General Documentation
* **[Squirrel Goals](goals.md)** - overview of the goals of the Squirrel.Windows project.
* **[Frequently Asked Questions (FAQ)](faq.md)** - list of frequently asked questions.
* **[Squirrel.Windows License](../COPYING)** - copyright and license for using Squirrel.Windows
## Getting Started Guide
The **[Getting Started Guide](getting-started/0-overview.md)** provides a step-by-step guide for integrating Squirrel into a simple Windows Forms application named MyApp.
1. **[Integrating](getting-started/1-integrating.md)** - integrating Squirrel `UpdateManager` into MyApp.
1. **[Packaging](getting-started/2-packaging.md)** - packaging MyApp files and preparing them for release.
1. **[Distributing](getting-started/3-distributing.md)** - providing install and update files for MyApp.
1. **[Installing](getting-started/4-installing.md)** - process of initial installation of MyApp.
1. **[Updating](getting-started/5-updating.md)** - process of updating an existing install of MyApp.
## Using Squirrel
* **Installing** - documentation related to the initial installation of your application via Setup.exe (and Setup.msi).
* [Install Process](using/install-process.md) - overview of the steps in the install process.
* [Custom Squirrel Events](using/custom-squirrel-events.md) - preforming custom actions for Squirrel events.
* [Custom Squirrel Events (non-c# apps)](using/custom-squirrel-events-non-cs.md) - steps on making a non-c# application Squirrel Aware and handling custom events.
* [Loading GIF](using/loading-gif.md) - specify a "loading" image during initial install of large applications.
* [GitHub](using/github.md) - overview of using GitHub for installing, distributing, and updating.
* [Machine-wide Installs](using/machine-wide-installs.md) - generating an MSI file suitable for installation via Group Policy.
* [Debugging Installs](using/debugging-installs.md) - tips for debugging Squirrel.Windows initial installs.
* **Packaging** - documentation related to packaging app files and preparing them for release.
* [Naming Conventions](using/naming.md) - overview of sources used in naming (e.g., shortcut name).
* [NuGet Package Metadata](using/nuget-package-metadata.md) - overview of the NuGet metadata and its uses by Squirrel.
* [Packaging Tools](using/packaging-tools.md) - tools available to assist in the process of packaging your application (e.g., NuGet, OctoPack, Auto.Squirrel)
* [Squirrel Command Line](using/squirrel-command-line.md) - command line options for `Squirrel --releasify`
* [Delta Packages](using/delta-packages.md) - an overview of how `Squirrel.exe` creates delta packages.
* [Application Signing](using/application-signing.md) - adding code signing to `Setup.exe` and your application.
* **Distributing** - documentation related to distributing the Setup.exe and update package files.
* [Microsoft IIS](using/microsoft-iis.md) - overview of using Microsoft IIS for distributing your application.
* [Amazon S3](using/amazon-s3.md) - overview of using Amazon S3 for distributing your application.
* [GitHub](using/github.md) - overview of using GitHub for installing, distributing, and updating.
* **Updating** - documentation related to updating an existing install via the `UpdateManager`.
* [Update Process](using/update-process.md) - overview of the steps in the update process.
* [Update Manager](using/update-manager.md) - reference guide for the `UpdateManager`.
* [GitHub](using/github.md) - overview of using GitHub for installing, distributing, and updating.
* [Debugging Updates](using/debugging-updates.md) - tips for debugging Squirrel.Windows updates.
* [Staged Rollouts](using/staged-rollouts.md) - how to use staged rollouts to ramp up install distribution over time
## Contributing
Why not give back and help make Squirrel even better by contributing to the project.
* [Contributing](contributing/contributing.md) - overview of ways you can become more involved with Squirrel.Windows.
* [Building Squirrel](contributing/building-squirrel.md) - steps to build squirrel for the impatient.
* [VS Solution Overview](contributing/vs-solution-overview.md) - overview of the various projects in the Squirrel.Windows Visual Studio solution.
* [Branching Strategy](contributing/branching-strategy.md) - overview of the different branches used in squirrel development.

View File

@@ -1,34 +0,0 @@
| [docs](..) / [using](.) / amazon-s3.md
|:---|
# Amazon S3
Amazon S3 can be used as an easy mechanism to host your releases
## Amazon S3 Setup
The following steps setup an S3 account and prepares MyApp for distribution.
1. **Register for Amazon AWS** - if you haven't already, register for an Amazon AWS account and go to the AWS Console.
2. **Create Bucket** - create a new bucket to hold your application updates
3. **Update the Package Location** - update the package location on the `UpdateManager` in MyApp to use the S3 `Link` address for the files minus the actual file name. This is the address for downloading the file and is similar to the following address:
`https://s3-us-west-2.amazonaws.com/myapp.bucket`
4. **Build, Pack, Releasify** - perform the necessary steps to build, package, and releasify MyApp for distribution.
3. **Upload Files** - upload the files from the Squirrel `Releases` directory into the S3 bucket.
4. **Make Public** - make the files public by selecting the files and performing the "Make Public" action.
## Amazon S3 Updates
After you have setup your S3 account, the following steps will distribute a new package for release.
4. **Build, Pack, Releasify** - perform the necessary steps to build, package, and releasify MyApp for distribution.
3. **Upload Files** - upload the new files from the Squirrel `Releases` directory. Make sure to include the new `Setup.exe` and `RELEASES` file along with any full and delta files for the new version.
4. **Make Public** - make the new files public by selecting the files and performing the "Make Public" action.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,41 +0,0 @@
| [docs](..) / [using](.) / application-signing.md
|:---|
# Application Signing
Signing your installer with a valid code signing certificate is one of the most important things that you need to do for production apps. Both IE SmartScreen as well as virus scanning software will give a significant amount of "points" to apps that are signed correctly, preventing your users from getting scary dialogs.
Acquire a code-signing certificate - it's recommended to get a Windows Error Reporting-compatible certificate, see this [MSDN article](https://msdn.microsoft.com/library/windows/hardware/hh801887.aspx) for more information, then pass the -n parameter, which are the parameters you would pass to `signtool.exe sign` to sign the app.
Squirrel makes signing easy, as it signs all of your application's executables *as well* as the final generated Setup.exe.
An example invocation including both of these features would be something like:
~~~powershell
PM> Squirrel --releasify MyApp.1.0.0.nupkg -n "/a /f CodeCert.pfx /p MySecretCertPassword /fd sha256 /tr http://timestamp.digicert.com /td sha256"
~~~
If you are using the [Visual Studio Build Packaging](visual-studio-packaging.md) process be careful how you escape your quotation marks in the `XML` of your `.csproj` file for the -n, --signWithParams argument. The wrapping quotation marks must be defined in `XML` safe ampersand escape strings or `&quot;`. Within this command you will likely need quotation marks around your certificate password. Since this is already within a quoted string you will need to double quote the password: `/p &quot;&quot;PASSWORD&quot;&quot;`.
~~~xml
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="myAssemblyInfo" />
</GetAssemblyIdentity>
<Exec Command="nuget pack MyApp.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(OutDir) -BasePath $(OutDir)" />
<!-- Notice the use of &quot; rather than " after the \n flag. For the password to contain spaces we need to double-&quot; the string. -->
<Exec Command="squirrel --releasify $(OutDir)MyApp.$([System.Version]::Parse(%(myAssemblyInfo.Version)).ToString(3)).nupkg -n &quot;/a /f .\CertificateInProjectFolder.pfx /p &quot;&quot;CERTIFICATE PASSWORD&quot;&quot; /fd sha256 /tr http://timestamp.digicert.com /td sha256&quot;" />
</Target>
~~~
## See Also
* [Squirrel Command Line](squirrel-command-line.md) - command line options for `Squirrel --releasify`
* [Visual Studio Build Packaging](visual-studio-packaging.md) - integrating Squirrel packaging into your build process
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,45 +0,0 @@
| [docs](..) / [using](.) / custom-squirrel-events-non-cs.md
|:---|
# Custom Squirrel Events (Non-C# Apps)
Squirrel events allow you to handle custom events around the installation and updating process.
### Making Your App Squirrel Aware
Add an entry to the *English* Version Block info called "SquirrelAwareVersion" with a value of "1". Typically this is done via the "App.rc" resource file. Here's a typical entry:
```
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Installer for Squirrel-based applications"
VALUE "FileVersion", "0.5.0.0"
VALUE "InternalName", "Setup.exe"
VALUE "LegalCopyright", "Copyright (C) 2014"
VALUE "OriginalFilename", "Setup.exe"
VALUE "ProductName", "Squirrel-based application"
VALUE "ProductVersion", "0.5.0.0"
VALUE "SquirrelAwareVersion", "1"
END
END
```
### Application Startup Commands
This means that this EXE will be executed by the installer in a number of different scenarios, with special flags - you should handle them correctly:
* `--squirrel-install x.y.z.m` - called when your app is installed. Exit as soon as you're finished setting up the app
* `--squirrel-firstrun` - called after everything is set up. You should treat this like a normal app run (maybe show the "Welcome" screen)
* `--squirrel-updated x.y.z.m` - called when your app is updated to the given version. Exit as soon as you're finished.
* `--squirrel-obsolete x.y.z.m` - called when your out-of-date app is no longer the newest version. Exit as soon as you're finished.
* `--squirrel-uninstall x.y.z.m` - called when your app is uninstalled. Exit as soon as you're finished.
## See Also
* [Custom Squirrel Events for c# Apps](custom-squirrel-events.md) - steps on making a c# application Squirrel Aware and handling custom events.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,62 +0,0 @@
| [docs](..) / [using](.) / custom-squirrel-events.md
|:---|
# Custom Squirrel Events
## Handling Squirrel Events
Squirrel events allow you to handle custom events around the installation and updating process, which is important because Squirrel doesn't do much of anything at installation time automatically. However, since the code is executing inside your application, it's way easier to do stuff than other systems where you're writing custom "installer DLLs".
### Overriding Default Behaviors
When none of the apps in your package are "Squirrel-Aware", Squirrel does some things on your behalf to make your life easier, the primary one being that every EXE in your app package automatically gets a shortcut on both the Desktop and the Start Menu. Once you enable Squirrel events *for even a single EXE file*, you must do this yourself.
### Making Your App Squirrel Aware
In your app's `AssemblyInfo.cs`, add the following line:
```
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
```
### Using the `SquirrelAwareApp` Helper
If you are writing a C# app, it is **highly encouraged** to use the `SquirrelAwareApp` helper class to implement this. Here's an implementation that is similar to the default (i.e. non-squirrel-aware) behavior:
```cs
static bool ShowTheWelcomeWizard;
...
static int Main(string[] args)
{
// NB: Note here that HandleEvents is being called as early in startup
// as possible in the app. This is very important! Do _not_ call this
// method as part of your app's "check for updates" code.
using (var mgr = new UpdateManager(updateUrl))
{
// Note, in most of these scenarios, the app exits after this method
// completes!
SquirrelAwareApp.HandleEvents(
onInitialInstall: v => mgr.CreateShortcutForThisExe(),
onAppUpdate: v => mgr.CreateShortcutForThisExe(),
onAppUninstall: v => mgr.RemoveShortcutForThisExe(),
onFirstRun: () => ShowTheWelcomeWizard = true);
}
}
```
## App Setup Helper Methods
These methods help you to set up your application in Squirrel events - if you're not using custom Squirrel events, you probably don't need to call these methods.
* `[Create/Remove]ShortcutsForExecutable` - creates and removes shortcuts on the desktop or in the Start Menu.
* `[Create/Remove]UninstallerRegistryEntry` - creates and removes the uninstaller entry. Normally called by `Update.exe`.
## See Also
* [Custom Squirrel Events for non-c# Apps](custom-squirrel-events-non-cs.md) - steps on making a non-c# application Squirrel Aware and handling custom events.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,22 +0,0 @@
| [docs](..) / [using](.) / debugging-installs.md
|:---|
# Debugging Installs
The following tips will help you to debug the installation of an Squirrel app.
## Simulating an Install and First Run
If the install of your application doesn't seem to be working, you can explore the behavior by executing the install steps from the command line:
~~~ps
C:\user\AppData\Local\MyApp> MyApp.exe --squirrel-install 1.0.0
C:\user\AppData\Local\MyApp> MyApp.exe --squirrel-firstrun
~~~
The first cmd should create some shortcuts then immediately exit, then the 2nd one should start your app ([source](https://github.com/Squirrel/Squirrel.Windows/issues/525))
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,42 +0,0 @@
| [docs](..) / [using](.) / debugging-updates.md
|:---|
# Debugging Updates
The following tips will help you to debug the update process in your application.
## Update.exe not found?
Executing MyApp from Visual Studio will execute the update process and you will get the following exception from the `UpdateManager`:
~~~
Update.exe not found, not a Squirrel-installed app?
~~~
The `UpdateManager` is expecting to find the `Update.exe` application installed one directory up from the EXE (e.g., the `\bin` directory for default Visual Studio projects).
To resolve this, you can simply place a file named `Update.exe` or you can copy the `Squirrel.exe` from the `MyApp\packages\squirrel.windows.1.2.2.tools` directory and rename it Update.exe (this is the actual Update.exe packaged inside `Setup.exe`).
Executing MyApp from Visual Studio will now cause it to complete the update process and your `\bin` directory will resemble the `%LocalAppData\MyApp%` install directory:
![](images/debugging-update-dir.png)
**Tip:** If you want to ensure that the Update.exe is always available in your output directory, you can add the Update.exe file to the Visual Studio project and set its Properties > Copy To Output Directory to 'Copy if newer'.
## Catching Update Exceptions
You can catch thrown exceptions and log the results.
~~~cs
using (var mgr = new UpdateManager("C:\\Projects\\MyApp\\Releases"))
{
await mgr.UpdateApp();
}
~~~
Alternatively, set up Splat Logging, see [here](https://github.com/Squirrel/Squirrel.Windows.Next/blob/6d7ae23602a3d9a7636265403d42c1090260e6dc/src/Update/Program.cs#L53) for an example.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,34 +0,0 @@
| [docs](..) / [using](.) / delta-packages.md
|:---|
# Delta Packages
Now, once we've got a full package, we need to generate a Delta package. To do this, we'll replace all the DLL/EXEs in the NuGet packages with bsdiff files. [bspatch/bsdiff](http://code.logos.com/blog/2010/12/binary_patching_with_bsdiff.html) is a mostly efficient algorithm for calculating diffs between binary files (especially Native binaries, but it works well for .NET ones too), and a way to apply them.
So, this is pretty easy:
1. Extract the previous NuGet package
1. Extract the current NuGet package
1. Replace every EXE/DLL with the bsdiff. So, `lib\net40\MyCoolApp.exe` becomes `lib\net40\MyCoolApp.exe.diff`. Create a file that contains a SHA1 of the expected resulting file and its filesize called `lib\net40\MyCoolApp.exe.shasum`
1. New DLLs in current get put in verbatim
1. Zip it back up
The .shasum file has the same format as the Releases file described in the "'Latest' Pointer" section, except that it will only have one entry.
So now we've got all of the *metadata* of the original package, just none of its *contents*. To get the final package, we do the following:
1. Take the previous version, expand it out
1. Take the delta version, do the same
1. For each DLL in the previous package, we bspatch it, then check the shasum file to ensure we created the correct resulting file
1. If we find a DLL in the new package, just copy it over
1. If we can't find a bspatch for a file, nuke it (it doesn't exist in the new rev)
1. Zip it back up
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,79 +0,0 @@
| [docs](..) / [using](.) / github.md
|:---|
# Using GitHub
GitHub release assets can be used to distribute the necessary Squirrel files for the Squirrel install and update process. It still requires you to upload all the release files as assets for each release, but provides you a means of hosting your update files via your GitHub repository.
**Important:** GitHub since February 22, 2018 [only support TLS 1.2 connections](https://githubengineering.com/crypto-removal-notice/). The host application is therefore required to use .NET framework 4.6.1, otherwise TLS 1.1 is the default protocol and check for update won't work.
## Installing from GitHub
GitHub allows you to provide a [static link](https://help.github.com/articles/linking-to-releases/) to a repositories latest release page. You can direct your users to download the `Setup.exe` from the list of assets you uploaded for the release.
~~~
https://github.com/myuser/MyApp/releases/latest
~~~
**Tip:** This link simply redirects to the repositories latest release page, and cannot be used to download an asset directly (i.e., you can't simply make a static link to ".../releases/latest/Setup.exe"). However, you can use the [GitHub API with ajax](http://stackoverflow.com/a/26454035) to provide a direct link on your website and avoid the user having to select the correct file or navigate to the GitHub website.
## Distributing from GitHub
The following steps are required to distribute your RELEASES and update NuGet packages with GitHub:
1. **Commit Latest Code** - In order for GitHub to mark a new release as the `Latest`, you have at least one additional commit since the last release tag was added (i.e., releases tags must not share the same commit).
1. **Create a New Release** - [Create a new GitHub release](https://help.github.com/articles/creating-releases/) in your MyApp repository matching your current release version (e.g., 1.0.0).
2. **Upload Release Files** - upload all of the files from `Releases` as assets of the GitHub release (e.g., RELEASES, MyApp.1.0.0-full.nupkg, MyApp.1.0.1-delta.nupkg, MyApp.1.0.1-full.nupkg).
3. **Set Pre-release (optional)** - if desired, set the release as a pre-release.
4. **Publish the Release** - click the "Publish Release" to make the release available to the general public and your users.
**Important:** You must upload all packages as assets you wish to be available for update (i.e., the GitHubUpdateManager doesn't look back to previous GitHub releases for previous version packages). If you only include the latest packages, Squirrel will be forced to download the latest full package for each update.
## Updating with GitHub
The Updating process requires you to build, package, releasify, and distribute the update files.
**Important:** You must ensure there is at least one additional commit since the last version release before adding a new release. GitHub will not update the latest release if the new release tag is tied to the same last commit as a previous release tag.
### GitHub Update Manager
To use GitHub release assets as your distribution mechanism you need to replace `UpdateManager` with `GitHubUpdateManager` when integrating Squirrel in your app:
**`Program.cs`**
~~~cs
using Squirrel;
using System.Threading.Tasks;
~~~
**`static async Task Main()`**
~~~cs
using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/myuser/myapp"))
{
await mgr.Result.UpdateApp();
}
~~~
**Important:** Make sure your url doesn't end in a forward slash ("/"). Adding the trailing forward slash will cause it to fail with a 404 error ([see #641](https://github.com/Squirrel/Squirrel.Windows/issues/641#issuecomment-201478324)).
**Tip:** You can also specify that the update manager should use `prerelease` for updating (see method signature for details).
**Source:** See [Issue #442](https://github.com/Squirrel/Squirrel.Windows/issues/442) for more information.
### How it Works
The GitHub API is used by the `GitHubUpdateManager` to obtain the correct release and asset files for downloading. The following actions are performed:
1. Extracts the username and repository from the url (e.g., "myuser" and "myapp").
2. Uses the GitHub API to get the latest release information. For example, the following url obtains a json list of all release information for the Squirrel.Windows repository: [https://api.github.com/repos/Squirrel/Squirrel.Windows/releases](https://api.github.com/repos/Squirrel/Squirrel.Windows/releases)
3. Obtains the correct download path from the `html_url` attribute of the latest release (or pre-release if specified) to be used as the path for downloading assets.
4. Follows the normal Squirrel update process by looking for a `RELEASES` file and downloading the necessary delta or full application packages.
---
| Return: [Table of Contents](../readme.md) |
|----|

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,74 +0,0 @@
| [docs](..) / [using](.) / install-process.md
|:---|
# Install Process
This section goes into detail about the install process.
## Setup.exe
`Setup.exe` is a C++ bootstrapper application used to install your app on the user's local system. It is generated as part of the `Squirrel --releasify` process.
The `Setup.exe` file includes the `Update.exe` application and the latest version of the MyApp package to be installed. A single executable file can be provided due to the `WriteZipToSetup.exe` tool injecting the appropriate files into the exe.
In addition, the `Setup.exe` will also ensure that .NET 4.5 is installed on the user's computer.
## Install Location
The `Setup.exe`, and later the `UpdateManager` in MyApp must have the ability to write files to and execute files from the application install location. To ensure permission for all types of users, the user's application data directory is selected as the install location (i.e., `%LocalAppData%\MyApp`).
The installation root really only needs to consist of two types of folders:
* **Packages** - folder used to download and assemble the update package files.
* **App Folders** - the "installed" application files for a given version of MyApp.
```
\%LocalAppData%\MyApp
\packages
MyApp-1.0.0.nupkg
MyApp-1.0.1-delta.nupkg
MyApp-1.0.1.nupkg
\app-1.0.0
MyApp.exe
\app-1.0.1
MyApp.exe
```
The packages directory is effectively immutable, it simply consists of the packages we've downloaded. Using the user's local application data directory means that we the needed write-access to the install directory on a per-user basis.
**Tip:** See [Machine-wide Installs](machine-wide-installs.md) for more information on ensuring your application pushed to all users in an enterprise environment.
## Install Process Overview
The `Setup.exe` application preforms the following:
1. **Ensures .NET Framework Installed** - determines if .NET Framework is available, and if not relaunches itself with `/installfx45` to download and launch the .NET Framework installer.
1. **Create `%LocalAppData%\MyApp` Directory** - creates a directory for the MyApp to be installed.
2. **Extracts `Update.exe`** - extracts the `Update.exe` application to the application directory (`%LocalAppData%\MyApp`).
3. **Extracts `MyApp.1.0.0-full.nupkg`** - extracts the MyApp full application package to the `%LocalAppData%\MyApp\packages\temp` directory.
4. **Executes `Update.exe` to Finish Install** - executes the `Update.exe` application with the `/install` switch to finish the application installation and then launch the application.
1. **Copy MyApp to `app-1.0.0` Directory** - copy the full version of MyApp files to a application sub-directory (e.g., `MyApp\app-1.0.0`).
2. **Launch MyApp** - at the end of the setup process, the Updater launches the newly installed version of MyApp.
6. **MyApp Creates Shortcuts** - the first execution of the application will cause shortcuts to be created on the desktop and Windows start menu for MyApp.
## Desktop & Windows Start Shortcuts
By default, application shortcuts are created on the desktop and the Windows Start menu that point to the `Update.exe` application with additional arguments pointing to the correct application to execute.
**`MyApp.lnk` (Application Shortcut)**
* **Target:** `C:\Users\kbailey\AppData\Local\MyApp\Update.exe --processStart MyApp.exe`
* **Start in:** `C:\Users\kbailey\AppData\Local\MyApp\app-1.0.0`
## See Also
* [Loading GIF](loading-gif.md) - specify a "loading" image during initial install of large applications.
* [Machine-wide Installs](machine-wide-installs.md) - generating an MSI file suitable for installation via Group Policy.
* [NuGet Package Metadata](nuget-package-metadata.md) - overview of the NuGet metadata and its uses by Squirrel.
* [Naming Conventions](naming.md) - A more complete view of how Squirrel names everything.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,20 +0,0 @@
| [docs](..) / [using](.) / loading-gif.md
|:---|
# Loading GIF
Squirrel installers don't have any UI - the goal of a Squirrel installer is to install so blindingly fast that double-clicking on Setup.exe *feels* like double-clicking on an app shortcut. Make your installer **fast**.
However, for large applications, this isn't possible. For these apps, Squirrel will optionally display a graphic as a "splash screen" while installation is processing, but only if installation takes more than a pre-set amount of time. This will be centered, backed by a transparent window, and can optionally be an animated GIF. Specify this via the `-g` parameter.
~~~powershell
PM> Squirrel --releasify MyApp.1.0.0.nupkg -g .\loading.gif
~~~
## See Also
* [Squirrel Command Line](squirrel-command-line.md) - command line options for `Squirrel --releasify`
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,36 +0,0 @@
| [docs](..) / [using](.) / machine-wide-installs.md
|:---|
# Machine-wide Installs
Squirrel's Releasify command generates an MSI file suitable for installation via Group Policy. This MSI isn't a general-purpose installer, this means that once you run the MSI, users from now on will get the app installed, on next Login.
So, most normal users should continue to run the Setup.exe's generated by Releasify, but if you want to have an IT Admin Friendly version, you can hand off the MSI
## Common pitfalls
### Missing data in `.nuspec`
Most users of Squirrel won't have to do anything new to enable this behavior, though certain NuGet package IDs / names might cause problems with MSI.
**Source:** See [issue #466](https://github.com/Squirrel/Squirrel.Windows/issues/466) for more details.
### Nothing happens on login
In cases where the end user has previously installed your application, the installer that runs on login will not re-install your application on every login. This can easily be the case if you as a developer is testing out both the EXE and the MSI.
Squirrel leaves behind an almost-empty `%LocalAppData%\MyApp` folder after an uninstall. Deleting this folder (the entire folder, not just the contents) will allow the installer that runs on login to install successfully.
**Source:**: See [issue #555](https://github.com/Squirrel/Squirrel.Windows/issues/555#issuecomment-253265130) for details.
## Disabling MSI Generation
Generating MSIs can be disabled via the --no-msi flag as shown below:
~~~powershell
PM> Squirrel --releasify MyApp.1.0.0.nupkg --no-msi
~~~
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,34 +0,0 @@
| [docs](..) / [using](.) / microsoft-iis.md
|:---|
# Microsoft IIS
If you use Microsoft IIS to distribute the necessary Squirrel files, you must provide a custom `Web.config` file as described below.
## Hosting on IIS
All versions of IIS (including Microsoft Azure PaaS) deny serving files when
the extension MIME type is unknown. If you are hosting your updates in this
manner then you will need to add a `Web.config` to your downloads repository as
follows:
**`~/downloads/Web.config` File**
~~~xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".nupkg" mimeType="application/zip" />
<mimeMap fileExtension="." mimeType="text/plain" />
</staticContent>
</system.webServer>
</configuration>
~~~
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,45 +0,0 @@
| [docs](..) / [using](.) / naming.md
|:---|
# Naming Conventions
In addition to the [NuGet Package Metadata](nuget-package-metadata.md), there are other places that squirrel pulls naming information from. Here is the logic:
## Shortcut name
The shortcut name is selected from the first non-null item below:
1. `[assembly: AssemblyProduct("MyApp")` (from `AssemblyInfo.cs`)
2. Squirrel NuGet Package Metadata `title` property.
3. `[assembly: AssemblyDescription("MyApp")` (from `AssemblyInfo.cs`)
4. Filename of the Exe (e.g., MyApp)
## Local Install location
The local install location is determined by the `id` in the NuGet package metadata.
* `%LocalAppData%\<NuGet Package ID>`
**Warning:** Using \[dots\] (i.e., "."'s) in your package id will cause issues ([see issue #523](https://github.com/Squirrel/Squirrel.Windows/issues/523)).
## Program and Features Entry
The entry in the Windows Uninstall is determined as follows:
* Squirrel NuGet Package Metadata `title` property
## Releases Folder
The `Squirrel --releasify` command will create update packages based on the following:
* `<NuGet Package ID>-<NuGet Package Version>-delta.nupkg`
* `<NuGet Package ID>-<NuGet Package Version>-full.nupkg`
![](images/naming-releases.png)
## See Also
* [NuGet Package Metadata](nuget-package-metadata.md) - naming from the NuGet Package Metadata perspective.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,27 +0,0 @@
| [docs](..) / [using](.) / nuget-package-metadata.md
|:---|
# NuGet Package Metadata
Squirrel uses information from your app's EXE as well as the NuGet package Metadata for the setup and uninstall UI.
* **Id** - name of the application (**warning:** you must **[avoid using spaces and dots](https://github.com/Squirrel/Squirrel.Windows/issues/523)** in the Id).
* Name of the release packages (e.g., **MyApp**-1.0.0-full.nupkg).
* Local installation directory (e.g., `%LocalAppData%\MyApp`).
* **Title** - used for the name of the application in the Windows Application Uninstaller.
* **Version** - version specified in `Properties\Assembly.cs`.
* Name of the release package (e.g., MyApp-**1.0.0**-full.nupkg).
* Version number in the Windows Uninstaller (see screenshot below).
* **Icon Url** - url to an icon to be used for the application. Used for the shortcuts and Windows Uninstaller icons. This must be an icon file (*.ICO) to work correctly. Note that the icon is fetched at installation time rather than
packaging (source: [issue #745](https://github.com/Squirrel/Squirrel.Windows/issues/745))
* **Language** Changes the codepage in to support non english characters. Defaults to 1252 if not present.
![](images/uninstall-app.png)
## See Also
* [Naming Conventions](naming.md) - overview of sources used naming (including those outside of the NuGet Package Metadata).
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,33 +0,0 @@
| [docs](..) / [using](.) / octopack.md
|:---|
# Using OctoPack
In order to automatically construct your nuget packages you can use [OctoPack](https://github.com/OctopusDeploy/OctoPack). Octopack allows you to specify a .nuspec file which will be used to specify how your .nupkg should be created.
Follow the core instructions for creating your .nuspec file on the [OctoPack](https://github.com/OctopusDeploy/OctoPack) page.
You'll then need to add a files specification to match Squirrel's expected .nupkg structure:
~~~
<files>
<file src="bin\Release\*.*" target="lib\net45\" exclude="bin\release\*.pdb;bin\release\*.nupkg;bin\release\*.vshost.*"/>
</files>
~~~
If you're building using Visual Studio, you will also need to edit your .csproj file to include a property group.
~~~
<PropertyGroup>
<RunOctoPack>true</RunOctoPack>
</PropertyGroup>
~~~
If you're using a build server, see OctoPack's guides on how to trigger it to be run.
---
| Return: [Packaging Tools](packaging-tools.md) |
|----|

View File

@@ -1,26 +0,0 @@
| [docs](..) / [using](.) / packaging-tools.md
|:---|
# Packaging Tools
The following tools can simplify and/or automate the packaging process.
* [NuGet Docs](http://docs.nuget.org/) - documentation for NuGet packaging manager.
* [NuGet Package Explorer](https://npe.codeplex.com/) - GUI tool for building NuGet packages.
* [Visual Studio Build Packaging](visual-studio-packaging.md) - integrating NuGet packaging into your visual studio build process.
* [OctoPack](octopack.md) - steps to use OctoPack to build the source NuGet package to provide to `squirrel --releasify`.
* [Auto.Squirrel Package Manager](https://github.com/tenacious/Auto.Squirrel) - tool to fully automatize the application deploy, from build to upload the updated files.
* [Paket](http://fsprojects.github.io/Paket/template-files.html) - dependency manager for .NET and mono projects, which is designed to work well with NuGet packages and also enables referencing files directly from Git repositories or any HTTP resource.
* [TeamCity](teamcity.md) - tips on using the TeamCity build server to package your app.
## See Also
* [Step 2. Packaging](../getting-started/2-packaging.md) - step from getting started guide on using NuGet Package Explorer.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,47 +0,0 @@
| [docs](..) / [using](.) / squirrel-command-line.md
|:---|
# Squirrel Command Line
Here is a simplified help output specifically around creating releases:
```
Usage: Squirrel.exe command [OPTS]
Creates Squirrel packages
Commands
--releasify=VALUE Update or generate a releases directory with a
given NuGet package
Options:
-h, -?, --help Display Help and exit
-r, --releaseDir=VALUE Path to a release directory to use with Releasify
-p, --packagesDir=VALUE Path to the NuGet Packages directory for C# apps
--bootstrapperExe=VALUE
Path to the Setup.exe to use as a template
-g, --loadingGif=VALUE Path to an animated GIF to be displayed during
installation
-n, --signWithParams=VALUE Sign the installer via SignTool.exe with the
parameters given
--setupIcon=VALUE Path to an ICO file that will be used for the
Setup executable's icon
-b --baseUrl=VALUE Provides a base URL to prefix the RELEASES file
packages with
--no-msi Don't generate an MSI package
--msi-win64 Mark the MSI as 64-bit, which is useful in
Enterprise deployment scenarios
--no-delta Don't generate delta packages to save time
--framework-version=VALUE
Set the required .NET framework version, e.g. net461
```
## See Also
* [Loading GIF](loading-gif.md) - specify a "loading" image during initial install of large applications.
* [Application Signing](application-signing.md) - adding code signing to `Setup.exe` and your application.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,50 +0,0 @@
| [docs](..) / [using](.) / staged-rollouts.md
|:---|
# Staged Rollouts
Staged rollouts allow you to distribute the latest version of your app to a subset of users that you can increase over time, similar to rollouts on platforms like Google Play. This feature requires Squirrel.Windows 1.4.0 or above.
### How to use
Staged rollouts are controlled by manually editing your `RELEASES` file. Here's an example:
~~~
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
~~~
Now let's ship a new version to 10% of our userbase.
```
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030# 10%
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752# 10%
```
Note that the syntax is `# nn%` - due to a bug in earlier versions of Squirrel.Windows, for now, you *must* put the `#` immediately following the file size, no spaces. Once all of your users have Squirrel 1.4.0 or higher, you can add a space after the `#` (similar to a comment).
Assuming that this rollout is going well, at some point you can upload a new version of the `RELEASES` file:
```
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030# 50%
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752# 50%
```
When you're confident that this release has gone successfully, you can remove the comment so that 100% of users get the file:
```
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
0d777ea94c612e8bf1ea7379164caefba6e24463 myapp-1.0.1-delta.nupkg 6030
85f4d657f8424dd437d1b33cc4511ea7ad86b1a7 myapp-1.0.1-full.nupkg 600752
```
### Handling failed rollouts
If you want to pull a staged release because it hasn't gone well, you should hand-edit the RELEASES file to completely remove the bad version:
~~~
e3f67244e4166a65310c816221a12685c83f8e6f myapp-1.0.0-full.nupkg 600725
~~~
Once you do this, you **must** increment the version number higher than your broken release (in this example, we would need to release MyApp 1.0.2). Because some of your users will be on the broken 1.0.1, releasing a _new_ 1.0.1 would result in them staying on a broken version.

View File

@@ -1,22 +0,0 @@
| [docs](..) / [using](.) / teamcity.md
|:---|
# Team City Packaging
## Adding the Packaging Step
When TeamCity pulls down your code, the squirrel.exe will sit under packages if it was added to your solution using NuGet.
1. Add a NuGet Pack process which will create the .nupkg based on a .nuspec file to ensure the package is correct.
2. Create a command line build process and add the following:
~~~
%system.teamcity.build.workingDir%\packages\squirrel.windows.1.4.0\tools\squirrel --releasify [BUILD_SERVER_NUPKG_PATH]\%system.build.number%.nupkg -r [OUTPUT_PATH]
~~~
**Note:** Paths may vary depending on your structure so make sure to update the path information above correctly.
This will cause the appropriate files to be created just as if you had run it from the Package Manager Console.

View File

@@ -1,57 +0,0 @@
| [docs](..) / [using](.) / update-manager.md
|:---|
# Update Manager Reference
## Basic Updating
The "Easy Mode" method that does everything all in one go.
* `UpdateApp` - downloads and updates the app to the latest version.
## Advanced Updating
The following methods are provided to allow you to have more control of the update process (i.e., to interact with app updates and apply them if desired).
* `CheckForUpdate` - checks on the server if there are updates available. Returns an `UpdateInfo` object that contains information about any pending updates.
* `DownloadReleases` - downloads release files (the `nupkg` file deltas) from the server to the local machine
* `ApplyReleases` - installs the downloaded packages, and returns the new `app-[version]` directory path.
### UpdateInfo
The `UpdateInfo` class contains information about available and installed releases.
~~~cs
public class UpdateInfo
{
public ReleaseEntry CurrentlyInstalledVersion;
public ReleaseEntry FutureReleaseEntry;
public List<ReleaseEntry> ReleasesToApply;
}
~~~
### ReleaseEntry
The `ReleaseEntry` class contains the specifics of each release.
~~~cs
public interface ReleaseEntry
{
public string SHA1;
public string Filename;
public long Filesize;
public bool IsDelta;
}
~~~
## See Also
* [Update Process](update-process.md) - overview of the steps in the update process.
* [GitHub Update Manager](github.md) - process of using `GitHubUpdateManager`.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,29 +0,0 @@
| [docs](..) / [using](.) / update-process.md
|:---|
# Update Process
The following steps are performed by the `UpdateManager` each time your app is executed:
1. **Check for Updates** - the `RELEASES` file at the distribution location is downloaded and compared to local `RELEASES` file to check for any updates.
2. **Download & Verify Update Packages** - if there is a new release, the `UpdateManager` determines whether to download the deltas or the latest full package (by calculating which one requires less total downloading) to update to the current version. The packages are compared against their SHA1 in the `RELEASES` file for verification.
3. **Build Full Package from Deltas** - if delta packages were downloaded, a new full package is created from the previous full package and the downloaded delta file.
3. **Install New Version** - the current version of MyApp is extracted from the full package and placed in a new `%LocalAppData%\MyApp` install directory based on the version number (e.g., `app-1.0.1`).
4. **Update Shortcuts** - desktop and Windows Start Menu shortcuts are updated to point to the new MyApp version (via the `--processStart` command line parameter passed to `Update.exe`).
5. **Previous Version Clean-up** - on the next startup of MyApp, all but current and immediately previous version of your app are deleted as part of clean up (e.g., after updating to app-1.0.5, app-1.0.4 will remain, but app-1.0.3 and before will be deleted - see [issue #589](https://github.com/Squirrel/Squirrel.Windows/issues/589)).
## Rollback
Currently, there is no built-in support for rolling back to a previous version.
## See Also
* [Update Manager](update-manager.md) - reference guide for the `UpdateManager`.
* [Debugging Updates](debugging-updates.md) - tips on debugging your Squirrel application.
---
| Return: [Table of Contents](../readme.md) |
|----|

View File

@@ -1,69 +0,0 @@
| [docs](..) / [using](.) / visual-studio-packaging.md
|:---|
# Visual Studio Build Packaging
Squirrel packaging can be easily integrated directly into your build process using only NuGet and Squirrel.
## Define Build Target
The first step is to define a build target in your `.csproj` file.
```xml
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="myAssemblyInfo"/>
</GetAssemblyIdentity>
<Exec Command="nuget pack MyApp.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(OutDir) -BasePath $(OutDir)" />
<Exec Command="squirrel --releasify $(OutDir)MyApp.$([System.Version]::Parse(%(myAssemblyInfo.Version)).ToString(3)).nupkg" />
</Target>
```
This will generate a NuGet package from .nuspec file setting version from AssemblyInfo.cs and place it in OutDir (by default bin\Release). Then it will generate release files from it.
## Example .nuspec file for MyApp
Here is an example `MyApp.nuspec` file for the above build target example.
```xml
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MyApp</id>
<!-- version will be replaced by MSBuild -->
<version>0.0.0.0</version>
<title>title</title>
<authors>authors</authors>
<description>description</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright 2016</copyright>
<dependencies />
</metadata>
<files>
<file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*"/>
</files>
</package>
```
## Additional Notes
Please be aware of the following when using this solution:
* Solution needs to have nuget.exe available which can be accomplished by installing `NuGet.CommandLine` package in your solution.
```pm
PM> Install-Package NuGet.CommandLine
```
* It suffers from a bug when sometimes NuGet packages are not loaded properly and throws nuget/squirrel is not recogized (9009) errors.
**Tip:** In this case you may simply need to restart Visual Studio so the Package Manager Console will have loaded all the package tools
* If you get the following error you may need add the full path to squirrel.exe in the build target `Exec Command` call. `'squirrel' is not recognized as an internal or external command`
**Source:** [Issue #630](https://github.com/Squirrel/Squirrel.Windows/issues/630)
---
| Return: [Packaging Tools](packaging-tools.md) |
|----|

View File

@@ -1,26 +0,0 @@
| [docs](..) / [using](.) / filename.md
|:---|
# Title
text
## Sub-title
text
~~~cs
code
~~~
**Tip:** text
## See Also
* [seealso]() - text
---
| Return: [Table of Contents](../readme.md) |
|----|

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

View File

@@ -12,19 +12,19 @@
<LangVersion>latest</LangVersion>
<SignAssembly>True</SignAssembly>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<AssemblyOriginatorKeyFile>..\..\Squirrel.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\..\Velopack.snk</AssemblyOriginatorKeyFile>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
<Product>Squirrel</Product>
<Product>Velopack</Product>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright © Caelan Sayler 2021</Copyright>
<Authors>Caelan Sayler</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/clowd/Clowd.Squirrel</PackageProjectUrl>
<RepositoryUrl>https://github.com/clowd/Clowd.Squirrel</RepositoryUrl>
<PackageTags>windows;macos;osx;updater;dotnet;installer;desktop;squirrel;autoupdate;automatic-updates</PackageTags>
<PackageProjectUrl>https://github.com/velopack/velopack</PackageProjectUrl>
<RepositoryUrl>https://github.com/velopack/velopack</RepositoryUrl>
<PackageTags>windows;macos;osx;updater;dotnet;installer;desktop;squirrel;velopack;autoupdate;automatic-updates</PackageTags>
</PropertyGroup>
<ItemGroup Condition=" '$(MSBuildProjectExtension)'=='.csproj' ">

View File

@@ -12,7 +12,7 @@
"args": [
"build",
"--bin=setup",
"--package=clowd_squirrel"
"--package=velopack"
],
"filter": {
"name": "setup",
@@ -34,7 +34,7 @@
"test",
"--no-run",
"--bin=setup",
"--package=clowd_squirrel"
"--package=velopack"
],
"filter": {
"name": "setup",
@@ -52,7 +52,7 @@
"args": [
"build",
"--bin=update",
"--package=clowd_squirrel"
"--package=velopack"
],
"filter": {
"name": "update",
@@ -71,7 +71,7 @@
"test",
"--no-run",
"--bin=update",
"--package=clowd_squirrel"
"--package=velopack"
],
"filter": {
"name": "update",

177
src/Rust/Cargo.lock generated
View File

@@ -91,9 +91,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.76"
version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355"
checksum = "ca87830a3e3fb156dc96cfbd31cb620265dd053be734723f22b760d6cc3c3051"
[[package]]
name = "as-slice"
@@ -199,9 +199,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.4.11"
version = "4.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2"
checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d"
dependencies = [
"clap_builder",
"clap_derive",
@@ -209,9 +209,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.4.11"
version = "4.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb"
checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9"
dependencies = [
"anstream",
"anstyle",
@@ -228,7 +228,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -237,50 +237,6 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
[[package]]
name = "clowd_squirrel"
version = "0.0.0-local"
dependencies = [
"anyhow",
"chrono",
"clap",
"codesign-verify",
"derivative",
"enum-flags",
"file-rotate",
"fs_extra",
"glob",
"image",
"lazy_static",
"log",
"memmap2",
"native-dialog",
"native-tls",
"normpath",
"ntest",
"os_info",
"pretty-bytes-rust",
"rand",
"regex",
"remove_dir_all",
"semver",
"sha1_smol",
"simple-stopwatch",
"simplelog",
"strum",
"ureq",
"wait-timeout",
"waitpid-any",
"widestring",
"windows",
"windows-sys 0.52.0",
"winres",
"winsafe",
"xml",
"zip",
"zstd",
]
[[package]]
name = "cocoa"
version = "0.25.0"
@@ -412,9 +368,9 @@ dependencies = [
[[package]]
name = "deranged"
version = "0.3.10"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc"
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
]
@@ -501,9 +457,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
[[package]]
name = "fdeflate"
version = "0.3.1"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868"
checksum = "209098dd6dfc4445aa6111f0e98653ac323eaa4dfd212c9ca3931bf9955c31bd"
dependencies = [
"simd-adler32",
]
@@ -555,7 +511,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -659,16 +615,16 @@ dependencies = [
[[package]]
name = "iana-time-zone"
version = "0.1.58"
version = "0.1.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core 0.51.1",
"windows-core",
]
[[package]]
@@ -801,9 +757,9 @@ dependencies = [
[[package]]
name = "memchr"
version = "2.6.4"
version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
[[package]]
name = "memmap2"
@@ -1037,7 +993,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -1125,9 +1081,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.71"
version = "1.0.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8"
checksum = "a293318316cf6478ec1ad2a21c49390a8d5b5eae9fab736467d93fbc0edc29c5"
dependencies = [
"unicode-ident",
]
@@ -1271,11 +1227,11 @@ dependencies = [
[[package]]
name = "schannel"
version = "0.1.22"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -1324,7 +1280,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -1416,7 +1372,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -1432,9 +1388,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.42"
version = "2.0.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8"
checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53"
dependencies = [
"proc-macro2",
"quote",
@@ -1443,15 +1399,15 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.8.1"
version = "3.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"
dependencies = [
"cfg-if",
"fastrand",
"redox_syscall",
"rustix",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -1465,22 +1421,22 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.51"
version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7"
checksum = "b2cd5904763bad08ad5513ddbb12cf2ae273ca53fa9f68e843e236ec6dfccc09"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.51"
version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df"
checksum = "3dcf4a824cce0aeacd6f38ae6f24234c8e80d68632338ebaa1443b5df9e29e19"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
]
[[package]]
@@ -1630,6 +1586,50 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "velopack"
version = "0.0.0-local"
dependencies = [
"anyhow",
"chrono",
"clap",
"codesign-verify",
"derivative",
"enum-flags",
"file-rotate",
"fs_extra",
"glob",
"image",
"lazy_static",
"log",
"memmap2",
"native-dialog",
"native-tls",
"normpath",
"ntest",
"os_info",
"pretty-bytes-rust",
"rand",
"regex",
"remove_dir_all",
"semver",
"sha1_smol",
"simple-stopwatch",
"simplelog",
"strum",
"ureq",
"wait-timeout",
"waitpid-any",
"widestring",
"windows",
"windows-sys 0.52.0",
"winres",
"winsafe",
"xml",
"zip",
"zstd",
]
[[package]]
name = "version_check"
version = "0.9.4"
@@ -1698,7 +1698,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
"wasm-bindgen-shared",
]
@@ -1720,7 +1720,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.42",
"syn 2.0.43",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -1802,19 +1802,10 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
dependencies = [
"windows-core 0.52.0",
"windows-core",
"windows-targets 0.52.0",
]
[[package]]
name = "windows-core"
version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-core"
version = "0.52.0"
@@ -2024,9 +2015,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
[[package]]
name = "winnow"
version = "0.5.30"
version = "0.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5"
checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c"
dependencies = [
"memchr",
]

View File

@@ -1,5 +1,5 @@
[package]
name = "clowd_squirrel"
name = "velopack"
version = "0.0.0-local"
edition = "2021"

View File

@@ -11,7 +11,7 @@ fn main() {
let version = version.trim();
let ver = semver::Version::parse(&version).expect("Unable to parse ngbv output as semver version");
let ver: u64 = ver.major << 48 | ver.minor << 32 | ver.patch << 16;
let desc = format!("Clowd.Squirrel {}", version);
let desc = format!("Velopack {}", version);
println!("cargo:rustc-env=NGBV_VERSION={}", version);
@@ -20,8 +20,8 @@ fn main() {
.set_manifest_file("app.manifest")
.set_version_info(winres::VersionInfo::PRODUCTVERSION, ver)
.set_version_info(winres::VersionInfo::FILEVERSION, ver)
.set("CompanyName", "Clowd.Squirrel")
.set("ProductName", "Clowd.Squirrel")
.set("CompanyName", "Velopack")
.set("ProductName", "Velopack")
.set("ProductVersion", version)
.set("FileDescription", &desc)
.set("LegalCopyright", "Caelan Sayler (c) 2023")

View File

@@ -21,7 +21,7 @@ pub fn apply<'a>(restart: bool, wait_for_parent: bool, package: Option<&PathBuf>
}
if restart {
shared::start_package(&app, &root_path, exe_args, Some("CLOWD_SQUIRREL_RESTART"))?;
shared::start_package(&app, &root_path, exe_args, Some("VELOPACK_RESTART"))?;
}
Ok(())

View File

@@ -26,7 +26,6 @@ pub fn patch(old_file: &PathBuf, patch_file: &PathBuf, output_file: &PathBuf) ->
#[test]
fn test_patch_apply() {
crate::logging::trace_logger();
let mut path = std::env::current_exe().unwrap();
path.pop();
path.pop();

View File

@@ -27,7 +27,7 @@ use winsafe::{self as w, co};
fn main() -> Result<()> {
let mut arg_config = Command::new("Setup")
.about(format!("Clowd.Squirrel Setup ({}) installs Squirrel applications.\nhttps://github.com/clowd/Clowd.Squirrel", env!("NGBV_VERSION")))
.about(format!("Velopack Setup ({}) installs applications.\nhttps://github.com/velopack/velopack", env!("NGBV_VERSION")))
.arg(arg!(-s --silent "Hides all dialogs and answers 'yes' to all prompts"))
.arg(arg!(-v --verbose "Print debug messages to console"))
.arg(arg!(-l --log <FILE> "Enable file logging and set location").required(false).value_parser(value_parser!(PathBuf)))
@@ -50,7 +50,7 @@ fn main() -> Result<()> {
logging::setup_logging(logfile, true, verbose, nocolor)?;
let _comguard = w::CoInitializeEx(co::COINIT::APARTMENTTHREADED | co::COINIT::DISABLE_OLE1DDE)?;
info!("Starting Clowd.Squirrel Setup ({})", env!("NGBV_VERSION"));
info!("Starting Velopack Setup ({})", env!("NGBV_VERSION"));
info!(" Location: {:?}", std::env::current_exe()?);
info!(" Silent: {}", silent);
info!(" Verbose: {}", verbose);
@@ -121,7 +121,7 @@ fn run(debug_pkg: &Option<&PathBuf>, install_to: &Option<&PathBuf>) -> Result<()
// do we have enough disk space?
let (compressed_size, extracted_size) = pkg.calculate_size();
let required_space = compressed_size + extracted_size + (50 * 1000 * 1000); // archive + squirrel overhead
let required_space = compressed_size + extracted_size + (50 * 1000 * 1000); // archive + velopack overhead
let mut free_space: u64 = 0;
w::GetDiskFreeSpaceEx(Some(&root_path_str), None, None, Some(&mut free_space))?;
if free_space < required_space {
@@ -255,7 +255,7 @@ fn install_app(pkg: &bundle::BundleInfo, root_path: &PathBuf, tx: &std::sync::mp
if !dialogs::get_silent() {
info!("Starting app...");
shared::start_package(&app, &root_path, None, Some("CLOWD_SQUIRREL_FIRSTRUN"))?;
shared::start_package(&app, &root_path, None, Some("VELOPACK_FIRSTRUN"))?;
}
Ok(())

View File

@@ -338,7 +338,7 @@ impl Manifest {
#[cfg(target_os = "macos")]
impl Manifest {
pub fn get_packages_path(&self, _root_path: &PathBuf) -> String {
let tmp = format!("/tmp/clowd.squirrel/{}/packages", self.id);
let tmp = format!("/tmp/velopack/{}/packages", self.id);
let p = Path::new(&tmp);
if !p.exists() {
fs::create_dir_all(p).unwrap();
@@ -517,16 +517,16 @@ fn parse_package_file_name<T: AsRef<str>>(name: T) -> Option<EntryNameInfo> {
#[test]
fn test_parse_package_file_name() {
// test no rid
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, None);
assert_eq!(entry.os_min_ver, None);
assert_eq!(entry.os_arch, None);
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-delta.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-delta.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, true);
assert_eq!(entry.os, None);
@@ -542,40 +542,40 @@ fn test_parse_package_file_name() {
assert_eq!(entry.os_arch, None);
// test with rid individual components
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-osx-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-osx-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, Some("osx".to_string()));
assert_eq!(entry.os_min_ver, None);
assert_eq!(entry.os_arch, None);
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-win-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-win-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, Some("win".to_string()));
assert_eq!(entry.os_min_ver, None);
assert_eq!(entry.os_arch, None);
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-x86-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-x86-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, None);
assert_eq!(entry.os_min_ver, None);
assert_eq!(entry.os_arch, Some("x86".to_string()));
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-x64-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-x64-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, None);
assert_eq!(entry.os_min_ver, None);
assert_eq!(entry.os_arch, Some("x64".to_string()));
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-arm64-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-arm64-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, None);
@@ -583,16 +583,16 @@ fn test_parse_package_file_name() {
assert_eq!(entry.os_arch, Some("arm64".to_string()));
// test with full rid
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-win10-x64-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-win10-x64-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, Some("win".to_string()));
assert_eq!(entry.os_min_ver, Some("10".to_string()));
assert_eq!(entry.os_arch, Some("x64".to_string()));
let entry = parse_package_file_name("Clowd.Squirrel-1.0.0-win10-arm64-full.nupkg").unwrap();
assert_eq!(entry.name, "Clowd.Squirrel");
let entry = parse_package_file_name("Velopack-1.0.0-win10-arm64-full.nupkg").unwrap();
assert_eq!(entry.name, "Velopack");
assert_eq!(entry.version, Version::parse("1.0.0").unwrap());
assert_eq!(entry.is_delta, false);
assert_eq!(entry.os, Some("win".to_string()));

View File

@@ -16,7 +16,7 @@ fn main() -> ExitCode {
let mut log_path = my_path.clone();
log_path.pop();
log_path.push("Clowd.Squirrel.log");
log_path.push("Velopack.log");
let _ = logging::setup_logging(Some(&log_path), false, true, true);

View File

@@ -22,7 +22,7 @@ use std::{env, path::PathBuf};
fn root_command() -> Command {
let cmd = Command::new("Update")
.version(env!("NGBV_VERSION"))
.about(format!("Clowd.Squirrel Updater ({}) manages packages and installs updates for Squirrel applications.\nhttps://github.com/clowd/Clowd.Squirrel", env!("NGBV_VERSION")))
.about(format!("Velopack Updater ({}) manages packages and installs updates.\nhttps://github.com/velopack/velopack", env!("NGBV_VERSION")))
.subcommand(Command::new("apply")
.about("Applies a staged / prepared update, installing prerequisite runtimes if necessary")
.arg(arg!(-r --restart "Restart the application after the update"))
@@ -85,7 +85,7 @@ fn main() -> Result<()> {
let default_log_file = {
let mut my_dir = env::current_exe().unwrap();
my_dir.pop();
my_dir.join("Clowd.Squirrel.log")
my_dir.join("Velopack.log")
};
let verbose = matches.get_flag("verbose");
@@ -96,7 +96,7 @@ fn main() -> Result<()> {
dialogs::set_silent(silent);
logging::setup_logging(Some(&log_file), true, verbose, nocolor)?;
info!("Starting Clowd.Squirrel Updater ({})", env!("NGBV_VERSION"));
info!("Starting Velopack Updater ({})", env!("NGBV_VERSION"));
info!(" Location: {}", env::current_exe()?.to_string_lossy());
info!(" Verbose: {}", verbose);
info!(" Silent: {}", silent);

View File

@@ -152,7 +152,7 @@ impl SplashWindow {
class_icon: gui::Icon::Idi(co::IDI::APPLICATION),
class_cursor: gui::Cursor::Idc(co::IDC::APPSTARTING),
class_style: co::CS::HREDRAW | co::CS::VREDRAW,
class_name: "SquirrelSetupSplashWindow".to_owned(),
class_name: "VelopackSetupSplashWindow".to_owned(),
title: app_name,
size: (w.into(), h.into()),
ex_style: co::WS_EX::NoValue,

View File

@@ -35,7 +35,7 @@ pub fn run_hook(app: &shared::bundle::Manifest, root_path: &PathBuf, hook_name:
}
pub fn create_global_mutex(app: &shared::bundle::Manifest) -> Result<Foundation::HANDLE> {
let mutex_name = format!("clowdsquirrel-{}", &app.id);
let mutex_name = format!("velopack-{}", &app.id);
info!("Attempting to open global system mutex: '{}'", &mutex_name);
let encoded = mutex_name.encode_utf16().chain([0u16]).collect::<Vec<u16>>();
let pw = PCWSTR(encoded.as_ptr());

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Squirrel\Squirrel.csproj" />
<ProjectReference Include="..\Velopack\Velopack.csproj" />
</ItemGroup>
<ItemGroup>

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Squirrel.Packaging\Squirrel.Packaging.csproj" />
<ProjectReference Include="..\Velopack.Packaging\Velopack.Packaging.csproj" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More