File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
packages/flutter_app_packager/lib/src/makers/exe Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ class MakeExeConfig extends MakeConfig {
24
24
json['locales' ] != null ? List <String >.from (json['locales' ]) : null ;
25
25
if (locales == null || locales.isEmpty) locales = ['en' ];
26
26
27
+ // use absolute path
28
+ String iconfile = '' ;
29
+ if (json['setup_icon_file' ] != null ) {
30
+ String currentDirectory = Directory .current.path;
31
+ iconfile = p.join (currentDirectory, json['setup_icon_file' ]);
32
+ }
33
+
27
34
MakeExeConfig makeExeConfig = MakeExeConfig (
28
35
scriptTemplate: json['script_template' ],
29
36
appId: json['app_id' ] ?? json['appId' ],
@@ -34,7 +41,7 @@ class MakeExeConfig extends MakeConfig {
34
41
createDesktopIcon: json['create_desktop_icon' ],
35
42
launchAtStartup: json['launch_at_startup' ],
36
43
installDirName: json['install_dir_name' ],
37
- setupIconFile: json[ 'setup_icon_file' ] ,
44
+ setupIconFile: iconfile ,
38
45
privilegesRequired: json['privileges_required' ],
39
46
locales: locales,
40
47
);
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ display_name: Hello 世界
20
20
create_desktop_icon : true
21
21
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultdirname
22
22
# install_dir_name: "D:\\HELLO-WORLD"
23
+ # This path is relative to the root directory of your project; The format of icon file must be ico, can not be png or others
24
+ # setup_icon_file: windows\runner\resources\app_icon.ico
23
25
locales :
24
26
- en
25
27
- zh
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ display_name: Hello 世界
20
20
create_desktop_icon : true
21
21
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultdirname
22
22
# install_dir_name: "D:\\HELLO-WORLD"
23
+ # 这里的路径是相对于项目根目录的路径; 图标格式必须是ico格式,不能是png或其它
24
+ # setup_icon_file: windows\runner\resources\app_icon.ico
23
25
locales :
24
26
- en
25
27
- zh
You can’t perform that action at this time.
0 commit comments