Skip to content

Commit

Permalink
update documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
YehudaKremer committed Apr 19, 2021
1 parent f72d04a commit b7cd530
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 53 deletions.
69 changes: 18 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,63 +29,30 @@ The `flutter build windows` is required to build the executable that
`flutter pub run msix:create` bundles up in the MSIX install file.

## :mag: Configuration (Optional)
Add `msix_config:` configuration at the end of your `pubspec.yaml` file:
```yaml
msix_config:
display_name: MyApp
publisher_display_name: MyName
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>\icons
icons_background_color: transparent (or some color like: '#ffffff')
architecture: x64
capabilities: 'internetClient,location,microphone,webcam'
```
Configuration Name | Description (from [microsoft docs](https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appxmanifestschema/schema-root "microsoft docs")) | Example Value And Type | Required
--- | --- | --- | ---
| display_name | A friendly name that can be displayed to users. | MyApp (string) | No |
| publisher_display_name | A friendly name for the publisher that can be displayed to users. | MyName (string) | require if uploading to windows store |
| identity_name | Describes the contents of the package. | com.flutter.MyApp (string) | require if uploading to windows store |
| msix_version | The version number of the package. | 1.0.0.0 (must be four numbers with dots) | require if uploading to windows store |
| certificate_path | `C:/<PathToCertificate>/<MyCertificate.pfx>` | | No |
| certificate_password | the certificate password | 1234 (string) | require if using .pfx certificate |
| publisher | Describes the publisher information. The Publisher attribute must match the publisher subject information of the certificate used to sign a package. | CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE (string) | require if uploading to windows store |
| logo_path | An icon used as the app logo, sample: `C:/<PathToIcon>/<Logo.png>` | | No |
| start_menu_icon_path | An icon used as the app logo in the start-menu, sample: `C:/<PathToIcon>/<Icon.png>` | | No |
| tile_icon_path | An icon used as the app tile logo in the start-menu, sample: `C:/<PathToIcon>/<Icon.png>` | | No |
| vs_generated_images_folder_path | Visual Studio can generate for you optimized icons (logo/tile and more) [see Thomas's explanation](https://github.com/YehudaKremer/msix/issues/19). This is an alternative for `logo_path`, `start_menu_icon_path`, `tile_icon_path`. sample: `C:\<PathToFolder>\icons` | | No |
| icons_background_color | Specifies the background color of the app icons, can be `transparent` or some color like: `'#ffffff'` | transparent (string) | No |
| languages | Declares a language for resources contained in the package. sample: `en-us, ja-jp` | en-us (string) | No |
| architecture | Describes the architecture of the code contained in the package, one of: x86, x64, arm,, neutral | x64 (string) | No |
| capabilities | Declares the access to protected user resources that the package requires. availables capabilities: `internetClient` `internetClientServer` `privateNetworkClientServer` `allJoyn` `codeGeneration` `objects3D` `chat` `voipCall` `voipCall` `phoneCall` `removableStorage` `userAccountInformation` `sharedUserCertificates` `blockedChatMessages` `appointments` `contacts` `musicLibrary` `videosLibrary` `picturesLibrary` `enterpriseAuthentication` `phoneCallHistoryPublic` `spatialPerception` `userNotificationListener` `remoteSystem` `backgroundMediaPlayback` `offlineMapsManagement` `userDataTasks` `graphicsCapture` `globalMediaControl` `gazeInput` `systemManagement` `lowLevelDevices` `documentsLibrary` `accessoryManager` `allowElevation` `location` `microphone` `webcam` `radios` | `internetClient,location,microphone,webcam` (string) | No |
This plugin comes with default configuration (test values),
you can configure it to suit your needs.

## :label: Windows Store
see full list of configuration fields and example on this [Page](https://github.com/YehudaKremer/msix/blob/v2.0/documentation/configuration.md)

#### Signing Options
before using the msix file, we sign it with **certificate**,
this plugin use `signtool` to sign the file with default **test** certificate.
you can use your own certificate, see the documentation on the [configuration](https://github.com/YehudaKremer/msix/blob/v2.0/documentation/configuration.md) fields:
- certificate_path
- certificate_password
- publisher
- signtool_options

## :label: Windows Store
To upload the MSIX file to Windows Store the configuration values `publisher_display_name`, `identity_name`, `msix_version`, `publisher` must be valid.

For more information, please see this tutorial: [How to publish your MSIX package to the Microsoft Store?](https://www.advancedinstaller.com/msix-publish-microsoft-store.html)
For more information, please see this tutorial: [How to publish your MSIX package to the Microsoft Store](https://www.advancedinstaller.com/msix-publish-microsoft-store.html)

## :gear: Command-Line Arguments
You can configuration values with command-line arguments instead of `pubspec.yaml` or combine them,
see full list of arguments and example on this [Page](https://github.com/YehudaKremer/msix/blob/v2.0/documentation/command-line-arguments.md)

If you using Continuous Deployment (CD) you can set the some configurations values via the command-line arguments.

available arguments:
- package version: `--version` (must be in the format: **0.0.0.0**)
- certificate path: `--certificate` or `-c`
- certificate password: `--password` or `-p`
- debug signing problems: `--debug` or `-d`

example:
```bash
flutter pub run msix:create --version 1.0.0.1 --certificate <your certificate path> --password <your certificate password>
```

## :question: [Signing Error](https://github.com/YehudaKremer/msix/blob/v2.0/documentation/troubleshoot-signing-errors.md)
## :question: Signing Error
For signing problems (signtool) try to get help on this [Page](https://github.com/YehudaKremer/msix/blob/v2.0/documentation/troubleshoot-signing-errors.md)
------------
package tags: `msi` `windows` `win10` `windows10` `windows store` `windows installer` `windows packaging` `appx` `AppxManifest` `SignTool` `MakeAppx`
32 changes: 32 additions & 0 deletions documentation/command-line-arguments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## :gear: Command-Line Arguments

You can use this tool with command-line arguments instead of `pubspec.yaml` or combine them.

###### Example:
```bash
flutter pub run msix:create --v 1.0.3.3 --c C:/Users/me/Desktop/test_certificate.pfx --p 1234 --pu "CN=Msix Testing, O=Msix Testing Corporation, C=US"
```

###### Available Arguments Options:
- package version: `--v` (must be in the format: **0.0.0.0**)
- certificate path: `--c`
- certificate password: `-p`
- debug signing problems: `--d`
- display name: `--dn`
- publisher display name: `--pdn`
- identity name: `--in`
- publisher: `--pu`
- logo path: `--lp`
- start_menu icon path: `--smip`
- tile icon path: `--tip`
- vs generated images folder path: `--vsi`
- icons background color: `--ibc`
- signtool options: `--so`
- protocol activation: `--pa`
- file extension: `--fe`
- architecture: `--a`
- capabilities: `--cap`
- languages: `--l`

###### Available Arguments Flags:
- debug: `--d`
42 changes: 42 additions & 0 deletions documentation/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## :mag: Configuration (Optional)
This tool come with default configuration (test values), you can configure it to suit your needs.

###### Example:
Add `msix_config:` configuration at the end of your `pubspec.yaml` file:
```yaml
msix_config:
display_name: MyApp
publisher_display_name: MyName
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>\icons
icons_background_color: transparent (or some color like: '#ffffff')
architecture: x64
capabilities: 'internetClient,location,microphone,webcam'
```

###### Available Configuration Fields:
Configuration Name | Description (from [microsoft docs](https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appxmanifestschema/schema-root "microsoft docs")) | Example Value And Type | Required
--- | --- | --- | ---
| display_name | A friendly name that can be displayed to users. | MyApp (string) | No |
| publisher_display_name | A friendly name for the publisher that can be displayed to users. | MyName (string) | require if uploading to windows store |
| identity_name | Describes the contents of the package. | com.flutter.MyApp (string) | require if uploading to windows store |
| msix_version | The version number of the package. | 1.0.0.0 (must be four numbers with dots) | require if uploading to windows store |
| certificate_path | `C:/<PathToCertificate>/<MyCertificate.pfx>` | | No |
| certificate_password | the certificate password | 1234 (string) | require if using .pfx certificate |
| publisher | Describes the publisher information. The Publisher attribute must match the publisher subject information of the certificate used to sign a package. | CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE (string) | require if uploading to windows store |
| logo_path | An icon used as the app logo, sample: `C:/<PathToIcon>/<Logo.png>` | | No |
| start_menu_icon_path | An icon used as the app logo in the start-menu, sample: `C:/<PathToIcon>/<Icon.png>` | | No |
| tile_icon_path | An icon used as the app tile logo in the start-menu, sample: `C:/<PathToIcon>/<Icon.png>` | | No |
| vs_generated_images_folder_path | Visual Studio can generate for you optimized icons (logo/tile and more) [see Thomas's explanation](https://github.com/YehudaKremer/msix/issues/19). This is an alternative for `logo_path`, `start_menu_icon_path`, `tile_icon_path`. sample: `C:\<PathToFolder>\icons` | | No |
| icons_background_color | Specifies the background color of the app icons, can be `transparent` or some color like: `'#ffffff'` | transparent (string) | No |
| languages | Declares a language for resources contained in the package. sample: `en-us, ja-jp` | en-us (string) | No |
| architecture | Describes the architecture of the code contained in the package, one of: x86, x64, arm,, neutral | x64 (string) | No |
| signtool_options | signtool using this syntax: [command] [options] [file_name], you can provide here the `[options]` part, see full documentation here: https://docs.microsoft.com/en-us/dotnet/framework/tools/signtool-exe **this option is overwriting the fields: `certificate_path`, `certificate_password`** | /v /fd SHA256 /f C:/Users/me/Desktop/my.cer (string) | No |
| capabilities | Declares the access to protected user resources that the package requires. availables capabilities: `internetClient` `internetClientServer` `privateNetworkClientServer` `allJoyn` `codeGeneration` `objects3D` `chat` `voipCall` `voipCall` `phoneCall` `removableStorage` `userAccountInformation` `sharedUserCertificates` `blockedChatMessages` `appointments` `contacts` `musicLibrary` `videosLibrary` `picturesLibrary` `enterpriseAuthentication` `phoneCallHistoryPublic` `spatialPerception` `userNotificationListener` `remoteSystem` `backgroundMediaPlayback` `offlineMapsManagement` `userDataTasks` `graphicsCapture` `globalMediaControl` `gazeInput` `systemManagement` `lowLevelDevices` `documentsLibrary` `accessoryManager` `allowElevation` `location` `microphone` `webcam` `radios` | `internetClient,location,microphone,webcam` (string) | No |
4 changes: 2 additions & 2 deletions documentation/troubleshoot-signing-errors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## :question: Troubleshoot Signing Errors
If you getting certificate sign error `"Error: Store::ImportCertObject() failed."` or `"Error: SignerSign() failed."`
1. Check the configuration values of `certificate_path`, `certificate_password` and `publisher`
2. Try use Marcel`s solution: [#17](https://github.com/YehudaKremer/msix/issues/17 "#17")
1. check the configuration values of `certificate_path`, `certificate_password` and `publisher`
2. try use Marcel`s solution: [#17](https://github.com/YehudaKremer/msix/issues/17 "#17")

0 comments on commit b7cd530

Please sign in to comment.