mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Set codepage depending on language
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -181,3 +181,4 @@ tests/Test.xml
|
||||
## CPP db crap
|
||||
*.db
|
||||
*.opendb
|
||||
.vs/
|
||||
|
||||
@@ -12,7 +12,9 @@ Squirrel uses information from your app's EXE as well as the NuGet package Metad
|
||||
* **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))
|
||||
* **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.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
@@ -725,6 +726,9 @@ namespace Squirrel.Update
|
||||
var setupExeDir = Path.GetDirectoryName(setupExe);
|
||||
var company = String.Join(",", package.Authors);
|
||||
|
||||
var culture = CultureInfo.GetCultureInfo(package.Language ?? "").TextInfo.ANSICodePage;
|
||||
|
||||
|
||||
var templateText = File.ReadAllText(Path.Combine(pathToWix, "template.wxs"));
|
||||
var templateData = new Dictionary<string, string> {
|
||||
{ "Id", package.Id },
|
||||
@@ -732,6 +736,7 @@ namespace Squirrel.Update
|
||||
{ "Author", company },
|
||||
{ "Version", Regex.Replace(package.Version.ToString(), @"-.*$", "") },
|
||||
{ "Summary", package.Summary ?? package.Description ?? package.Id },
|
||||
{ "Codepage", $"{culture}" }
|
||||
};
|
||||
|
||||
// NB: We need some GUIDs that are based on the package ID, but unique (i.e.
|
||||
|
||||
2
vendor/wix/template.wxs
vendored
2
vendor/wix/template.wxs
vendored
@@ -1,5 +1,5 @@
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
|
||||
<Product Id="*" Name="{{Title}} Machine-Wide Installer" Language="1033" Version="!(bind.FileVersion.{{Id}}.exe)" UpgradeCode="{{IdAsGuid1}}" Manufacturer="{{Author}}">
|
||||
<Product Id="*" Name="{{Title}} Machine-Wide Installer" Language="1033" Codepage="{{Codepage}}" Version="!(bind.FileVersion.{{Id}}.exe)" UpgradeCode="{{IdAsGuid1}}" Manufacturer="{{Author}}">
|
||||
|
||||
<Package Description="#Description" Comments="Comments" InstallerVersion="200" Compressed="yes"/>
|
||||
<Media Id="1" Cabinet="contents.cab" EmbedCab="yes" CompressionLevel="high"/>
|
||||
|
||||
Reference in New Issue
Block a user