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
812 stars 114 forks source link

使用 github action 打包 window exe 的时候出错 #94

Closed ksxkq closed 1 year ago

ksxkq commented 1 year ago

下面是执行到 flutter_distributor package --platform windows --targets exe 时候的日志

$ flutter clean
Deleting build...                                                1,4[8](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:9)6ms
Deleting .dart_tool...                                              11ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                               31ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         0ms
Packaging fluter_pc 1.0.0+1 as exe:
$ flutter build windows --dart-define FLUTTER_BUILD_NAME=1.0.0 --dart-define FLUTTER_BUILD_NUMBER=1
Running "flutter pub get" in flutter_sticker...                 
Warning: You are using these overridden dependencies:
! json_serializable 6.3.2
! xml 6.1.0
Running "flutter pub get" in flutter_sticker...                  2,741ms

 Building with sound null safety 

Building Windows application...                                 
Successfully built Directory: 'build/windows/runner/Release' in 151s
$ C:\Program Files (x86)\Inno Setup 6\ISCC.exe dist/1.0.0+1/fluter_pc-1.0.0+1-windows-setup_exe.iss
Inno Setup 6 Command-Line Compiler
Copyright (C) 1[9](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:10)97-2022 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2022 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com

Compiler engine version: Inno Setup 6.2.1

Preprocessing
   Reading file: C:\Program Files (x86)\Inno Setup 6\ISPPBuiltins.iss
Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line [10](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:11)
Parsing [Setup] section, line [11](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:12)
Parsing [Setup] section, line [12](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:13)
Parsing [Setup] section, line [13](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:14)
Parsing [Setup] section, line [14](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:15)
Parsing [Setup] section, line [15](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:16)
Parsing [Setup] section, line [16](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:17)
Parsing [Setup] section, line [17](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:18)
Parsing [Setup] section, line [18](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:19)
Parsing [Setup] section, line [19](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:20)
Reading file (WizardImageFile)
Reading file (WizardSmallImageFile)
Preparing Setup program executable
   Updating version info (SETUP.E32)
Determining language code pages
Parsing [Languages] section, line 23
   Reading file: C:\Program Files (x86)\Inno Setup 6\Default.isl
Parsing [Languages] section, line 28
   Reading file: C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl
Error on line 28 in D:\a\flutter_sticker\flutter_sticker\dist\1.0.0+1\fluter_pc-1.0.0+1-windows-setup_exe.iss: Couldn't open include file "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl": The system cannot find the file specified.
Compile aborted.
MakeError
#0      AppPackageMakerExe.make (package:flutter_app_packager/src/makers/exe/app_package_maker_exe.dart:51:7)
<asynchronous suspension>
#1      FlutterAppPackager.package (package:flutter_app_packager/src/flutter_app_packager.dart:31:12)
<asynchronous suspension>
#2      FlutterDistributor.package (package:flutter_distributor/src/flutter_distributor.dart:176:35)
<asynchronous suspension>
#3      CommandPackage.run (file:///C:/hostedtoolcache/windows/flutter/stable-3.3.2-x64/.pub-cache/hosted/pub.dartlang.org/flutter_distributor-0.2.6/bin/command_package.dart:55:5)
<asynchronous suspension>
#4      CommandRunner.runCommand (package:args/command_runner.dart:[20](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:21)9:13)
<asynchronous suspension>
#5      main (file:///C:/hostedtoolcache/windows/flutter/stable-3.3.2-x64/.pub-cache/hosted/pub.dartlang.org/flutter_distributor-0.2.6/bin/main.dart:[38](https://github.com/ksxkq/flutter_sticker/actions/runs/3073887465/jobs/4966301110#step:7:39):3)
<asynchronous suspension>
ksxkq commented 1 year ago

看起来像是我配置里面指定了 zh 的原因,我试试去掉 locales:

lijy91 commented 1 year ago

Inno Setup缺少了中文语言包,需要手动下载到inno setup的安装目录。 后续将做优化

ksxkq commented 1 year ago

Inno Setup缺少了中文语言包,需要手动下载到inno setup的安装目录。 后续将做优化

嗯,去掉 zh 后,打包成功,明天试试把 打包 + 上传 的流程跑通