Coder Social home page Coder Social logo

yehudakremer / msix Goto Github PK

View Code? Open in Web Editor NEW
273.0 4.0 64.0 15.46 MB

Create Msix installer for flutter windows-build files.

Home Page: https://pub.dev/packages/msix

License: MIT License

Dart 100.00%
flutter msix dart flutter-packge appinstaller microsoft-store

msix's Introduction

MSIX

Flutter Favorite Badge

pub package MSIX toolkit package issues-closed issues-open Codemagic build status

MSIX is a Windows app packaging format from Microsoft that combines the best features of MSI, .appx, App-V, and ClickOnce to provide a modern and reliable packaging experience.

This package offers a command line tool for creating MSIX installers from your Flutter app, making it easy to publish your app to the Microsoft Store or host it on a website.

πŸ“‹ Installation

In your pubspec.yaml, add the msix package as a new dev dependency with the following command:

PS c:\src\flutter_project> flutter pub add --dev msix

πŸ“¦ Creating an MSIX installer

To create a MSIX installer, run the following command:

PS c:\src\flutter_project> dart run msix:create

βš™οΈ Configuring your installer

You will almost certainly want to customize various settings in the MSIX installer, such as the application title, the default icon, and which Windows capabilities your application needs. You can customize the generated MSIX installer by adding declarations to an msix_config: node in your pubspec.yaml file:

msix_config:
  display_name: Flutter App
  publisher_display_name: Company Name
  identity_name: company.suite.flutterapp
  msix_version: 1.0.0.0
  logo_path: C:\path\to\logo.png
  capabilities: internetClient, location, microphone, webcam

See Configurations Examples And Use Cases.

Available Configurations

MSIX configuration (click to expand)
YAML name Command-line argument Description (from Microsoft Package manifest schema reference) Example
display_name --display-name -d A friendly app name that can be displayed to users. Flutter App
publisher_display_name --publisher-display-name -u A friendly name for the publisher that can be displayed to users. Company Name
identity_name --identity-name -i Defines the unique identifier for the app. company.suite.flutterapp
msix_version --version The version number of the package, in a.b.c.d format. see how the msix version is determined. 1.0.0.0
logo_path --logo-path -l Path to an image file for use as the app icon (size recommended at least 400x400px). C:\images\logo.png
trim_logo --trim-logo <true/false> If false, don't trim the logo image, default is true. true
capabilities --capabilities -e List of the capabilities the app requires. internetClient,location,microphone,webcam
languages --languages Declares the language resources contained in the package. en-us, ja-jp
file_extension --file-extension -f File extensions that the app may be registered to open. .picture, .image
protocol_activation --protocol-activation Protocols activation that will activate the app. http,https
app_uri_handler_hosts --app-uri-handler-hosts Enable apps for websites using app URI handlers app. test.com, test2.info
execution_alias --execution-alias Execution alias command (cmd) that will activate the app. myapp
enable_at_startup --enable-at-startup App start at startup or user log-in. true
store --store Generate a MSIX file for publishing to the Microsoft Store. false
os_min_version --os-min-version Set minimum OS version, default is 10.0.17763.0 10.0.17763.0
Toast Notifications configuration
Startup Task configuration pass the app values (args) on startup or user log-in
Context Menu configuration Use your context menu dll with your app
Build configuration (click to expand)
YAML name Command-line argument Description Example
debug --debug or --release Create MSIX from the debug or release build files (\build\windows\runner\<Debug/Release>), release is the default. true
output_path --output-path -o The directory where the output MSIX file should be stored. C:\src\some\folder
output_name --output-name -n The filename that should be given to the created MSIX file. flutterApp_dev
architecture --architecture -h Describes the architecture of the code in the package, x64 or arm64, x64 is default. x64
build_windows --build-windows <true/false> If false, don't run the build command flutter build windows, default is true. true
windows_build_args --windows-build-args Any arguments for the flutter build windows command. --obfuscate --split-debug-info=C:\Users\me\folder
Sign configuration (click to expand)
YAML name Command-line argument Description Example
certificate_path --certificate-path -c Path to the certificate content to place in the store. C:\certs\signcert.pfx or C:\certs\signcert.crt
certificate_password --certificate-password -p Password for the certificate. 1234
publisher --publisher -b The Subject value in the certificate.
Required only if publish to the store, or if the Publisher will not found automatically by this package.
CN=BF212345-5644-46DF-8668-014043C1B138 or CN=Contoso Software, O=Contoso Corporation, C=US
signtool_options --signtool-options Options to be provided to the signtool for app signing (see below.) /v /fd SHA256 /f C:/Users/me/Desktop/my.cer
sign_msix --sign-msix <true/false> If false, don't sign the msix file, default is true.
Note: when false, publisher is Required.
true
install_certificate --install-certificate <true/false> If false, don't try to install the certificate, default is true. true

βœ’οΈ Signing options

Published MSIX installers should be signed with a certificate, to help ensure that app installs and updates come from trustworthy sources.

  • For development purposes, this package is configured by default to automatically sign your app with a self signed test certificate, which makes it easy to test your install prior to release.
  • If you publish your app to the Microsoft Store, the installation package will be signed automatically by the store.
  • If you need to use your own signing certificate, for example to release the app outside of the Microsoft Store, you can use the configuration fields certificate_path and certificate_password to configure a certificate of your choice.

You can also provide custom options to the signing tool with the --signtool-options command, as shown above. For more information on available options, see the signtool documentation. Note that using this option overrides the certificate_path and certificate_password fields.

Note: By default, the MSIX package will install the certificate on your machine. You can disable this by using the --install-certificate false option, or the YAML option install_certificate: false.

microsoft store icon Publishing to the Microsoft Store

To generate an MSIX file for publishing to the Microsoft Store, use the --store flag, or alternatively add store: true to the YAML configuration.

Note: For apps published to the Microsoft Store, the configuration values publisher_display_name, identity_name, msix_version and publisher must all be configured and should match the registered publisher and app name from the Microsoft Store dashboard, as per this screenshot.

🌐 Publishing outside the store

You can use the App Installer file to enable your users to install and update the app from local file share.

Note: installing from the web ms-appinstaller: is disabled for now.

To create a App Installer file, first set the publish_folder_path configuration, then run the following command:

PS c:\src\flutter_project> dart run msix:publish
Available configurations for App Installer (click to expand)
App Installer configuration example:
msix_config:
  display_name: Flutter App
  app_installer: #<-- app installer configuration
    publish_folder_path: c:\path\to\myPublishFolder
    hours_between_update_checks: 0
    automatic_background_task: true
    update_blocks_activation: true
    show_prompt: true
    force_update_from_any_version: false
  msix_version: 1.0.3.0
YAML name Command-line argument Description (from Microsoft schema reference) Example
publish_folder_path --publish-folder-path A path to publish folder, where the msix versions and the .appinstaller file will be saved. c:\path\to\myPublishFolder
hours_between_update_checks --hours-between-update-checks Defines the minimal time gap between update checks, when the user open the app. default is 0 (will check for update every time the app opened) 2
automatic_background_task --automatic-background-task Checks for updates in the background every 8 hours independently of whether the user launched the app. false
update_blocks_activation --update-blocks-activation Defines the experience when an app update is checked for. false
show_prompt --show-prompt Defines if a window is displayed when updates are being installed, and when updates are being checked for. false
force_update_from_any_version --force-update-from-any-version Allows the app to update from version x to version x++ or to downgrade from version x to version x--. false

⚠️ Unsupported Features

We added the most common features of Msix in this package, however, if you need to add or edit a feature that is not supported yet, you can do this manually.

First, create the unpackaged msix files with the following command

PS c:\src\flutter_project> dart run msix:build

Then edit the files that were created in the build folder.

After that create a msix installer file from those files with the following command

PS c:\src\flutter_project> dart run msix:pack

Tags: msi windows win10 win11 windows10 windows11 windows store windows installer windows packaging appx AppxManifest SignTool MakeAppx

msix's People

Contributors

alexmercerind avatar azchohfi avatar baw-appie avatar berkekbgz avatar blanchardglen avatar caiohamamura avatar chirag729 avatar dmk-rib avatar domesticmouse avatar enfyy avatar escamoteur avatar hayashikun avatar hevelmc avatar lijy91 avatar mmattes avatar rexios80 avatar skyeskie avatar sylfwood avatar theshivamlko avatar tienisto avatar vearnold avatar wangziling avatar yehudakremer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

msix's Issues

[BUG] Certificate Details can't be read

ℹ️ Info

Version: 2.5.2

πŸ’¬ Description

When creating the msix the certificate details cannot be read:
C:\Users\Administrator\IdeaProjects\flutter\nextloud_password_client>flutter build windows
Building with sound null safety
Building Windows application...
C:\Users\Administrator\IdeaProjects\flutter\nextloud_password_client>flutter pub run msix:create
β˜‘ parsing cli arguments
β˜‘ validating config values
β˜‘ cleaning temporary files
β˜‘ copying assets folder
β˜‘ creating app icons folder
β˜‘ copying app icons
β˜‘ copying VC libraries
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 50% getting certificate publisher..
Fail to read the certificate details, please check if the certificate is valid and the password is correct

πŸ“œ Pubspec.yaml

name: nextcloud_password_client
description: A desktop client to manage your passwords within the Nextcloud password app.

publish_to: 'none'
CoreFoundationKeys.html
version: 0.1.0+1

environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.17.0
http: ^0.13.3
path_provider: ^2.0.2
provider: ^6.0.0
libsodium: ^0.2.0
flutter_sodium: ^0.2.0
multi_split_view: ^1.7.1
flutter_secure_storage: ^5.0.0-beta.5
hive: ^2.0.4
hive_flutter: ^1.1.0
flutter_simple_treeview: ^3.0.0-nullsafety.1
pluto_grid: ^2.5.0
url_launcher: ^6.0.12
msix: ^2.5.2

dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.0.3
hive_generator: ^1.1.1
lints: ^1.0.1
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
generate: true

error while singning msix installer

ℹ️ Info

MSIX latest

found this error, error while signing msix installer


[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 90% signing..                                     
The following certificate was selected:
    Issued to: tonyhart
    Issued by: tonyhart
    Expires:   Tue Oct 04 19:04:06 2022
    SHA1 hash: A4420D259C6054AEA0F84EB79BC3DDDE58A56FD6

Done Adding Additional Store

Number of files successfully Signed: 0
Number of warnings: 0
Number of errors: 1


SignTool Error: The specified timestamp server either could not be reached 
or
returned an invalid response.
SignTool Error: An error occurred while attempting to sign: C:\Development\flutter projects\bus_ticket\admin\dekstop\bus_system_admin/build/windows/runner/Release\bus_system_admin.msix

msix_config:
display_name: Arsyad Bus Ticket Admin
publisher_display_name: tonyhart.dev
identity_name: arsyad.admin.ticketapp
msix_version: 1.0.0.0
certificate_path: C:\Users\Tony Hart\Pictures\bus ticket arsyad\cert key\CERTIFICATE.pfx
certificate_password: 12345
publisher: CN=arsyad, O=arsyad, L=glenmore, S=java, C=ID
logo_path: C:\Users\Tony Hart\Pictures\bus ticket arsyad\logo arsyad.png
start_menu_icon_path: C:\Users\Tony Hart\Pictures\bus ticket arsyad\logo arsyad.png
tile_icon_path: C:\Users\Tony Hart\Pictures\bus ticket arsyad\logo arsyad.png
icons_background_color: "#ffffff"
architecture: x64
capabilities: 'internetClient'

[BUG] msix:create doesn't handle package_names

ℹ️ Info

  msix:
    dependency: "direct dev"
    description:
      name: msix
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.0.8"

πŸ’¬ Description

Attempting to run flutter pub run msix:create on a package that has _ characters in the package name errors out.

PS C:\src\flutter-projects\foo_project> flutter pub run msix:create
getting config values..    done!
validate config values..    
No certificate was specified, useing test certificate
done!
create icons folder..    done!
copy icons..    done!
create manifest file..    done!
copy VCLibs files..    done!
packing....    
Microsoft (R) MakeAppx Tool
Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\foo_project.msix"
The content directory (/d) parameter is: "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release"
Enumerating files from directory "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release"
Packing 16 file(s) in "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release" (content directory) to "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\foo_project.msix" (output file name).
Using "\\?\C:\src\flutter-projects\foo_project\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not 
valid.
MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Applications" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Application" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Id
'foo_project' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.
The attribute 'Id' with value 'foo_project' failed to parse.
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

πŸ“œ Pubspec.yaml

name: foo_project
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: ^2.11.0-260.0.dev
  flutter: ^1.24.0-6.0.pre

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.0.8
  pedantic: ^1.9.2

flutter:
  uses-material-design: true

msix_config:
  display_name: FooApp
  publisher_name: FooInc
  identity_name: MyCompany.MySuite.FooApp
  msix_version: 1.0.0.0
  # certificate_path: C:/<PathToCertificate>/<MyCertificate.pfx>
  # certificate_password: 1234 (require if using .pfx certificate)
  certificate_subject: CN=MyName
  # logo_path: C:\<PathToIcon>\<Logo.png>
  # start_menu_icon_path: C:\<PathToIcon>\<Icon.png>
  # tile_icon_path: C:\<PathToIcon>\<Icon.png>
  # icons_background_color: ffffff
  architecture: x64

[BUG] Signing fails with error

ℹ️ Info

Version: 0.1.8

πŸ’¬ Description

The signing fails with:

getting config values..  [√]
validate config values..  [√]
create icons folder..  [√]
copy icons..  [√]
create manifest file..  [√]
copy VCLibs files..  [√]
packing..  [√]
singing..  Error information: "Error: Store::ImportCertObject() failed." (-2146893808/0x80090010)

SignTool Error: An unexpected internal error has occurred.

πŸ“œ Pubspec.yaml

msix_config:
  display_name: Famedly
  publisher_display_name: Famedly
  identity_name: com.famedly.chat
  msix_version: 0.28.1.0  
  publisher: CN=Famedly GmbH
  certificate_path: ./code-signing-famedly.pfx
  certificate_password: placeholder
  capabilities: 'internetClient,location,microphone,webcam,chat,picturesLibrary,videosLibrary,documentsLibrary'

[BUG] MSIX installer with Flutter 2.8.0

MSIX Latest 2.6.3 - 2.6.5

.dart_tool/flutter_build/generated_main.dart(38,14): error G9EFD8EEC: Member not found: 'Msix.registerWith'. [C:\Development\flutter projects\arsyad bis\bus-ticket-system\build\windows\flutter\flutter_assemble.vcxproj]
.dart_tool/flutter_build/generated_main.dart:1
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Development\flutter projects\arsyad bis\bus-ticket-system\build\windows\CMakeFiles\c65f6c3baf04baf5631eb4f9a9094ee1\flutter_windows.dll.rule;C:\Development\flutter projects\arsyad bis\bus-ticket-system\build\windows\CMakeFiles\52f3e30c4dfc32b6fb110b1cc00a56d0\flutter_assemble.rule' exited with code 1. [C:\Development\flutter projects\arsyad bis\bus-ticket-system\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.

I cant sign or install on release or debug mode on flutter latest version

Flutter 2.8.0

0x80080204 - The specified package format is not valid: The package manifest is not valid.

PS C:\Users\anand\Desktop\GitHub> flutter pub run msix:create
β˜‘ parsing cli arguments
β˜‘ validating config values
β˜‘ cleaning temporary files
β˜‘ creating app icons folder
β˜‘ copying app icons
β˜‘ copying VC libraries
β˜‘ generate appx manifest
β˜‘ generate PRI file
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 72% packing..
Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft.  All rights reserved.

Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release\billing_app.msix"
The content directory (/d) parameter is: "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release"
Enumerating files from directory "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release"
Packing 59 file(s) in "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release" (content directory) to "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release\billing_app.msix" (output file name).
Memory limit defaulting to 4241799168 bytes.
Using "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package. 
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not 
valid: The package manifest is not valid.
MakeAppx : error: Error info: Unspecified error
Cleaning up output file "\\?\C:\Users\anand\Desktop\GitHub\build\windows\runner\Release\billing_app.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

[BUG] Installation failed

ℹ️ Info

Version: e.g. v0.7.5
v latest

πŸ’¬ Description

Enter a description of your problem here
Hello, thank you very much for such a useful package. I have not been in contact with special windows development and learning, so I followed this document step by step, but after using the self-signed certificate provided by you to package, and the certificate has been imported into the system, clicking on the packaged installation package still cannot be installed. It prompts:

This app package is not signed with a trusted certificate. Contact your system administrator or the app developer to obtain a new certificate or app package with trusted certificates. The root certificate and all immediate certificates of the signature in the app package must be trusted ( 0x800B010A).

If it is a certificate issued by myself, it can’t even be packaged, and there is an inaccurate error report. My yaml format is not wrong, but it prompts an error for the yaml format.

πŸ“œ Pubspec.yaml

msix_config:
  certificate_path: ./assets/test_certificate.pfx
  certificate_password: 1234
  publisher: CN=Msix Testing, O=Msix Testing Corporation, C=US

We ask that you include your pubspec.yaml file as a common problem we have seen has been the pubspec.yaml file being incorrect

[HELP] Understand certifcation steps

I am planing to release my flutter app to the windows store and I understand that I need to certify my app first, when I try to google about this topic I see a lot of misleading information about certification and Also I want to make publishing to windows store part of CI/CD with github actions.
please if possible guide me to the right tutorial or anything that can help me understand what I need to do to have all I need from this file of yours

#msix_config:
  #display_name: MyApp
  #publisher_display_name: MyName
  #identity_name: MyCompany.MySuite.MyApp
  #certificate_path: C:/<PathToCertificate>/<MyCertificate.pfx>
  #certificate_password: 1234 (require if using .pfx certificate)
  #publisher: CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE

[BUG] Signature should use timestamp flag

ℹ️ Info

Version: v0.1.12

πŸ’¬ Description

Currently the sign function used doesnt add a timestamp. This especially is problematic when the certificate used for a specific sign process gets used after the cert was invalid. As it currently cant know when it was signed the binary/msix would show up as not validly signed anymore. However with a timestamp it can verify it is still valid.

Solution

The Code in question is https://github.com/YehudaKremer/msix/blob/main/lib/msix.dart#L169-L178

Adding /tr http://timestamp.digicert.com to that command is enough to solve this bug. If you want I will open a PR :)

[FEATURE REQUEST] Support application shortcut

πŸ’¬ Description

Is it possible to create a application shortcut on Windows desktop?
This would be easier to find an application than in the Windows start bar.

❓ Platform

Windows

[BUG] The following restricted capabilities require approval before you can use them in your app: runFullTrust.

ℹ️ Info

v2.1.0

πŸ’¬ Description

My program need no special permissions.

So I set capabilities: to '', and build:

flutter build windows
flutter pub run msix:create --store

And upload msix file to https://partner.microsoft.com to verify the msix file.

The result shows warnings:

The following restricted capabilities require approval before you can use them in your app: runFullTrust.

And Microsoft requied me to explain why I need this Restricted capabilities.

So how can I remove this warning? Thank you!

πŸ“œ Pubspec.yaml

name: xxx
description: xxx

version: 1.0.4+1776

environment:
  sdk: '>=2.12.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  cupertino_icons: ^1.0.2
  soundpool: ^2.0.0-nullsafety.0
  path_provider: ^2.0.1
  package_info_plus: ^1.0.1
  uuid: ^3.0.4
  url_launcher: ^6.0.3
  intl: 0.17.0
  animated_text_kit: ^4.1.1
  flutter_colorpicker: ^0.4.0
  catcher: ^0.6.6
  stack_trace: ^1.10.0
  device_info_plus_platform_interface: ^1.0.1
  devicelocale: ^0.4.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^2.1.0

flutter:
  generate: true
  uses-material-design: true

flutter_intl:
  enabled: true

msix_config:
  display_name: xxx
  publisher_display_name: xxx
  identity_name: xxx
  msix_version: 1.0.0.0
  publisher: CN=xxx
  capabilities: ''
  store: true

[BUG] Icons-background-color always set to blue no matter what I set

ℹ️ Info

Version: v2.6.6

πŸ’¬ Description

As stated in the title itself, the icon_background_color is always shown blue (or whatever accent color is) in final built package, no matter what I write in config.

πŸ“œ Pubspec.yaml

msix_config:
  display_name: BlackHole
  publisher_display_name: Ankit Sangwan
  identity_name: com.shadow.blackhole
  icons_background_color: transparent
  logo_path: assets/ic_launcher.png
  msix_version: 1.0.0.0
  # file_extension: .mp3, .m4a

Sometimes VC libraries are not copied

_vCLibsFiles.forEach((file) async => await File(file.path)

Hi, it's first time to raise an issue on here.
I realized sometimes vcruntime140.dll and vcruntime140_1.dll is missing when I build MSIX package.
It looks like it starts "packing.." before it finishes copyVCLibsFiles()
I guess it's from the delay in async-foreach process.
ref: https://stackoverflow.com/questions/42467663/async-await-in-list-foreach
Could you check the parts, please?

Crash while running the pub

Hi,
I'm trying to run the package with default application but i'm getting following error

Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release\github_desktop.msix"
The content directory (/d) parameter is: "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release"
Enumerating files from directory "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release"
Packing 16 file(s) in "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release" (content directory) to "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release\github_desktop.msix" (output file name).
Memory limit defaulting to 12818999296 bytes.
Using "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Name
'com.flutter.github_desktop' violates pattern constraint of '[-.A-Za-z0-9]+'.
The attribute 'Name' with value 'com.flutter.github_desktop' failed to parse.
Cleaning up output file "\\?\C:\Users\Humble\Projects\github_desktop\build\windows\runner\Release\github_desktop.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

Publisher Name Error on Microsoft Store verification

I'm trying to upload the .msix package to the Windows store, but verification fails with the following error messages:

  • Invalid package family name: PadmitS.A.P.I.deC.V.WardHome_pjyac4g0caf2w (expecting: PadmitS.A.P.I.deC.V.WardHome_1hxjgg9m0hxqm)
  • Invalid package publisher name: CN=Msix Testing, O=Msix Testing Corporation, C=US (expecting: CN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)

What's strange is that I've defined the publisher with the correct value in pubspec.yaml:

msix_config:
  display_name: Ward Home
  publisher_display_name: Padmit, S.A.P.I. de C.V.
  identity_name: PadmitS.A.P.I.deC.V.WardHome
  msix_version: 1.0.0.0
  publisher: CN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  logo_path: C:\Users\Padmit\Documents\Ward\admin\home_logo.png
  start_menu_icon_path: C:\Users\Padmit\Documents\Ward\admin\home_logo.png
  tile_icon_path: C:\Users\Padmit\Documents\Ward\admin\home_logo.png
  icons_background_color: transparent
  languages: es
  architecture: x64
  capabilities: 'internetClient,privateNetworkClientServer'

Any ideas as to what I might be doing wrong?

I'm building the app with the following commands:

flutter build windows
flutter pub run msix:create

Thanks

[BUG] Signing fails with error - NEW

Creating the certificates as described in

https://sahajrana.medium.com/how-to-generate-a-pfx-certificate-for-flutter-windows-msix-lib-a860cdcebb8

I get a certificate with this parameters

Certificate bag
Bag Attributes
localKeyID: XXX
subject=C = DE, ST = Berlin, L = Berlin, O = COMPANY
issuer=C = DE, ST = Berlin, L = Berlin, O = COMPANY
-----BEGIN CERTIFICATE-----

and the following error and it seems "ST" is not valid...

how can I solve this problem?

...

'C=DE, ST=Berlin, L=Berlin, O=COMPANY' verstâßt gegen pattern-EinschrÀnkung von  '(CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")(, ((CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Descr
iption|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")))*'.
Analyse des Attributs 'Publisher' mit dem Wert 'C=DE, ST=Berlin, L=Berlin, O=COMPANY' fehlgeschlagen.
Cleaning up output file ...
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not va
lid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

internetClient capability not working

ℹ️ Info

Version: 2.3.0

πŸ’¬ Description

I am using Dio package for network connection. The problem is it is working while I am debugging and the release version is working on my windows laptop(not sure why) however it hasn't worked on my colleague's and friend's. it is saying no connection.

When I removed the capability and created .msix, the internet is still working for some reason. Here is the capability I used:

msix_config:
display_name: My App
publisher_display_name: MyCompany
identity_name: MyCompany.Desktop.MyApp
msix_version: 1.0.0.0
publisher: CN=MyCompany, O=MyCompany, L=London, S=London, C=GB
logo_path: C:\personal_icon.png
start_menu_icon_path: C:\personal_icon.png
tile_icon_path: C:\personal_icon.png
icons_background_color: transparent
architecture: x64
capabilities: 'internetClient,bluetooth,radios'

Include dll used in fyi

Hello. I was wondering if there was a way to include dll files that need to import for FFI.
I can't figure out how to include it in the build. I tried adding it to the pubspec.yaml

but that did not work?

Support whole icon asset folder as generated by Visual Studio

πŸ’¬ Description

Currently msix only supports providing 3 images which get copied into the msix package:

  • logo_path
  • start_menu_icon_path
  • tile_icon_path

In order to best show icons in Windows 10 multiple versions of these icons need to be copied into the msix package.
Especially there need to be plated and unplated versions and sizes for different screens.

When creating all image assets with Visual Studio's Manifest Designer many different versions of the icons are created:
assets

The corresponding references in Package.appxmanifest look like this:

   <Logo>Assets\StoreLogo.png</Logo>
      <uap:VisualElements
        DisplayName="App1"
        Square150x150Logo="Assets\Square150x150Logo.png"
        Square44x44Logo="Assets\Square44x44Logo.png"
        Description="App1"
        BackgroundColor="transparent">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="App1" Square71x71Logo="Assets\SmallTile.png" Square310x310Logo="Assets\LargeTile.png"/>
        <uap:SplashScreen Image="Assets\SplashScreen.png" />
      </uap:VisualElements>

As you can see the icons in the Assets folder do not have the exact file names as provided in the manifest file. They are still found in they correct size and for the correct occasion. This also fixes the problem that icons are shown plated in the taskbar where you want to see them as unplated (without empty space around them) version.

So, it would be great, if this package would get an option to provide a complete Asset folder as created by Visual Studio which get's then copied into the msix package. The VisualElements section of Package.appxmanifest would then have to look similar like the above.

Flutter dekstop release blank screen

ℹ️ Info

MSIX latest

ok I successfully install msix installer on other machine but its just show black screen
I know this is happen when a missing depedency But idk what dll missing is

can someone elaborate about this ?

[BUG] msix:create error: MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

ℹ️ Info

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.1.14

πŸ’¬ Description

Commands used:
flutter clean && flutter pub get

flutter build windows

flutter pub run msix:create

Full Output:

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter clean && flutter pub get
Deleting build...                                                  213ms
Deleting .dart_tool...                                             157ms
Deleting .packages...                                                5ms
Deleting Generated.xcconfig...                                       1ms
Deleting flutter_export_environment.sh...                            1ms
Deleting ephemeral...                                               20ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         1ms
Running "flutter pub get" in bmi_calculator_flutter...             841ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter build windows
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Building Windows application...                                         

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter pub run msix:create
getting config values..  [√]
validate config values..  [√]  
cleaning temporary files..  [√]
create icons folder..  [√]     
copy icons..  [√]
create manifest file..  [√]    
copy VCLibs files..  [√]
packing..  Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft.  All rights reserved.

Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix"
The content directory (/d) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Enumerating files from directory "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Packing 18 file(s) in "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release" (content directory) to "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix" (output file name).
Memory limit defaulting to 17154476032 bytes.
Using "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Name
'com.flutter.bmi_calculator' viola a restrição pattern de '[-.A-Za-z0-9]+'.
Falha da anΓ‘lise do atributo 'Name' com valor 'com.flutter.bmi_calculator'.
Cleaning up output file "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.


E:\Desenvolvimento Flutter\bmi_calculator_flutter>

πŸ“œ Pubspec.yaml

name: bmi_calculator
description: A new Flutter application.

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  font_awesome_flutter: ^8.11.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.1.14

flutter:
  uses-material-design: true
# msix_config:
# display_name: BMI Calculator
# publisher_display_name: Carlos Carvalho
# identity_name: MyCompany.MySuite.MyApp
# msix_version: 1.0.0.0
# certificate_path: C:\<PathToCertificate>\<MyCertificate.pfx>
# certificate_password: 1234 (require if using .pfx certificate)
# publisher: CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE
# logo_path: C:\<PathToIcon>\<Logo.png>
# start_menu_icon_path: C:\<PathToIcon>\<Icon.png>
# tile_icon_path: C:\<PathToIcon>\<Icon.png>
# vs_generated_images_folder_path: C:\<PathToFolder>\Images
# icons_background_color: transparent (or some color like: '#ffffff')
# architecture: x64
# capabilities: 'internetClient,location,microphone,webcam'

Error: "Failed to create icon" on flutter pub run msix:create command

I tried to build my sample application as windows installable file with this package but when I ran the final command flutter pub run msix:create then an error occurred.

I am using msix: ^0.1.12

Here are full error details or output from the terminal

C:\Users\Abhishek Kumar\Development\AndroidStudioProjects\TestProjects\my_test_project>flutter build windows

Building with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Building Windows application...

C:\Users\Abhishek Kumar\Development\AndroidStudioProjects\TestProjects\my_test_project>flutter pub run msix:create
getting config values..  [√]
validate config values..  [√]
cleaning temporary files..  [√]
create icons folder..  [√]
copy icons..  Unhandled exception:
fail to create icon C:/Users/Abhishek%20Kumar/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/msix-0.1.12/lib/assets/icons/icon.png: FileSystemException: Cannot copy file to 'C:\Users\Abhishek Kuma
r\Development\AndroidStudioProjects\TestProjects\my_test_project/build/windows/runner/Release/icons/icon.png', path = 'C:/Users/Abhishek%20Kumar/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/msi
x-0.1.12/lib/assets/icons/icon.png' (OS Error: The system cannot find the file specified.
, errno = 2)
#0      MsixFiles._copyIcon (package:msix/src/msixFiles.dart:271:7)
<asynchronous suspension>
#1      MsixFiles.copyIcons (package:msix/src/msixFiles.dart:38:33)
<asynchronous suspension>
#2      Msix.createMsix (package:msix/msix.dart:25:5)
<asynchronous suspension>
pub finished with exit code 255

C:\Users\Abhishek Kumar\Development\AndroidStudioProjects\TestProjects\my_test_project>

[BUG] Error in sign

ℹ️ Info

Version: e.g. v2.1.3

πŸ’¬ Description

Error in run flutter pub run msix:create, return:

β˜‘ parsing cli arguments
β˜‘ validating config values
β˜‘ cleaning temporary files
β˜‘ creating app icons folder
β˜‘ copying app icons
β˜‘ copying VC libraries
β˜‘ generate appx manifest
β˜‘ generate PRI file
β˜‘ packing
β˜‘ cleaning temporary files
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 90% signing..


SignTool Error: No certificates were found that met all the given criteria.

πŸ“œ Pubspec.yaml

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^2.1.3


msix_config:
  display_name: Desktop Example
  publisher_display_name: Erick
  identity_name: MyCompany.MySuite.MyApp
  msix_version: 1.0.0.0
  certificate_path: teste.pfx
  certificate_password: my_password
  publisher: CN=my_info, OU=my_info, OU=my_info, OU=my_info, OU=my_info, OU=my_info, L=my_info, S=my_info, C=my_info

Error: SignerSign() failed." (-2147024885/0x8007000b)

v2.1.3

Description:

[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 90% signing..
The following certificate was selected:
    Issued to: www.priyansu.in
    Issued by: www.priyansu.in
    Expires:   Sat Jan 09 23:16:06 2049
    SHA1 hash: B106D3E8F020B4B167FA3AAEC17F4298DEBEC332

Done Adding Additional Store
Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b)


SignTool Error: An unexpected internal error has occurred.

Pubspec.yaml:

msix_config:
  display_name: Headliners
  publisher_display_name: Priyansu Choudhury
  identity_name: www.priyansu.in
  msix_version: 1.0.0.0
  publisher: C = IN, S = Odisha, L = Jeypore, O = Priyansu Choudhury, OU = Personal, CN = www.priyansu.in
  certificate_path: C:\Users\priya\Desktop\CERTIFICATE.pfx
  certificate_password: somepassword
  icons_background_color: transparent
  architecture: x64
  capabilities: 'internetClient'
  store: false

My Certificate Subject:
subject=C = IN, ST = Odisha, L = Jeypore, O = Priyansu Choudhury, OU = Personal, CN = www.priyansu.in, emailAddress = [email protected]

Bluetooth Capability

πŸ’¬ Description

I need Bluetooth capability for capabilities

❓ Platform

Windows

[BUG] Bad state no element

ℹ️ Info

Version: 2.6.1

πŸ’¬ Description

Since upgrade from 2.5..4 to 2.6.1 i got the following error : Bad state no element :

[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 0% parsing cli arguments..
[10:34:49]: β–Έ β˜‘ parsing cli arguments
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 7% validating config values..
[10:34:49]: β–Έ β˜‘ validating config values
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 14% cleaning temporary files..
[10:34:49]: β–Έ β˜‘ cleaning temporary files
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 21% copying assets folder..
[10:34:49]: β–Έ β˜‘ copying assets folder
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 28% creating app icons folder..
[10:34:49]: β–Έ β˜‘ creating app icons folder
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 35% copying app icons..
[10:34:49]: β–Έ β˜‘ copying app icons
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 42% copying VC libraries..
[10:34:49]: β–Έ β˜‘ copying VC libraries
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 50% getting certificate publisher..
[10:34:49]: β–Έ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 50% getting certificate publisher..                                     Certificate Details: ==
============== Certificat 0 ================
[10:34:49]: β–Έ ================ Commencement de l’imbrication au niveau 1 ================
[10:34:49]: β–Έ Γ‰lΓ©ment 0Β :
[10:34:49]: β–Έ NumΓ©ro de sΓ©rieΒ : 05beb48eCENSORED_FOR_GITHUB2f7
[10:34:49]: β–Έ Γ‰metteur: O=CENSORED_FOR_GITHUB, S=France, C=FR
[10:34:49]: β–Έ NotBeforeΒ : 20/10/2021 10:14
[10:34:49]: β–Έ NotAfterΒ : 07/03/2049 10:14
[10:34:49]: β–Έ Objet: O=CENSORED_FOR_GITHUB, S=France, C=FR
[10:34:49]: β–Έ La signature correspond Γ  la clΓ© publique
[10:34:49]: β–Έ Certificat racine : le sujet correspond Γ  l’émetteur
[10:34:49]: β–Έ Hach. cert. (sha1)Β : 275f5CENSORED_FOR_GITHUB0cbf24f
[10:34:49]: β–Έ ----------------  Fin de l’imbrication au niveau 1  ----------------
[10:34:49]: β–Έ Fournisseur = Microsoft Enhanced Cryptographic Provider v1.0
[10:34:49]: ▸ Succès du test de chiffrement
[10:34:49]: β–Έ CertUtil: -dump La commande s’est terminΓ©e correctement.
[10:34:49]: β–Έ
[10:34:49]: β–Έ Bad state: No element
[10:34:49]: β–Έ This error happen when this package tried to read the certificate details,
[10:34:49]: β–Έ please report it by pasting all this output (after deleting sensitive info) to:
[10:34:49]: β–Έ https://github.com/YehudaKremer/msix/issues
[10:34:49]: β–Έ #0      ListMixin.lastWhere (dart:collection/list.dart:180:5)
[10:34:49]: β–Έ #1      Signtool.getCertificatePublisher (package:msix/src/cli/signtool.dart:34:12)
[10:34:49]: β–Έ #2      Signtool.getCertificatePublisher (package:msix/src/cli/signtool.dart:44:22)
[10:34:49]: β–Έ #3      Msix.createMsix (package:msix/msix.dart:29:16)
[10:34:49]: β–Έ <asynchronous suspension>

πŸ“œ Pubspec.yaml

  msix: 2.6.1


msix_config:
  display_name: "My flutter app"
  publisher_display_name: CONSORED_FOR_GITHUB
  identity_name:  CONSORED_FOR_GITHUB.WindowsApp
  logo_path: assets/images/icon.png
  vs_generated_images_folder_path: assets/images
  # Permissions are here : location,microphone,webcam'
  capabilities: 'internetClient'

In addition i run the following command :

flutter pub run msix:create -o ENV['APP_FILE_PATH'] -n ENV['APP_NAME'] -c ENV['MSIX_CERTIFICATE_PATH'] -p ENV['MSIX_CERTIFICATE_PASSWORD'] -b ENV['MSIX_CERTIFICATE_PUBLISHER'] -v 1.0.0.0

[BUG] This app package is not signed with a trusted certificate.

ℹ️ Info

Version: v0.1.15

πŸ’¬ Description

Misx Installer gives this message

This app package is not signed with a trusted certificate. Contact your system administrator or the app developer to obtain a new certificate or app package with trusted certificates. The root certificate and all immediate certificates of the signature in the app package must be trusted (0x800B010A)

and hence cant install the app on windows with msix.

msix_config:
  display_name: myCompany
  publisher_display_name: myCompany Pvt Ltd
  identity_name: com.myCompany
  msix_version: 1.0.0.0
  certificate_path: certificates\certificate.pfx
  certificate_password: pass...
  publisher: E=s..gmail.com, CN=myCompany, OU=myCompany, O=myCompany Pvt Ltd, L=Delhi, S=DL, C=IN
  logo_path: windows\runner\resources\app_logo.png
  start_menu_icon_path: windows\runner\resources\app_logo.png
  tile_icon_path: windows\runner\resources\app_logo.png
  vs_generated_images_folder_path: images
  icons_background_color: transparent
  architecture: x64
  capabilities: 'internetClient'

[FEATURE REQUEST] 'Run as Admin' Problem

Got report when submitting to Windows Store,

Unfortunately, the product does not work when ran without elevated permissions

There are two options related to this problem when using Inno Setup to build the package, but don't know how to config with MSIX:

[Setup]
PrivilegesRequired=lowest
DefaultDirName={userpf}\{#MyAppName}

userpf will install app to {localappdata}

Any tips?

[FEATURE REQUEST] Output binary name

πŸ’¬ Description

We would a little flag to rename the outputs.

Ex :

$> flutter pub run msix:create --outputName a_flower
$> ls build/windows/runner/Release
a_flower.msix 
a_flower.exe
...

❓ Platform

all

Thank you for your work :) !

This will help us to create several binaries for each one of our flavors (dev, preprod, prod, client, final, etc)

Version 2.0 Additional Features

Hello,
i am writing here a list of features for version 2,
you welcome to add ideas and participate in improving this plugin πŸ›©οΈ.

Version 2.0 Additional Features Planning:

  • allow all configuration in the yaml file also as command line arguments (do it with one List<String> of fields names) - πŸ‘8cdaef6
  • expose all the options for the Signtool cli as msix configuration (Sign Tool documentation) - πŸ‘faeb0f8
  • expose all the options for the MakeAppx cli as msix configuration (MakeAppx documentation) - 🚫 no significant cli additions
  • ui: progress bar status when runing - πŸ‘4e74a8c
  • shorten the long documentation - πŸ‘b7cd530
  • Handle Protocol Activation and Redirection #37 (comment) - πŸ‘341f30b

[BUG] Untrusted app when after installing the application

Hi @YehudaKremer first of all thanks for the fantastic library I have imported

msix: ^2.5.0 version

and i can also take the build but when am trying to installing it on other system am getting the following error:

This app package is not signed with a trusted certificate. Contact your system administrator or the app developer to obtain a new certificate or app package with trusted certificates. The root certificate and all immediate certificates of the signature in the app package must be trusted (0x800B010A)
How to fix this ? i just want to share the msix file to other device and install it but couldn't am getting like? can you tell how to resolve this

FYI: I haven't added msix_config: in pubspec.yaml

[DELETED]

Full trust is required for Win32, so this request no longer makes sense.

Error on Microsoft Store verification

ℹ️ Info

Version: e.g. v2.0.0

πŸ’¬ Description

On Microsoft store verification getting below error
"
App manifest resources tests

FAILED
Branding
Error Found: The branding validation test encountered the following errors:
Image file StoreLogo.backup.png is a default image.
Impact if not fixed: Microsoft Store apps are expected to be complete and fully functional. Apps using the default images e.g. from templates or SDK samples present a poor user experience and cannot be easily identified in the store catalog.

"
we are using
vs_generated_images_folder_path

πŸ“œ Pubspec.yaml

msix_config:
  display_name: XXXX APP
  publisher_display_name: XXX XXX
  identity_name: XXXXX.XXX
  msix_version: 6.79.1.0
  certificate_path: C:\Apps\certs\xxx.pfx
  certificate_password: xxxxxxx
  publisher: CN=XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXXX
  vs_generated_images_folder_path: C:\Apps\Assets\icons
  icons_background_color: transparent
  architecture: x64
  capabilities: 'internetClient'

[BUG] Icon name not same in AppXManifest.xml

ℹ️ Info

Version: e.g. v0.1.15

πŸ’¬ Description

Icon name not same in AppXManifest.xml as used in Pubspec.yaml

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" 
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" 
         xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" 
         xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" 
         xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" 
         xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" 
         xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7" 
         xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8" 
         xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" 
         xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" 
         xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" 
         xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" 
         xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" 
         xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" 
         xmlns:rescap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3" 
         xmlns:rescap6="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6" 
         xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" 
         xmlns:com2="http://schemas.microsoft.com/appx/manifest/com/windows10/2" 
         xmlns:com3="http://schemas.microsoft.com/appx/manifest/com/windows10/3">
  <Identity Name="..." Version="1.0.0.0"
            Publisher="..." ProcessorArchitecture="x64" />
  <Properties>
    <DisplayName>...</DisplayName>
    <PublisherDisplayName>...</PublisherDisplayName>
    <Logo>Images\StoreLogo.png</Logo>
    <Description>...</Description>
  </Properties>
  <Resources>
    <Resource Language="en-us" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19042.630" />
  </Dependencies>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <Capability Name="internetClient" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  </Capabilities>
  <Applications>
    <Application Id="..." Executable="....exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements BackgroundColor="transparent"
        DisplayName="..." Square150x150Logo="Images\Square150x150Logo.png"
        Square44x44Logo="Images\Square44x44Logo.png" Description="..." >
        <uap:DefaultTile ShortName="Blup" Square310x310Logo="Images\LargeTile.png"
        Square71x71Logo="Images\SmallTile.png" Wide310x150Logo="Images\Wide310x150Logo.png">
          <uap:ShowNameOnTiles>
            <uap:ShowOn Tile="square150x150Logo"/>
            <uap:ShowOn Tile="square310x310Logo"/>
            <uap:ShowOn Tile="wide310x150Logo"/>
          </uap:ShowNameOnTiles>
        </uap:DefaultTile>
        <uap:SplashScreen Image="Images\SplashScreen.png"/>
        <uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badge"/>
      </uap:VisualElements>
    </Application>
  </Applications>
</Package>  

πŸ“œ Pubspec.yaml

We ask that you include your pubspec.yaml file as a common problem we have seen has been the pubspec.yaml file being incorrect

msix_config:
  display_name: ...
  publisher_display_name: ...
  identity_name: ...
  msix_version: 1.0.0.0
  certificate_path: certificates\certificate.pfx
  certificate_password: ...
  publisher: ...
  logo_path: windows\runner\resources\app_logo.png
  start_menu_icon_path: windows\runner\resources\app_logo.png
  tile_icon_path: windows\runner\resources\app_logo.png
  vs_generated_images_folder_path: images
  icons_background_color: transparent
  architecture: x64
  capabilities: 'internetClient'

There are 2 things in it.

  1. Manifest shows that icons naming is different from what is passed in pubspec.yaml like,
    <Logo>Images\StoreLogo.png</Logo>
        DisplayName="..." Square150x150Logo="Images\Square150x150Logo.png"
        Square44x44Logo="Images\Square44x44Logo.png" Description="..." >
  1. There is a wried spacing in between Capability XML block.

[FEATURE REQUEST] Allow setting certificate credentials via ENV vars

πŸ’¬ Description

We use this in a CI and the current config only allows to set the password in the pubspec.yaml file.
This leads to leaking our password. Instead we would like to be able to provide the password via an env var.

An added bonus would be to also provide the cert base64 encoded via a variable as that would eliminate the step to write it from the env to a file.

[BUG] Certificate password is empty, check "msix_config: certificate_password" at pubspec.yaml

ℹ️ Info

Version: 0.1.6

πŸ’¬ Description

The bin says Certificate password is empty, check "msix_config: certificate_password" at pubspec.yaml even when certificate_password was set to "placeholder".

πŸ“œ Pubspec.yaml

Important part of the pubspec msix section (at runtime password and cert file get overwritten using python):

msix_config:
  display_name: Famedly
  publisher_display_name: Famedly
  identity_name: com.famedly.chat
  msix_version: 0.28.1.0 
  publisher: CN=Famedly GmbH
  certificate_path: ./code-signing-famedly.pfx
  certificate_password: placeholder
  capabilities: 'internetClient,location,microphone,webcam,chat,picturesLibrary,videosLibrary,documentsLibrary'

[BUG] Error in packing: The attribute 'Id' with value containing spaces failed to parse.

Version: 2.6.4

Running the msix:create command fails to complete building the msix installer with the below error:

'Shortcut Keeper' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.
The attribute 'Id' with value 'Shortcut Keeper' failed to parse.
msix:create full error output:
$ flutter pub run msix:create
β˜‘ parsing cli arguments
β˜‘ validating config values
β˜‘ cleaning temporary files
β˜‘ copying assets folder
β˜‘ creating app icons folder
β˜‘ copying app icons
β˜‘ copying VC libraries
β˜‘ generate appx manifest
β˜‘ generate PRI file
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 75% packing..
Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft.  All rights reserved.

Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release\shortcut_keeper.msix"
The content directory (/d) parameter is: "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release"
Enumerating files from directory "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release"
Packing 1085 file(s) in "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release" (content directory) to "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release\shortcut_keeper.msix" (output file name).
Memory limit defaulting to 16878350336 bytes.
Using "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Applications" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Application" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Id
'Shortcut Keeper' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.
The attribute 'Id' with value 'Shortcut Keeper' failed to parse.
Cleaning up output file "\\?\C:\Users\whipl\Desktop\Flutter Projects\shortcut_keeper\build\windows\runner\Release\shortcut_keeper.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

pub finished with exit code -1

I have previously been successful in using msix to build this specific app with the exact same settings multiple times.

Pubspec.yaml:

msix_config:
  display_name: Shortcut Keeper
  publisher_display_name: Minas Giannekas
  publisher: --omitted--
  identity_name: 8913MinasGiannekas.ShortcutKeeper
  msix_version: 1.4.0.0
  capabilities: "internetClient"
  assets_directory_path: dbassets
  store: true
  icons_background_color: transparent
  logo_path: windows\runner\resources\icon-windows.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.