diff --git a/.vscode/launch.json b/.vscode/launch.json index a87f034..b384e0e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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" }, - ] + ], } diff --git a/README.md b/README.md index 24a2b8d..9b3cf1b 100644 --- a/README.md +++ b/README.md @@ -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.