Skip to content

Commit

Permalink
fix #178
Browse files Browse the repository at this point in the history
  • Loading branch information
YehudaKremer committed Feb 16, 2023
1 parent c2f7739 commit da6efc5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.8.1

- fix [#178](https://github.com/YehudaKremer/msix/issues/178)

## 3.8.0

- update the [Image](https://pub.dev/packages/image) dependency package to version >=4.0.0
Expand Down
10 changes: 9 additions & 1 deletion lib/src/appx_manifest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AppxManifest {
<uap:VisualElements BackgroundColor="transparent"
DisplayName="${_config.displayName.toHtmlEscape()}" Square150x150Logo="Images\\Square150x150Logo.png"
Square44x44Logo="Images\\Square44x44Logo.png" Description="${_config.appDescription.toHtmlEscape()}">
<uap:DefaultTile ShortName="${_config.displayName.toHtmlEscape()}" Square310x310Logo="Images\\LargeTile.png"
<uap:DefaultTile ShortName="${_getTileShortName(_config.displayName.toHtmlEscape())}" Square310x310Logo="Images\\LargeTile.png"
Square71x71Logo="Images\\SmallTile.png" Wide310x150Logo="Images\\Wide310x150Logo.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
Expand Down Expand Up @@ -227,4 +227,12 @@ class AppxManifest {

return capabilitiesString;
}

String? _getTileShortName(String? text) {
if (text != null && text.length > 40) {
return '${text.substring(0, 37)}...';
}

return text;
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: msix
description: A command-line tool that create Msix installer from your flutter windows-build files.
version: 3.8.0
version: 3.8.1
maintainer: Yehuda Kremer ([email protected])
homepage: https://github.com/YehudaKremer/msix

Expand Down

2 comments on commit da6efc5

@shuax
Copy link

@shuax shuax commented on da6efc5 Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the 35th character of my application name is & and escape to &amp;, and _getTileShortName incorrectly truncated the html escape, resulting in a wrong AppxManifest.xml format. Maybe you should use _getTileShortName before using toHtmlEscape.

@YehudaKremer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shuax
Thank you for the bug report,
fix: 5c77aba
and publish new version 3.16.1

Please sign in to comment.