mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-23 15:54:07 +01:00
Vagrantfile: Drop Arch chroot in favor of local mingw-w64 build
This commit is contained in:
parent
3ad34a0b3f
commit
ba72758ff7
4 changed files with 19 additions and 63 deletions
|
|
@ -8,40 +8,10 @@ if [ ! -e "$HOME/steam-runtime" ]; then
|
|||
(cd steam-runtime && ./build-runtime.py --verbose --output=./runtime/)
|
||||
fi
|
||||
|
||||
if [ ! -e "$HOME/bin/schroot_wrapper" ]; then
|
||||
#create schroot wrapper scripts, for winebuild and winegcc to find in PATH
|
||||
mkdir -p $HOME/bin/
|
||||
cat > $HOME/bin/schroot_wrapper <<EOF
|
||||
#!/bin/bash
|
||||
schroot -c proton_crosscc -- /usr/bin/\$(basename \$0) \$@
|
||||
EOF
|
||||
chmod 755 $HOME/bin/schroot_wrapper
|
||||
for a in x86_64 i686
|
||||
do
|
||||
for f in \
|
||||
w64-mingw32-ar \
|
||||
w64-mingw32-as \
|
||||
w64-mingw32-dlltool \
|
||||
w64-mingw32-gcc \
|
||||
w64-mingw32-g++ \
|
||||
w64-mingw32-ld \
|
||||
w64-mingw32-nm \
|
||||
w64-mingw32-ranlib \
|
||||
w64-mingw32-strip \
|
||||
w64-mingw32-windres
|
||||
do
|
||||
ln -s schroot_wrapper $HOME/bin/$a-$f
|
||||
done
|
||||
done
|
||||
|
||||
# docker mounts /home/vagrant, not /home, so we need rbind instead of bind
|
||||
# for $HOME to get mounted in the schroot when called from within the docker
|
||||
cat > /home/vagrant/rbind_fstab << EOF
|
||||
/proc /proc none rw,bind 0 0
|
||||
/sys /sys none rw,bind 0 0
|
||||
/dev /dev none rw,bind 0 0
|
||||
/dev/pts /dev/pts none rw,bind 0 0
|
||||
/home /home none rw,rbind 0 0
|
||||
/tmp /tmp none rw,rbind 0 0
|
||||
EOF
|
||||
#build and install recent mingw-w64
|
||||
if [ ! -e "$HOME/.local/bin/x86_64-w64-mingw32-gcc" ]; then
|
||||
mkdir -p $HOME/mingw-w64-build/
|
||||
(cd $HOME/mingw-w64-build && $HOME/proton/build-mingw-w64.sh "$HOME/.local/")
|
||||
#clean up the build tree, this takes up like 6GB
|
||||
rm -rf $HOME/mingw-w64-build/
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue