leanflutter / flutter_distributor

An all-in-one Flutter application packaging and distribution tool, providing you with a one-stop solution to meet various distribution needs.
https://distributor.leanflutter.dev/
MIT License
763 stars 104 forks source link

type 'Null' is not a subtype of type 'Map<String, dynamic>' #173

Closed iBog closed 3 months ago

iBog commented 3 months ago

flutter_distributor package --platform macos --targets dmg

type 'Null' is not a subtype of type 'Map<String, dynamic>'

0 FlutterDistributor.distributeOptions (package:flutter_distributor/src/flutter_distributor.dart:66:16)

1 FlutterDistributor.package (package:flutter_distributor/src/flutter_distributor.dart:138:35)

2 CommandPackage.run (file:///Users/user/.pub-cache/hosted/pub.dev/flutter_distributor-0.3.7/bin/command_package.dart:132:24)

3 CommandRunner.runCommand (package:args/command_runner.dart:212:27)

4 main (file:///Users/user/.pub-cache/hosted/pub.dev/flutter_distributor-0.3.7/bin/main.dart:47:17)

cybrox commented 3 months ago

What's your distribute_options.yaml?

iBog commented 3 months ago

What's your distribute_options.yaml?

it's exists but empty, i have no plans distribute anything, want to create 'dmg' file only

lijy91 commented 3 months ago

You need to create a job to package dmg, and also need to create make_config.yamlhttps://distributor.leanflutter.dev/makers/dmg/

output: dist/
releases:
  - name: dev
    jobs:
      - name: release-dmg
        package:
          platform: macos
          target: dmg
          build_args:
            dart-define:
              APP_ENV: dev
iBog commented 3 months ago

thanks, anyway it doesn't work on Mac M1, blessing step failed, but it's not your fault

[ 1/22] Looking for target...                [ OK ]
[ 2/22] Reading JSON Specification...        [ OK ]
[ 3/22] Parsing JSON Specification...        [ OK ]
[ 4/22] Validating JSON Specification...     [ OK ]
[ 5/22] Looking for files...                 [ OK ]
[ 6/22] Calculating size of image...         [ OK ]
[ 7/22] Creating temporary image...          [ OK ]
[ 8/22] Mounting temporary image...          [ OK ]
[ 9/22] Making hidden background folder...   [ OK ]
[10/22] Copying background...                [SKIP]
[11/22] Reading background dimensions...     [SKIP]
[12/22] Copying icon...                      [SKIP]
[13/22] Setting icon...                      [SKIP]
[14/22] Creating links...                    [ OK ]
[15/22] Copying files...                     [ OK ]
[16/22] Making all the visuals...            [ OK ]
[17/22] Checking if running under Rosetta... [ OK ]
[18/22] Blessing image...                    [FAIL]
[19/22] Unmounting temporary image...        [ OK ]
[20/22] Removing temporary image...          [ OK ]
[21/22] Removing target image...             [ OK ]

Error: Command failed: bless --folder /Volumes/iChatGPT --openfolder /Volumes/iChatGPT
bless: The 'openfolder' is not supported on Apple Silicon devices.