mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-13 23:28:16 +03:00
Change Vagrant build VM to debian10
This commit is contained in:
parent
1dc63b6079
commit
b3e80d99d8
2
Makefile
2
Makefile
@ -87,7 +87,7 @@ help:
|
|||||||
|
|
||||||
vagrant:
|
vagrant:
|
||||||
vagrant up
|
vagrant up
|
||||||
vagrant rsync
|
vagrant rsync debian10
|
||||||
|
|
||||||
clean: vagrant
|
clean: vagrant
|
||||||
vagrant ssh -c 'rm -rf $(BUILD_DIR)/'
|
vagrant ssh -c 'rm -rf $(BUILD_DIR)/'
|
||||||
|
81
Vagrantfile
vendored
81
Vagrantfile
vendored
@ -43,8 +43,6 @@ Vagrant.configure(2) do |config|
|
|||||||
#different synced folder type per provider, so we always use it.
|
#different synced folder type per provider, so we always use it.
|
||||||
config.vagrant.plugins = "vagrant-sshfs"
|
config.vagrant.plugins = "vagrant-sshfs"
|
||||||
|
|
||||||
config.vm.box = "generic/debian9"
|
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
v.cpus = cpus
|
v.cpus = cpus
|
||||||
v.memory = memory
|
v.memory = memory
|
||||||
@ -57,53 +55,43 @@ Vagrant.configure(2) do |config|
|
|||||||
v.default_prefix = ENV['USER'].to_s.dup.concat('_').concat(File.basename(Dir.pwd))
|
v.default_prefix = ENV['USER'].to_s.dup.concat('_').concat(File.basename(Dir.pwd))
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.synced_folder "./vagrant_share/", "/vagrant/", create: true, type: "sshfs", sshfs_opts_append: "-o cache=no"
|
#deiban10-based build VM
|
||||||
config.vm.synced_folder ".", "/home/vagrant/proton", id: "proton", type: "rsync", rsync__exclude: ["vagrant_share"]
|
config.vm.define "debian10", primary: true do |debian10|
|
||||||
|
|
||||||
#this is where the VM is initialized on first setup
|
debian10.vm.box = "generic/debian10"
|
||||||
config.vm.provision "shell", privileged: "true", inline: <<-SHELL
|
|
||||||
#install docker and steam-runtime dependencies
|
|
||||||
dpkg --add-architecture i386
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
|
|
||||||
|
|
||||||
#add winehq repo
|
debian10.vm.synced_folder "./vagrant_share/", "/vagrant/", create: true, type: "sshfs", sshfs_opts_append: "-o cache=no"
|
||||||
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | apt-key add -
|
debian10.vm.synced_folder ".", "/home/vagrant/proton", id: "proton", type: "rsync", rsync__exclude: ["vagrant_share"]
|
||||||
echo 'deb http://dl.winehq.org/wine-builds/debian stretch main' > /etc/apt/sources.list.d/winehq.list
|
|
||||||
|
|
||||||
#add docker repo
|
debian10.vm.provision "shell", privileged: "true", inline: <<-SHELL
|
||||||
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
|
#install docker and steam-runtime dependencies
|
||||||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable"
|
dpkg --add-architecture i386
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
|
||||||
|
|
||||||
#add backports
|
#add docker repo
|
||||||
echo 'deb http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
|
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
|
||||||
|
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
|
||||||
|
|
||||||
#install host build-time dependencies
|
#install host build-time dependencies
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gpgv2 gnupg2 g++ g++-6-multilib git docker-ce fontforge-nox python-debian schroot python-pip
|
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 -y -t stretch-backports install meson
|
|
||||||
|
|
||||||
#install adobe font devkit to build source san hans
|
#install adobe font devkit to build source san hans
|
||||||
pip install afdko
|
pip install afdko
|
||||||
|
|
||||||
#winehq-devel is installed to pull in dependencies to run Wine
|
#allow vagrant user to run docker
|
||||||
apt-get install -y --install-recommends winehq-devel
|
adduser vagrant docker
|
||||||
|
|
||||||
#remove system Wine installation to ensure no accidental leakage
|
if ! schroot -i -c proton_crosscc >/dev/null 2>&1; then
|
||||||
apt-get remove -y winehq-devel
|
#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/
|
||||||
|
|
||||||
#allow vagrant user to run docker
|
#install proton_crosscc schroot
|
||||||
adduser vagrant docker
|
cat > /etc/schroot/chroot.d/proton_crosscc <<EOF
|
||||||
|
|
||||||
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 <<EOF
|
|
||||||
[proton_crosscc]
|
[proton_crosscc]
|
||||||
description=Special mingw-w64 for building DXVK
|
description=Special mingw-w64 for building DXVK
|
||||||
type=directory
|
type=directory
|
||||||
@ -112,13 +100,12 @@ users=vagrant
|
|||||||
personality=linux
|
personality=linux
|
||||||
preserve-environment=true
|
preserve-environment=true
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
SHELL
|
|
||||||
|
|
||||||
config.vm.provision "shell", privileged: "true", inline: <<-SHELL
|
# unprivileged shell still runs as root for some reason
|
||||||
# unprivileged shell still runs as root for some reason
|
|
||||||
|
|
||||||
# the script below will set up the steam-runtime docker containers
|
# the script below will set up the steam-runtime docker containers
|
||||||
sudo -u vagrant /home/vagrant/proton/vagrant-user-setup.sh
|
sudo -u vagrant /home/vagrant/proton/vagrant-user-setup.sh
|
||||||
SHELL
|
SHELL
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user