cargo-cook
cargo-cook copied to clipboard
Per-target cooking?
Hi,
I just found your cool cargo extension. I want to use it to package distinct distribution files for Windows and Linux.
What is the recommended mechanism to achieve this?
Hi! I was not planning on having providing Windows compatibility because I did not have it installed. However, definitely, such a project, if it has users, should allow working on Windows as well.
Right now I don't have any idea whether it works on Windows or not. If it does not, definitely something should be done to solve this, but simply I can't do it myself as I don't have a Windows PC.
If anyone made a PR bringing Windows support, I would definitely accept it, with pleasure.
P.S. Actually there was an attempt to do this but the contributor did not want to solve a simple problem, and as I can not test it myself but only do a review, I neither closed the PR nor solved the problem myself. So, if you are going to fix problems in this PR and make another one, I will merge it ASAP :)
Sorry, I guess I have misunderstood. Do you want to package via cargo-cook for Windows while running it under Linux?
Yes.
I am building some software which has to run in Windows and Linux and I need to build two separate packages, one which should run in Windows and one which should run in Linux, in the same build.
I have solved the cross-compiling issues; I can manually generate two separate .zip
files. I just want this to be automated.
However, this is no longer urgent as I wrote a custom packager as a simple Rust executable which does exactly this.
Well, I am not sure what the problem exactly you were struggling with. Is it something like making cargo-cook
to build not one pack of archives but more than one perhaps for different purposes (like one for Linux, another for Windows, etc)?
Yes, and those packages will contain a different set of assets (dll for Windows but not for Linux etc).
Perhaps having Cook.[Windows toolchain].toml and Cook.[Linux toolchain].toml would do?
I think it would be better to specify just different packages. I'll definitely think about this. This sounds a nice idea to me.
@norru Hi there! I've just added support for specifying custom recipes. Maybe this can help you:
cargo cook -r CookForLinux.toml
cargo cook -r CookForWindows.toml