YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
276 stars 68 forks source link

[FEATURE REQUEST] Can support the 'target' param? #218

Closed gzlock closed 1 year ago

gzlock commented 1 year ago

:speech_balloon: Description

I've set up main_dev.dart and main_prod.dart to differentiate between development and production environments.

main_dev.dart

import 'main.dart'
void main(){
  /// set some dev variables.
  runMain();
}

main_prod.dart

import 'main.dart'
void main(){
  /// set some prod variables.
  runMain();
}

main.dart

runMain(){
  WidgetsFlutterBinding.ensureInitialized();
  runApp(...);
}

So I can use flutter build windows --target=./lib/main_prod.dart to build the application production version.

But it not work with dart run msix:create --target=./lib/main_prod.dart

So I hope the dart run msix:create command can set the entry file like the flutter build windows --target=./lib/main_prod.dart.

:question: Platform

Windows 10

YehudaKremer commented 1 year ago

Hello @gzlock

Please try the windows_build_args config (under the "Build configuration (click to expand)").

ttzein6 commented 7 months ago

@gzlock add this to msix_config in pubspec.yaml windows_build_args: --target=lib\main_dev.dart