Using user culture for microsoft links

This commit is contained in:
Kevin B
2024-03-02 13:40:03 -08:00
committed by GitHub
parent 138e16973e
commit ccfc34008e
12 changed files with 24 additions and 24 deletions

View File

@@ -4,8 +4,8 @@
Velopack is made up of some Rust binaries which are re-distributed with installed apps, a .NET NuGet package, and a .NET command line tool. In order to test the project, you need to build the Rust binaries before compiling dotnet.
### Prerequisites
- [.NET 6 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Rust / Cargo](https://www.rust-lang.org/tools/install)
- `dotnet tool install -g dotnet-coverage`
- `dotnet tool install -g nbgv`

View File

@@ -77,7 +77,7 @@ You can publish without the self-contained flag if using Velopack to install suc
configuration to `Release` mode, `-o` to set the output directory to `publish`, `-r` to set the runtime
to `win-x64` for distributing on 64-bit Windows, and `--self-contained` to publish the .NET runtime with the
application. Adapt this command to your needs. You can learn more about
`dotnet publish` in the [Microsoft Documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish).
`dotnet publish` in the [Microsoft Documentation](https://learn.microsoft.com/dotnet/core/tools/dotnet-publish).
```yml
- name: Publish Application

View File

@@ -19,4 +19,4 @@ On MacOS, the RID (min version and arch) is just stored as metadata in the `.pkg
#### Also read
- [Windows 10 version history](https://en.wikipedia.org/wiki/Windows_10_version_history)
- [Windows 11 version history](https://en.wikipedia.org/wiki/Windows_11_version_history)
- [.NET RID Catalog](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog)
- [.NET RID Catalog](https://learn.microsoft.com/dotnet/core/rid-catalog)

View File

@@ -2,7 +2,7 @@
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
For more details visit https://learn.microsoft.com/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="AvaloniaCrossPlat.Desktop"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">

View File

@@ -457,7 +457,7 @@ fn version() -> (Version, Option<String>) {
}
}
// According to https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
// According to https://learn.microsoft.com/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
// there is a variant for AMD64 CPUs, but it's not defined in generated bindings.
const PROCESSOR_ARCHITECTURE_ARM64: u16 = 12;
@@ -520,7 +520,7 @@ fn bitness() -> Bitness {
}
// Calls the Win32 API function RtlGetVersion to get the OS version information:
// https://msdn.microsoft.com/en-us/library/mt723418(v=vs.85).aspx
// https://msdn.microsoft.com/library/mt723418(v=vs.85).aspx
fn version_info() -> Option<OSVERSIONINFOEX> {
let rtl_get_version = match get_proc_address(b"ntdll\0", b"RtlGetVersion\0") {
None => return None,
@@ -621,7 +621,7 @@ fn to_wide(value: &str) -> Vec<u16> {
}
// Examines data in the OSVERSIONINFOEX structure to determine the Windows edition:
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx
// https://msdn.microsoft.com/library/windows/desktop/ms724833(v=vs.85).aspx
fn edition(version_info: &OSVERSIONINFOEX) -> Option<String> {
match (
version_info.dwMajorVersion,

View File

@@ -17,7 +17,7 @@ const WEBVIEW2_EVERGREEN: &str = "https://go.microsoft.com/fwlink/p/?LinkId=2124
lazy_static! {
static ref HM_NET_FX: HashMap<String, FullFrameworkInfo> = {
let mut net_fx: HashMap<String, FullFrameworkInfo> = HashMap::new();
// https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#detect-net-framework-45-and-later-versions
// https://learn.microsoft.com/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#detect-net-framework-45-and-later-versions
net_fx.insert("net45".to_owned(), FullFrameworkInfo::new(".NET Framework 4.5", "http://go.microsoft.com/fwlink/?LinkId=397707", 378389));
net_fx.insert("net451".to_owned(), FullFrameworkInfo::new(".NET Framework 4.5.1", "http://go.microsoft.com/fwlink/?LinkId=397707", 378675));
net_fx.insert("net452".to_owned(), FullFrameworkInfo::new(".NET Framework 4.5.2", "http://go.microsoft.com/fwlink/?LinkId=397707", 379893));
@@ -41,8 +41,8 @@ lazy_static! {
vcredist.insert("vcredist120-x86".to_owned(), VCRedistInfo::new("Visual C++ 2013 Redist (x86)", "12.00.40664", RuntimeArch::X86, "https://aka.ms/highdpimfc2013x86enu"));
vcredist.insert("vcredist120-x64".to_owned(), VCRedistInfo::new("Visual C++ 2013 Redist (x64)", "12.00.40664", RuntimeArch::X64, "https://aka.ms/highdpimfc2013x64enu"));
// from 2015-2022, the binaries are all compatible, so we can always just install the latest version
// https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022
// https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170
// https://docs.microsoft.com/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022
// https://docs.microsoft.com/cpp/porting/binary-compat-2015-2017?view=msvc-170
vcredist.insert("vcredist140-x86".to_owned(), VCRedistInfo::new("Visual C++ 2015 Redist (x86)", "14.00.23506", RuntimeArch::X86, REDIST_2015_2022_X86));
vcredist.insert("vcredist140-x64".to_owned(), VCRedistInfo::new("Visual C++ 2015 Redist (x64)", "14.00.23506", RuntimeArch::X64, REDIST_2015_2022_X64));
vcredist.insert("vcredist141-x86".to_owned(), VCRedistInfo::new("Visual C++ 2017 Redist (x86)", "14.15.26706", RuntimeArch::X86, REDIST_2015_2022_X86));
@@ -364,7 +364,7 @@ fn get_dotnet_base_path(runtime_arch: RuntimeArch, runtime_type: DotnetRuntimeTy
#[cfg(not(target_arch = "x86"))]
let pf64 = w::SHGetKnownFolderPath(&co::KNOWNFOLDERID::ProgramFilesX64, co::KF::DONT_UNEXPAND, None)?;
// set by WOW64 for x86 processes. https://learn.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details
// set by WOW64 for x86 processes. https://learn.microsoft.com/windows/win32/winprog64/wow64-implementation-details
#[cfg(target_arch = "x86")]
let pf64 = std::env::var("ProgramW6432")?;

View File

@@ -85,7 +85,7 @@ fn _create_lnk(output: &str, target: &str, work_dir: &str, app_model_id: Option<
link.SetWorkingDirectory(&HSTRING::from(work_dir))?;
// Set app user model ID property
// Docs: https://docs.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-id
// Docs: https://docs.microsoft.com/windows/win32/properties/props-system-appusermodel-id
if let Some(app_model_id) = app_model_id {
let store: IPropertyStore = link.cast()?;
let id: Param<PCWSTR> = HSTRING::from(app_model_id).into_param();

View File

@@ -100,7 +100,7 @@ namespace Microsoft.NET.HostModel.AppHost
ushort* subsystem = ((ushort*)(bytes + peHeaderOffset + SubsystemOffset));
// https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format#windows-subsystem
// https://docs.microsoft.com/windows/desktop/Debug/pe-format#windows-subsystem
// The subsystem of the prebuilt apphost should be set to CUI
if (subsystem[0] != WindowsCUISubsystem)
{

View File

@@ -19,7 +19,7 @@ public class OsxBuildTools
{
if (String.IsNullOrEmpty(entitlements)) {
Log.Info("No entitlements specified, using default: " +
"https://docs.microsoft.com/en-us/dotnet/core/install/macos-notarization-issues");
"https://docs.microsoft.com/dotnet/core/install/macos-notarization-issues");
entitlements = HelperFile.VelopackEntitlements;
}

View File

@@ -21,7 +21,7 @@ namespace Velopack.Compression
/// Returns TRUE on success or FALSE otherwise.
/// </returns>
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#applydeltaaw
/// http://msdn.microsoft.com/library/bb417345.aspx#applydeltaaw
/// </remarks>
[DllImport("msdelta.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
@@ -49,7 +49,7 @@ namespace Velopack.Compression
/// Returns TRUE on success or FALSE otherwise.
/// </returns>
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#createdeltaaw
/// http://msdn.microsoft.com/library/bb417345.aspx#createdeltaaw
/// </remarks>
[DllImport("msdelta.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
@@ -76,7 +76,7 @@ namespace Velopack.Compression
}
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#deltaflagtypeflags
/// http://msdn.microsoft.com/library/bb417345.aspx#deltaflagtypeflags
/// </remarks>
private enum ApplyFlags : long
{
@@ -88,7 +88,7 @@ namespace Velopack.Compression
}
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#filetypesets
/// http://msdn.microsoft.com/library/bb417345.aspx#filetypesets
/// </remarks>
[Flags]
private enum FileTypeSet : long
@@ -100,7 +100,7 @@ namespace Velopack.Compression
}
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#deltaflagtypeflags
/// http://msdn.microsoft.com/library/bb417345.aspx#deltaflagtypeflags
/// </remarks>
private enum CreateFlags : long
{
@@ -112,7 +112,7 @@ namespace Velopack.Compression
}
/// <remarks>
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#deltainputstructure
/// http://msdn.microsoft.com/library/bb417345.aspx#deltainputstructure
/// </remarks>
[StructLayout(LayoutKind.Sequential)]
private struct DeltaInput

View File

@@ -233,7 +233,7 @@ namespace Velopack
return;
}
// https://docs.microsoft.com/en-gb/windows/win32/winprog64/wow64-implementation-details?redirectedfrom=MSDN
// https://docs.microsoft.com/windows/win32/winprog64/wow64-implementation-details?redirectedfrom=MSDN
var pf64compat =
Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432") ??
Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");

View File

@@ -548,8 +548,8 @@ namespace Velopack.Windows
public override Task<string> GetDownloadUrl()
{
// from 2015-2022, the binaries are all compatible, so we can always just install the latest version
// https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022
// https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170
// https://docs.microsoft.com/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022
// https://docs.microsoft.com/cpp/porting/binary-compat-2015-2017?view=msvc-170
return Task.FromResult(CpuArchitecture switch {
RuntimeCpu.x86 => "https://aka.ms/vs/17/release/vc_redist.x86.exe",
RuntimeCpu.x64 => "https://aka.ms/vs/17/release/vc_redist.x64.exe",