You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
876 B

set -euxo pipefail
cargo build --target "$target" --release
cp keymap.toml target/"$target"/release/
cd target/"$target"/release/
strip rusty-keys.exe
zip -9 rusty-keys-"$target".zip rusty-keys.exe keymap.toml
mv rusty-keys-"$target".zip ../../..
exit 0
# on arch linux, run these to enable cross compiling to win64:
pacman -S mingw-w64-gcc
# you can change these, if you want
rustup install $CHANNEL-$ARCH-pc-windows-gnu && rustup target add $ARCH-pc-windows-gnu
for lib in crt2.o dllcrt2.o libmsvcrt.a; do cp -v /usr/x86_64-w64-mingw32/lib/$lib $HOME/.rustup/toolchains/$CHANNEL-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/; done
cat >> ~/.cargo/config <<EOF
linker = "/usr/bin/$ARCH-w64-mingw32-gcc"
ar = "/usr/$ARCH-w64-mingw32/bin/ar"