Merge branch 'main' into gui

This commit is contained in:
MeexReay 2025-04-19 00:52:17 +03:00
commit 5c1f8f0cae
3 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target /target
/result /result
/build
/config.yml /config.yml

19
Makefile Normal file
View File

@ -0,0 +1,19 @@
build-windows:
mkdir -p build
mkdir -p build/windows-x86_64
# cargo build -r --target x86_64-pc-windows-gnu
# cp target/x86_64-pc-windows-gnu/release/bRAC
curl -s https://api.github.com/repos/wingtk/gvsbuild/releases/latest \
| grep -o ".*browser_download_url.*GTK4_Gvsbuild.*_x64.zip.*" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O build/windows-x86_64/gtk4.zip -qi -
unzip build/windows-x86_64/gtk4.zip -d build/windows-x86_64
rm build/windows-x86_64/gtk4.zip
echo 'Set oWS = WScript.CreateObject("WScript.Shell")' > build/windows-x86_64/gen_link.vbs
echo 'Set oLink = oWS.CreateShortcut("build/windows-x86_64/bRAC.lnk")' >> build/windows-x86_64/gen_link.vbs
echo 'oLink.TargetPath = "bin\\bRAC.exe"' >> build/windows-x86_64/gen_link.vbs
echo 'oLink.Description = "Relative shortcut to bin\\myapp.exe"' >> build/windows-x86_64/gen_link.vbs
echo 'oLink.Save' >> build/windows-x86_64/gen_link.vbs
wine wscript.exe build/windows-x86_64/gen_link.vbs
rm build/windows-x86_64/gen_link.vbs

11
docs/cross_compile.md Normal file
View File

@ -0,0 +1,11 @@
# Cross-compile on Linux to Windows
## Install dev packages
on Nix:
```bash
nix-shell -p pkgsCross.mingwW64.stdenv.cc pkgsCross.mingwW64.windows.pthreads pkgsCross.mingwW64.gtk4
```
##