-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[bug] failed to cross compile icons/icon.ico
into a Windows Resource tauri-build 2.0.0-alpha.4
#6746
Comments
I can confirm this error.
|
The same issue can be reproduced with the upcoming |
After some investigation, I guess this issue is related to this code Honestly, I have the gut feeling that this won't work on Linux as it is referring directly Investigating further, the closest Linux app that I found is some
|
I suppose because it uses the same tauri-winres = "0.1" |
Since you're using msvc on unix i'd imagine you read this pr description? #5788 If so, did you also scroll down to this comment #5788 (comment) which says you'll also need to do |
Yes I did found out that the project moved from I'm looking into it. |
The fork was made to support cross compilation (with the msvc toolchain) in the first place, upstream winres only support gnu on non-windows hosts. |
@FabianLars I did not read that PR description, I will. But it still feels like a regression. |
Maybe @karandit has an easy to share reproducible setup ? Mine is a bit hard to minimized (it involves a complex nix environment config, done by a coworker, and I'm not sure I would be able to clean it down...) |
Hmm, i don't think so, prior to 1.3 the resource compiler wasn't invoked at all if you used the msvc toolchain on unix so your exe was actually a bit broken but at least the compilation didn't fail. |
btw i'll write a (experimental) guide for unix to windows (meaning linux & macos, nothing nix/nixos specific) shortly after the 1.3 release when the initial support for it on tauri's side is actually published. We'll keep communicating that this isn't really officially supported so that people keep using native hosts (including ci) to compile their apps for now. |
heyyy, good news, it's working @FabianLars I've read the mentioned PR, but I skipped that specific comment. Based on that:
This is some other error fixed already. |
Ok, so I might only need to update my nix environment. I'm going to look into it. But I know that we are using a clang toolchain not a gcc one, so I might need some more tweaking. |
That's a bit weird, |
I do too, and the upcoming guide will ask users to do that too. That's exactly why we forked winres, to support clang etc and not just gcc :) |
With the clang toolchain we should probably use Maybe we could take some inspiration on the compiler resolution done in embed-resource:
|
Something I do find weird in
I feel like it should always chose between |
i wasn't aware of llvm-rc when i forked winres (try googling for that lol), but now that i see the extra steps they do with But for sure something we should look into for a follow-up release. v1.3 is locked already and since you can use mingw's resource compiler just fine from what i've seen so far it should be fine for this release at least. We could also think about swapping winres for embed-resource altogether for v2 -> Honestly would really like that, i'm not really a fan of having to maintain a winres fork.
Oh yeah you shouldn't look at the fork if you wanna keep your sanity lol. I just went with "It's ugly but it works and is easy". I really just bolted the absolute minimum on top of it for tauri's use-case to make the nsis-on-linux poc work. |
OK, I'm going to try to do a PR to migrate to |
This would not be my decision, so let's ping @lucasfernog before we risk wasting your time. |
APIs wise |
Yeah, i'm aware of that. I was thinking we could handle it similar to the WiX templates where Tauri provides a default but users can provide a modified template. idk, might need a bit more thinking and well, we don't have to switch to embed-resource if we can't think of a good api or it would end up in more work than just polishing up the winres fork a bit (which i probably have to do for 1.X anyway...). |
I would love to skip yet another fork (and if embed-resource works better, that's awesome). If it fixes our problems I don't see a reason for not taking it (and it seems well maintained, that's weird 😂 ) |
This is fixed in 2.0.0-alpha.5 (se tauri-apps/winres#8 (comment)) |
Describe the bug
Basic example fails to cross compile for windows msvc with
tauri = "2.0.0-alpha.8"
andtauri-build = "2.0.0-aplha.4"
It does work with
tauri = "1.2"
andtauri-build = "1.2"
In the error
/project/target/release/build/app-a62c9b0b39a2abda/build-script-build
would be expected to be/project/target/x86_64-pc-windows-msvc/release/build/app-a62c9b0b39a2abda/build-script-build
.Looks like if the target is not correctly propagated somewhere.
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: