refactor(build): i forgot

This commit is contained in:
MeexReay 2025-06-24 13:00:26 +03:00
parent f4aa86068f
commit 887d57e668
4 changed files with 10 additions and 7 deletions

View File

@ -12,7 +12,7 @@ homedir = "0.3.4"
native-tls = "0.2.14"
clap = { version = "4.5.36", features = ["derive"] }
serde = { version = "1.0.219", features = ["serde_derive"] }
gtk4 = { version = "0.9.6", features = [ "v4_12" ], optional = true }
gtk4 = { version = "0.9.6", optional = true }
chrono = "0.4.40"
serde_default = "0.2.0"
socks = "0.3.4"
@ -30,4 +30,4 @@ default = ["gtk"]
gtk = ["dep:gtk4"]
libnotify = ["dep:libnotify", "dep:gdk-pixbuf"]
notify-rust = ["dep:notify-rust"]
winapi = ["dep:winapi", "dep:winresource"]
winapi = ["dep:winapi", "dep:winresource"]

View File

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

View File

@ -75,7 +75,7 @@ Now, if you'll run with the desktop file, GNotifications will work perfectly.
## From NixOS to Windows
```bash
nix-shell -p rustup gcc cargo-cross
nix-shell -p rustup gcc cargo-cross zip unzip curl
rustup toolchain install stable
./misc/build.sh
```

View File

@ -3,7 +3,7 @@
echo "Run this script only from repository root!"
echo "This script depends on:"
echo " - fact that you are on linux x86_64!"
echo " - wine. install it with your distro's package manager"
echo " - zip, unzip, curl. install it with your distro's package manager"
echo " - cross crate. to install it, run this: cargo install cross --git https://github.com/cross-rs/cross"
echo " - docker, so you should run something like this on your distro: sudo systemctl start docker"
read -p "Press enter if you really want to do rm -rf build/"
@ -28,12 +28,15 @@ build_linux() {
build_windows() {
chmod +x misc/mslink.sh
curl -L https://github.com/wingtk/gvsbuild/releases/download/2025.5.0/GTK4_Gvsbuild_2025.5.0_x64.zip -o build/gvsbuild.zip
curl -L https://github.com/wingtk/gvsbuild/releases/download/2025.5.0/GTK4_Gvsbuild_2025.5.0_x64.zip -o build/gvsbuild.zip # TODO: make this link auto-update
unzip build/gvsbuild.zip "bin/*" -d build/windows-x86_64
rm build/gvsbuild.zip
cross build --target x86_64-pc-windows-gnu -F notify-rust,winapi -r
cp target/x86_64-pc-windows-gnu/release/bRAC.exe build/windows-x86_64/bin
./misc/mslink.sh -l bin\\bRAC.exe -o build/windows-x86_64/bRAC.lnk
echo "@echo off" > build/windows-x86_64/start.bat
echo "set \"PATH=%CD%\bin;%PATH%\"" >> build/windows-x86_64/start.bat
echo "start \"\" /B \"bin\bRAC.exe\"" >> build/windows-x86_64/start.bat
./misc/mslink.sh -l "%COMSPEC% /C start start.bat" -o build/windows-x86_64/bRAC.lnk # TODO: fix this lnk
cp README.md build/windows-x86_64
curl https://raw.githubusercontent.com/wingtk/gvsbuild/refs/heads/main/COPYING -o build/windows-x86_64/LICENSE
zip -r build/bRAC-windows-x86_64.zip build/windows-x86_64