diff --git a/Makefile b/Makefile index 465752de..cbe31b5f 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,7 @@ endif CONFIGURE_CMD := ../proton/configure.sh \ --steam-runtime64=docker:steam-proton-dev --steam-runtime32=docker:steam-proton-dev32 \ --steam-runtime="$$HOME"/steam-runtime/runtime/ \ - --build-name="$(_build_name)" \ - --docker-opts=-v\ /srv/chroot:/srv/chroot\ -v\ /etc/schroot/chroot.d/proton_crosscc:/etc/schroot/chroot.d/proton_crosscc\ -v\ /home/vagrant/rbind_fstab:/etc/schroot/default/fstab + --build-name="$(_build_name)" # make doesn't handle spaces well... replace them with underscores in paths BUILD_DIR := "build-$(shell echo $(_build_name) | sed -e 's/ /_/g')" @@ -93,7 +92,7 @@ clean: vagrant vagrant ssh -c 'rm -rf $(BUILD_DIR)/' configure: vagrant - @vagrant ssh -c 'if [ ! -e $(BUILD_DIR)/Makefile ]; then if ! schroot -i -c proton_crosscc >/dev/null 2>&1; then echo !!!! You must run \"vagrant provision\" !!!!; exit 1; fi; mkdir -p $(BUILD_DIR); (cd $(BUILD_DIR) && $(CONFIGURE_CMD)); fi && make -C $(BUILD_DIR) downloads' + @vagrant ssh -c 'if [ ! -e $(BUILD_DIR)/Makefile ]; then mkdir -p $(BUILD_DIR); (cd $(BUILD_DIR) && $(CONFIGURE_CMD)); fi && make -C $(BUILD_DIR) downloads' proton: configure vagrant ssh -c 'make -C $(BUILD_DIR)/ dist' diff --git a/Vagrantfile b/Vagrantfile index 8fd3c5f1..6cb571a8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -75,7 +75,16 @@ Vagrant.configure(2) do |config| #install host build-time dependencies apt-get update - apt-get install -y gpgv2 gnupg2 g++ g++-multilib git docker-ce docker-ce-cli containerd.io fontforge-nox python-debian schroot python-pip meson + apt-get install -y gpgv2 gnupg2 git docker-ce docker-ce-cli containerd.io \ + fontforge-nox python-debian python-pip meson libmpc-dev libmpc-dev:i386 \ + gcc g++ gcc-i686-linux-gnu g++-i686-linux-gnu binutils-i686-linux-gnu \ + gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 \ + g++-mingw-w64-i686 g++-mingw-w64-x86-64 + + update-alternatives --set x86_64-w64-mingw32-gcc `which x86_64-w64-mingw32-gcc-posix` + update-alternatives --set x86_64-w64-mingw32-g++ `which x86_64-w64-mingw32-g++-posix` + update-alternatives --set i686-w64-mingw32-gcc `which i686-w64-mingw32-gcc-posix` + update-alternatives --set i686-w64-mingw32-g++ `which i686-w64-mingw32-g++-posix` #install adobe font devkit to build source san hans pip install afdko @@ -83,27 +92,6 @@ Vagrant.configure(2) do |config| #allow vagrant user to run docker adduser vagrant docker - if ! schroot -i -c proton_crosscc >/dev/null 2>&1; then - #download build of recent mingw-w64 with dwarf2 exceptions enabled - wget --progress=dot -O /root/proton_crosscc.tar.xz 'http://repo.steampowered.com/proton_mingw/proton_mingw-9.1-1.tar.xz' - unxz -T0 /root/proton_crosscc.tar.xz - mkdir -p /srv/chroot/proton_crosscc/ - tar -xf /root/proton_crosscc.tar -C /srv/chroot/proton_crosscc/ - - #install proton_crosscc schroot - cat > /etc/schroot/chroot.d/proton_crosscc < $HOME/bin/schroot_wrapper < /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