-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Icon option in Dioxus.toml does not work on Windows #3648
Comments
I believe the issue occurs in the function on line 120 of |
Windows requires the icon to be of type .ico so if you do not have an .ico it will fail since it will default to "icons\icon.ico" by tauri. But even if you do that, the installed app won't have the icon because of the second problem. So we would need to implement winres since wix does not setup this kinds of things for building the exe. Their implementation uses a lot of environmental variables mostly cargo ones and also requires to add stuff to your Cargo.toml so I'm not sure what is the best solution here since implementing it will require quite a lot of changes. |
This line should not matter since it's only set if you specifically set settings for windows and don't set icon_path for it dioxus/packages/cli/src/bundle_utils.rs Line 133 in bdeedc1
If you use the PR that I just did you can test if it still happens. If you want to set a specific icon for windows you will still need .ico file since it's not done automagically yet. The problem was upstream with tauri default implementation. Now it shouldn't matter, but you need tools for winres installed if you want to build the windows app. |
Problem
On Windows, if you try to change the location of your icon image via editing dioxus.toml under [bundle] using the icon variable, your choice is not respected when bundling for Desktop Windows. It will automatically default to
project\\icons/icon.ico\
Additionally, the guide suggests a format like
icon = "assets/favicon.png"
however, on Windows, the tag is only parsed if passed as a sequenceicon = ["assets/favicon.png"]
That particular issue appears to happen on Linux as well in my testing.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The icon should be selected from the path given in the icon tag.
Screenshots
Environment:
Workaround
This can be worked around by creating the file and folder that Dioxus tries to access
icons\icon.ico
.The text was updated successfully, but these errors were encountered: