fix(build): nixos cross-building

This commit is contained in:
MeexReay 2025-06-23 19:21:53 +03:00
parent 8c7ad0dedb
commit f4aa86068f
3 changed files with 23 additions and 4 deletions

View File

@ -31,6 +31,3 @@ gtk = ["dep:gtk4"]
libnotify = ["dep:libnotify", "dep:gdk-pixbuf"]
notify-rust = ["dep:notify-rust"]
winapi = ["dep:winapi", "dep:winresource"]
[workspace.metadata.cross.target.x86_64-pc-windows-gnu]
image = "mglolenstine/gtk4-cross:rust-gtk-4.12"

2
Cross.toml Normal file
View File

@ -0,0 +1,2 @@
[target.x86_64-pc-windows-gnu]
image = "mglolenstine/gtk4-cross:rust-gtk-4.12"

View File

@ -63,3 +63,23 @@ You'll get a desktop file contents, just edit paths here and write it to a new f
All of these, with adding icons and other, makes this command: `make install` (using `gnumake` package) \
But make sure, that you have `.local/bin` in the `PATH` variable, otherwise it won't work. \
Now, if you'll run with the desktop file, GNotifications will work perfectly.
# Cross-compiling
## From Linux to Windows
```bash
./misc/build.sh
```
## From NixOS to Windows
```bash
nix-shell -p rustup gcc cargo-cross
rustup toolchain install stable
./misc/build.sh
```
## From Windows to Linux
That's your problem