Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包windows平台exe格式时,make_config.yaml里面的设置项setup_icon_file如果有值,会报错 #245

Open
jenken827 opened this issue Jan 15, 2025 · 0 comments

Comments

@jenken827
Copy link

make_config.yaml部分配置如下

create_desktop_icon: true

setup_icon_file: windows\runner\resources\app_icon.ico

打包时会报错,错误信息如下

Error on line 15 in C:\...\dist\1.0.0+1\prjname-1.0.0+1-windows-setup_exe.iss: 系统找不到指定的路径。

而对应iss文件是存在的,追踪代码,找到原因如下:
ISCC.exe执行时,生成的配置文件是位于

dist/<version>/<output>.iss

这就导致上面配置的setup_icon_file相对路径出错,无法找到对应的图标文件而报错。

用户使用flutter_distributor前并不清楚其运行机制,文档中也没有说明具体的配置示例,当出现上面的错误时,会让用户很迷惑,不看代码很难设置出正确的相对于生成的iss文件的路径。

建议在文档中添加说明,代码中转换成绝对路径。

上面的问题已修复,后面会提交PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant