Closed milindgoel15 closed 9 months ago
One more minor thing, I was going to add a print statement for when the user is really using a custom file location but I removed it before committing to git as I wasn't sure you would like it.
I was adding it to provide some feedback to the user that the msix is using a custom location. So you can choose to add it yourself or leave it as it is.
Please check if you need any changes.
@YehudaKremer May I ask to check this pull request, please?
Hello
The idea is nice and the PR code is good 👍
But adding complexity and responsibility of load different configuration files other then the common one (pubspec.yaml) are out of this package scope.
As an alternative, you can override specific configuration for different environment by using "Command-line argument", for example, my config in my pubspec.yaml
is:
msix_config:
display_name: Flutter App
msix_version: 1.0.0.0
certificate_path: C:\path\to\myTESTCertificate.pfx
certificate_password: 1234
windows_build_args: --dart-define="DATABASE=development"
So in development environment i will run just dart run msix:create
,
but in production environment i will run:
dart run msix:create --certificate-path "C:\path\to\myPRODertificate.pfx" --windows-build-args --dart-define="DATABASE=production"
.
This alternative may be less convenient, but I think it covers all use cases.
This alternative may be less convenient, but I think it covers all use cases.
It's too much hassle for such a little problem when the solution already fixes that. Plus we are not loading any multiple configuration files. It's just 2 files with the aim of reducing the time spent in producing the end msix files.
But it's okay since it's your package and you can choose to not include this pr.
msix_config.yaml
as a separate file and pass it as an option when creating a msix installer.Closes https://github.com/YehudaKremer/msix/issues/220