Skip to content

Commit

Permalink
Update README and VSCode launch configs
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsinghshubham777 committed Aug 15, 2024
1 parent 759d4e9 commit 0021ecd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 13 deletions.
29 changes: 18 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
// Both variants use `debug` mode because the Windows app does not work on
// `release` mode because of some issue with the `media_kit` library
"configurations": [
{
"name": "playtogether",
"request": "launch",
"type": "dart"
},
{
"name": "playtogether (profile mode)",
"args": [
"--dart-define",
"FLAVOR=development"
],
"flutterMode": "debug",
"name": "(dev) PlayTogether",
"program": "lib/main.dart",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "playtogether (release mode)",
"args": [
"--dart-define",
"FLAVOR=production"
],
"flutterMode": "debug",
"name": "(prod) PlayTogether",
"program": "lib/main.dart",
"request": "launch",
"type": "dart",
"flutterMode": "release"
"type": "dart"
},
]
],
}
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,31 @@ This project uses [FVM](https://fvm.app/) to lock onto a specific Flutter versio

## Generate MSIX (Windows)

All builds are supposed to be `debug` builds because the app does NOT run in `profile` or `release` mode due to the following issue:
### For viewers/users

If you are a viewer/user and want to install the provided .msix file on your windows system, please follow this guide to install the certificate to be able to do so:

1. Select Properties from the right-click menu of the MSIX package.
2. Go to the Digital Signature tab.
3. From the Signature List choose the certificate.
4. Click on Details.
5. Click on View Certificate.
6. Click Install Certificate.
7. Choose Local Machine from Store Location.
8. Allow the app to install certificates.
9. Choose Place all certificates in the following store.
10. Click Browse and select Trusted People.
11. Click OK and Click Next then Click Finish
12. Then you should see a popup window with the message "Import was successful"

### For developers

All builds are supposed to be `debug` builds because the app does NOT run in `profile` or `release` mode due to the following issue (possibly because of the `media_kit` library):

`fatal error LNK1120: 7 unresolved externals`
**Ref**: https://github.com/flutter/flutter/issues/32746

Therefore, the only way to differentiate between builds is by its `flavor`, i.e. either `development` or `production`. And since there is not way to set `flavor` via the `msix:create` command, we are defaulting to `production` if no flavor values are passed, and to run the `development` flavor, you will have to pass `--dart-define FLAVOR=development` flag to your `flutter run` command (in VSCode, you can do it by passing "args": ["--dart-define", "FLAVOR=development"] inside your configurations).
Therefore, the only way to differentiate between builds is by its `flavor`, i.e. either `development` or `production`. And since there is not way to set `flavor` via the `msix:create` command, we are defaulting to `production` if no flavor values are passed, and to run the `development` flavor, you will have to pass `--dart-define FLAVOR=development` flag to your `flutter run` command (in VSCode, you can do it by writing "args": ["--dart-define", "FLAVOR=development"] inside your configuration(s)).

1. Generate your own MSIX signing certificate using [MSIX Hero](https://www.microsoft.com/store/productId/9N3LL1W6QCNT?ocid=pdpshare) app on Microsoft Store. Open the app, tap on `Tools`, and under `CERTIFICATES AND SIGNING` category, select `Create self-signed certificate`. Enter your details and it should generate a `.cer` and a `.pfx` files in your user's `Documents\Certificates` folder.

Expand Down

0 comments on commit 0021ecd

Please sign in to comment.