Browse Source

[Debian] Update scripts. Add support to VKD3D Proton & DXVK NVAPI

master
Pekka Helenius 1 year ago
parent
commit
94d1380f01
10 changed files with 557 additions and 117 deletions
  1. +10
    -10
      debian/debdata/dxvk.debdata
  2. +186
    -0
      debian/debdata/dxvk_nvapi.debdata
  3. +1
    -1
      debian/debdata/glslang.debdata
  4. +1
    -1
      debian/debdata/meson.debdata
  5. +183
    -0
      debian/debdata/vkd3d_proton.debdata
  6. +30
    -17
      debian/playonlinux_prefixupdate.sh
  7. +40
    -21
      debian/updatewine_debian.sh
  8. +89
    -50
      debian/wine_addons_root/wine_addons_build.sh
  9. +13
    -13
      debian/wineroot/winebuild.sh
  10. +4
    -4
      debian_cleanup_devpkgs.sh

debian/dxvkroot/dxvk.debdata → debian/debdata/dxvk.debdata View File

@ -8,7 +8,7 @@ pkg_section="otherosfs"
pkg_priority="optional"
pkg_arch="all"
dxvk_relative_builddir="debian/source/dxvk-master"
pkg_relative_builddir="debian/source/dxvk-master"
pkg_commondesc="Vulkan-based D3D11, D3D10 & D3D9 implementation for Linux / Wine"
pkg_longdesc="
@ -16,12 +16,12 @@ A Vulkan-based translation layer for Direct3D 10/11 which
allows running 3D applications on Linux using Wine.
"
pkg_giturl="${git_source_dxvk}"
pkg_giturl="${git_source_dxvk_debian}"
pkg_homeurl="https://github.com/doitsujin/dxvk"
pkg_gitbranch=${git_branch_dxvk}
git_commithash=${git_commithash_dxvk}
pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g'"
pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g'"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
@ -52,13 +52,13 @@ override_dh_install:
bash ./package-release.sh master debian/source/ --no-package
# Tell deb builder to create DXVK x32 & x64 subfolders
for arch in 32 64; do mkdir -p ${dxvk_relative_builddir}/x${arch}; done
for arch in 32 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
# Make a proper executable script folder for setup_dxvk.sh file
mkdir -p ${dxvk_relative_builddir}/bin
mkdir -p ${pkg_relative_builddir}/bin
printf '%s\n%s %s' \"#!/bin/sh\" \"/usr/share/dxvk/setup_dxvk.sh\" \"\${@}\" > \"${dxvk_relative_builddir}/bin/setup_dxvk\"
chmod +x "${dxvk_relative_builddir}/bin/setup_dxvk"
printf '%s\n%s\n%s %s' \"#!/bin/sh\" \"cd /usr/share/dxvk/\" \"./setup_dxvk.sh\" \"\${@}\" > \"${pkg_relative_builddir}/bin/setup_dxvk\"
chmod +x "${pkg_relative_builddir}/bin/setup_dxvk"
dh_install
"
@ -66,9 +66,9 @@ override_dh_install:
# Debian install file section
pkg_debinstall="\
${dxvk_relative_builddir}/setup_dxvk.sh usr/share/dxvk/
${dxvk_relative_builddir}/bin/* usr/bin/
$(for arch in 32 64; do echo -e ${dxvk_relative_builddir}/x${arch}/* usr/share/dxvk/x${arch}/; done)
${pkg_relative_builddir}/setup_dxvk.sh usr/share/dxvk/
${pkg_relative_builddir}/bin/* usr/bin/
$(for arch in 32 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/dxvk/x${arch}/; done)
"
########################################################

+ 186
- 0
debian/debdata/dxvk_nvapi.debdata View File

@ -0,0 +1,186 @@
########################################################
# Common properties
pkg_name="dxvk-nvapi-git"
pkg_license="custom --copyrightfile ../LICENSE"
pkg_maintainer="${USER} <${USER}@unknown>"
pkg_section="otherosfs"
pkg_priority="optional"
pkg_arch="all"
pkg_relative_builddir="debian/source/dxvk-nvapi-master"
pkg_commondesc="Alternative NVAPI implementation on top of DXVK."
pkg_longdesc="
Alternative implementation of NVIDIA's NVAPI library for
usage with DXVK and VKD3D-Proton.
"
pkg_giturl="${git_source_dxvknvapi_debian}"
pkg_homeurl="https://github.com/jp7677/dxvk-nvapi"
pkg_gitbranch=${git_branch_dxvknvapi}
git_commithash=${git_commithash_dxvknvapi}
pkg_gitver="printf '%s.%s' $(git rev-list --count HEAD) $(git rev-parse --short HEAD | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="12"
########################################################
# Debian rules file section
pkg_debrules="\
#!/usr/bin/make -f
%:
dh \$@
override_dh_auto_configure:
override_dh_usrlocal:
override_dh_install:
# Compile DXVK NVAPI
bash ./package-release.sh master debian/source/
# Tell deb builder to create DXVK NVAPI x32 & x64 subfolders
for arch in 32 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
# Make a proper executable script folder for setup_dxvk.sh file
mkdir -p ${pkg_relative_builddir}/bin
# Add missing setup_dxvk_nvapi.sh file
cp debian/source/setup_dxvk_nvapi.sh /usr/share/dxvk_nvapi/
chmod +x /usr/share/dxvk_nvapi/setup_dxvk_nvapi.sh
printf '%s\n%s\n%s %s' \"#!/bin/sh\" \"cd /usr/share/dxvk_nvapi/\" \"./setup_dxvk_nvapi.sh\" \"\${@}\" > \"${pkg_relative_builddir}/bin/setup_dxvk_nvapi\"
chmod +x "${pkg_relative_builddir}/bin/setup_dxvk_nvapi"
dh_install
"
########################################################
# Debian install file section
pkg_debinstall="\
${pkg_relative_builddir}/setup_dxvk_nvapi.sh usr/share/dxvk_nvapi/
${pkg_relative_builddir}/bin/* usr/bin/
$(for arch in 32 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/dxvk_nvapi/x${arch}/; done)
"
########################################################
# Debian control file subfields
# Debian control file Overrides section
pkg_overrides=(
empty
)
# Debian control file Suggests section
pkg_suggests=(
empty
)
# Debian control file Conflicts section
pkg_conflicts=(
empty
)
# Debian control file Breaks section
pkg_breaks=(
empty
)
# Debian control file Replaces section
pkg_replaces=(
empty
)
# Debian control file Provides section
pkg_provides=(
empty
)
############################
# Build time dependencies
pkg_deps_build=(
#${_coredeps[*]}
'meson'
'glslang'
'ninja-build (>= 1.5)'
'gcc-mingw-w64-base'
#'binutils-common'
'mingw-w64-common'
'binutils-mingw-w64-x86-64'
'binutils-mingw-w64-i686'
'mingw-w64-x86-64-dev'
'gcc-mingw-w64-x86-64'
'g++-mingw-w64-x86-64'
'mingw-w64-i686-dev'
'gcc-mingw-w64-i686'
'g++-mingw-w64-i686'
)
# Runtime dependencies
pkg_deps_runtime=(
'wine'
)
# Extra fields for Debian control file Source section
pkg_extra_1=(
empty
)
# Extra fields for Debian control file Package section
pkg_extra_2=(
empty
)
############################
# Deb builder execution field
# Do not build either debug symbols or doc files
pkg_debbuilder="DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
########################################################
# Contents of Debian control file
# This is a necessary variable setting for array loops below
IFS=$'\n'
pkg_debcontrol="\
Source: ${pkg_name}
Section: ${pkg_section}
Priority: ${pkg_priority}
Maintainer: ${pkg_maintainer}
Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
Standards-Version: 4.1.3
Homepage: ${pkg_homeurl}
$(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
Package: ${pkg_name}
Architecture: ${pkg_arch}
Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
Description: ${pkg_commondesc}
$(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
$(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
$(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
"
unset IFS

debian/dxvkroot/glslang.debdata → debian/debdata/glslang.debdata View File

@ -13,7 +13,7 @@ pkg_longdesc="
Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
"
pkg_giturl="${git_source_glslang}"
pkg_giturl="${git_source_glslang_debian}"
pkg_homeurl="https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/"
pkg_gitbranch=${git_branch_glslang}

debian/dxvkroot/meson.debdata → debian/debdata/meson.debdata View File

@ -15,7 +15,7 @@ productivity. It does this by providing a fast, simple and easy to\n\
use interface for modern software development tools and practices.
"
pkg_giturl="${git_source_meson}"
pkg_giturl="${git_source_meson_debian}"
pkg_homeurl="http://mesonbuild.com"
pkg_gitbranch=${git_branch_meson}

+ 183
- 0
debian/debdata/vkd3d_proton.debdata View File

@ -0,0 +1,183 @@
########################################################
# Common properties
pkg_name="vkd3d-proton-git"
pkg_license="custom --copyrightfile ../LICENSE"
pkg_maintainer="${USER} <${USER}@unknown>"
pkg_section="otherosfs"
pkg_priority="optional"
pkg_arch="all"
pkg_relative_builddir="debian/source/vkd3d-proton-master"
pkg_commondesc="Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation."
pkg_longdesc="
Fork of VKD3D, which aims to implement the full Direct3D 12
API on top of Vulkan. The project serves as the development
effort for Direct3D 12 support in Proton.
"
pkg_giturl="${git_source_vkd3dproton_debian}"
pkg_homeurl="https://github.com/HansKristian-Work/vkd3d-proton"
pkg_gitbranch=${git_branch_vkd3dproton}
git_commithash=${git_commithash_vkd3dproton}
pkg_gitver="git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g'"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="12"
########################################################
# Debian rules file section
pkg_debrules="\
#!/usr/bin/make -f
%:
dh \$@
override_dh_auto_configure:
override_dh_usrlocal:
override_dh_install:
# Compile VKD3D Proton
bash ./package-release.sh master debian/source/ --no-package
# Tell deb builder to create VKD3D Proton x86 & x64 subfolders
for arch in 86 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
# Make a proper executable script folder for setup_dxvk.sh file
mkdir -p ${pkg_relative_builddir}/bin
printf '%s\n%s\n%s %s' \"#!/bin/sh\" \"cd /usr/share/vkd3d_proton/\" \"./setup_vkd3d_proton.sh\" \"\${@}\" > \"${pkg_relative_builddir}/bin/setup_vkd3d_proton\"
chmod +x "${pkg_relative_builddir}/bin/setup_vkd3d_proton"
dh_install
"
########################################################
# Debian install file section
pkg_debinstall="\
${pkg_relative_builddir}/setup_vkd3d_proton.sh usr/share/vkd3d_proton/
${pkg_relative_builddir}/bin/* usr/bin/
$(for arch in 86 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/vkd3d_proton/x${arch}/; done)
"
########################################################
# Debian control file subfields
# Debian control file Overrides section
pkg_overrides=(
empty
)
# Debian control file Suggests section
pkg_suggests=(
empty
)
# Debian control file Conflicts section
pkg_conflicts=(
empty
)
# Debian control file Breaks section
pkg_breaks=(
empty
)
# Debian control file Replaces section
pkg_replaces=(
empty
)
# Debian control file Provides section
pkg_provides=(
empty
)
############################
# Build time dependencies
pkg_deps_build=(
#${_coredeps[*]}
'meson'
'glslang'
'ninja-build (>= 1.5)'
'gcc-mingw-w64-base'
#'binutils-common'
'mingw-w64-common'
'binutils-mingw-w64-x86-64'
'binutils-mingw-w64-i686'
'mingw-w64-x86-64-dev'
'gcc-mingw-w64-x86-64'
'g++-mingw-w64-x86-64'
'mingw-w64-i686-dev'
'gcc-mingw-w64-i686'
'g++-mingw-w64-i686'
)
# Runtime dependencies
pkg_deps_runtime=(
'wine'
)
# Extra fields for Debian control file Source section
pkg_extra_1=(
empty
)
# Extra fields for Debian control file Package section
pkg_extra_2=(
empty
)
############################
# Deb builder execution field
# Do not build either debug symbols or doc files
pkg_debbuilder="DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
########################################################
# Contents of Debian control file
# This is a necessary variable setting for array loops below
IFS=$'\n'
pkg_debcontrol="\
Source: ${pkg_name}
Section: ${pkg_section}
Priority: ${pkg_priority}
Maintainer: ${pkg_maintainer}
Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
Standards-Version: 4.1.3
Homepage: ${pkg_homeurl}
$(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
Package: ${pkg_name}
Architecture: ${pkg_arch}
Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
Description: ${pkg_commondesc}
$(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
$(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
$(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
"
unset IFS

+ 30
- 17
debian/playonlinux_prefixupdate.sh View File

@ -1,7 +1,7 @@
#!/bin/env bash
# Update PoL Wine prefixes (DXVK & Wine Staging) on Debian/Ubuntu/Mint
# Copyright (C) 2018 Pekka Helenius
# Copyright (C) 2018, 2022 Pekka Helenius
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -25,24 +25,37 @@ if [[ ! -d "$HOME/.PlayOnLinux" ]]; then
fi
# Install dxvk-git to every PlayOnLinux wineprefix
if [[ $? -eq 0 ]] && [[ ! -v NOPOL ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
WINEPREFIX=${wineprefix} setup_dxvk
fi
done
if [[ $? -eq 0 ]] && [[ ! -v NO_POL ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
if [[ ! -v NO_DXVK ]]; then
WINEPREFIX=${wineprefix} setup_dxvk install --symlink
fi
if [[ ! -v NO_NVAPI ]]; then
WINEPREFIX=${wineprefix} setup_dxvk_nvapi install --symlink
fi
if [[ ! -v NO_VKD3D ]]; then
WINEPREFIX=${wineprefix} setup_vkd3d_proton install --symlink
fi
fi
done
fi
# If a new Wine Staging version was installed and 'System' version of Wine has been used in
# PoL wineprefix configurations, update those existing PoL wineprefixes
if [[ ! -v NOPOL ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
# If VERSION string exists, skip updating that prefix.
if [[ $(printf $(grep -ril "VERSION" ${wineprefix}/playonlinux.cfg &> /dev/null)$?) -ne 0 ]]; then
WINEPREFIX=${wineprefix} wineboot -u
fi
fi
done
if [[ ! -v NO_POL ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
# If VERSION string exists, skip updating that prefix.
if [[ $(printf $(grep -ril "VERSION" ${wineprefix}/playonlinux.cfg &> /dev/null)$?) -ne 0 ]]; then
WINEPREFIX=${wineprefix} wineboot -u
fi
fi
done
fi

+ 40
- 21
debian/updatewine_debian.sh View File

@ -54,7 +54,7 @@ done
# Filter all but <args>, i.e. the first 0-8 arguments
i=0
for arg in ${params[@]:8}; do
for arg in ${params[@]:24}; do
args[$i]="${arg}"
let i++
done
@ -66,21 +66,27 @@ done
for check in ${args[@]}; do
case ${check} in
--no-wine)
NO_WINE=
;;
--no-staging)
NO_STAGING=
;;
--no-install)
NO_INSTALL=
# Do not check for PlayOnLinux wine prefixes
NO_POL=
;;
--no-wine)
NO_WINE=
;;
--no-dxvk)
NO_DXVK=
;;
--no-pol)
NO_POL=
--no-vkd3d)
NO_VKD3D=
;;
--no-install)
NO_INSTALL=
# If this option is given, do not check PoL wineprefixes
--no-nvapi)
NO_NVAPI=
;;
--no-pol)
NO_POL=
;;
esac
@ -135,14 +141,19 @@ Using $(nproc --ignore 1) of $(nproc) available CPU cores for Wine source code c
########################################################
# Call DXVK compilation & installation subscript in the following function
# Call DXVK/DXVK NVAPI/VKD3D Proton compilation & installation subscript in the following function
function wine_addons_install_main() {
local addon_names
function dxvk_install_main() {
addon_names=("${@}")
addon_names_str=$(echo ${addon_names[@]} | tr ' ' ', ')
echo -e "Starting compilation & installation of DXVK\n\n\
echo -e "Starting compilation & installation of ${addon_names_str}\n\n\
This can take up to 10-20 minutes depending on how many dependencies we need to build for it.\n"
bash -c "cd ${ROOTDIR}/dxvkroot && bash dxvkbuild.sh \"${datedir}\" \"${params[*]}\""
bash -c "cd ${ROOTDIR}/wine_addons_root && bash wine_addons_build.sh \"${datedir}\" \"${params[*]}\""
}
########################################################
@ -175,6 +186,8 @@ function mainQuestions() {
installed and the following packages may be compiled from source (depending on your choises):\n\n\
\t- Wine/Wine Staging (latest git version)\n\
\t- DXVK (latest git version)\n\
\t- DXVK NVAPI (latest git version)\n\
\t- VKD3D Proton (latest git version)\n\
\t- meson & glslang (latest git versions; these are build time dependencies for DXVK)\n\n\
Do you want to continue? [Y/n]"
@ -202,8 +215,8 @@ Do you want to continue? [Y/n]"
####################
# This question is relevant only if DXVK stuff is compiled
if [[ ! -v NO_DXVK ]]; then
# This question is relevant only if DXVK, DXVK NVAPI or VKD3D Proton stuff is compiled
if [[ ! -v NO_DXVK ]] || [[ ! -v NO_NVAPI ]] || [[ ! -v NO_VKD3D ]]; then
INFO_SEP
echo -e "\e[1mQUESTION:\e[0m Update existing dependencies?\n\nIn a case you have old build time dependencies on your system, do you want to update them?\n\
@ -246,8 +259,8 @@ function coredeps_check() {
########################################################
# If either Wine, DXVK is to be compiled
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]]; then
# If either Wine, DXVK, DXVK NVAPI or VKD3D Proton is to be compiled
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]] || [[ ! -v NO_NVAPI ]] || [[ ! -v NO_VKD3D ]]; then
mainQuestions
coredeps_check
fi
@ -263,11 +276,17 @@ fi
####################
# If DXVK is going to be installed, then
if [[ ! -v NO_DXVK ]]; then
dxvk_install_main
# If DXVK/DXVK NVAPI or VKD3D Proton is going to be installed, then
if [[ ! -v NO_DXVK ]] || [[ ! -v NO_NVAPI ]] || [[ ! -v NO_VKD3D ]]; then
addons=()
[[ ! -v NO_DXVK ]] && addons+=("DXVK")
[[ ! -v NO_NVAPI ]] && addons+=("DXVK NVAPI")
[[ ! -v NO_VKD3D ]] && addons+=("VKD3D Proton")
wine_addons_install_main ${addons[@]}
else
echo -e "Skipping DXVK build$(if [[ ! -v NO_INSTALL ]]; then printf " & installation"; fi) process.\n"
echo -e "Skipping Wine addons build$(if [[ ! -v NO_INSTALL ]]; then printf " & installation"; fi) process.\n"
fi
####################


debian/dxvkroot/dxvkbuild.sh → debian/wine_addons_root/wine_addons_build.sh View File

@ -23,7 +23,7 @@
########################################################
# Root directory of this script file
DXVKROOT="${PWD}"
WINE_ADDONS_ROOT="${PWD}"
# datedir variable supplied by ../updatewine_debian.sh script file
datedir="${1}"
@ -45,17 +45,17 @@ done
# array in ../updatewine.sh, make sure to update these
# variables!
#
git_commithash_dxvk=${params[0]}
git_commithash_glslang=${params[1]}
git_commithash_meson=${params[2]}
git_commithash_dxvk=${params[2]}
git_commithash_glslang=${params[3]}
git_commithash_meson=${params[4]}
git_branch_dxvk=${params[3]}
git_branch_glslang=${params[5]}
git_branch_meson=${params[6]}
git_branch_dxvk=${params[8]}
git_branch_glslang=${params[9]}
git_branch_meson=${params[10]}
git_source_dxvk=${params[8]}
git_source_glslang=${params[9]}
git_source_meson=${params[10]}
git_source_dxvk=${params[14]}
git_source_glslang=${params[15]}
git_source_meson=${params[16]}
########################################################
@ -87,6 +87,12 @@ for check in ${args[@]}; do
--no-dxvk)
NO_DXVK=
;;
--no-nvapi)
NO_NVAPI=
;;
--no-vkd3d)
NO_VKD3D=
;;
esac
done
@ -94,7 +100,7 @@ done
########################################################
# Check presence of Wine. Some version of Wine should
# be found in the system in order to install DXVK.
# be found in the system in order to install DXVK/DXVK NVAPI/VKD3D Proton.
known_wines=(
'wine'
@ -247,14 +253,11 @@ function runtimeCheck() {
done
if [[ -z ${pkglist[*]} ]]; then
echo -e "\e[1mWARNING:\e[0m Not installing DXVK because \e[1m${pkgreq_name}\e[0m is missing on your system.\n\
${pkgreq_name} should be installed in order to use DXVK. Just compiling DXVK for later use.\n"
echo -e "\e[1mWARNING:\e[0m Not compiling Wine addons because \e[1m${pkgreq_name}\e[0m is missing on your system.\n\
${pkgreq_name} should be installed in order to use DXVK, DXVK NVAPI and VKD3D Proton.\n"
exit 1
# Do this check separately so we can warn about all missing runtime dependencies above
if [[ ! -v NO_INSTALL ]]; then
# Force --no-install switch
NO_INSTALL=
fi
fi
}
@ -263,17 +266,14 @@ ${pkgreq_name} should be installed in order to use DXVK. Just compiling DXVK for
# If the script is interrupted (Ctrl+C/SIGINT), do the following
function DXVK_intCleanup() {
rm -rf ${DXVKROOT}/{dxvk-git,meson,glslang,*.deb}
rm -rf ${DXVKROOT}/../compiled_deb/"${datedir}"
function wineAddonsIntCleanup() {
rm -rf ${WINE_ADDONS_ROOT}/{dxvk-git,meson,glslang,*.deb}
rm -rf ${WINE_ADDONS_ROOT}/../compiled_deb/"${datedir}"
exit 0
}
# Allow interruption of the script at any time (Ctrl + C)
trap "DXVK_intCleanup" INT
# Error event
#trap "DXVK_intCleanup" ERR
trap "wineAddonsIntCleanup" INT
########################################################
@ -313,19 +313,19 @@ function pkgcompilecheck() {
########################################################
# DXVK CUSTOM INSTALLATION HOOKS
# ADDON CUSTOM INSTALLATION HOOKS
# These are custom installation instructions for DXVK
# These are custom installation instructions for addon
# They are not used independently.
function dxvk_install_custom() {
function addon_install_custom() {
local PATCHDIR
PATCHDIR="${1}"
# Use posix alternates for MinGW binaries
function dxvk_posixpkgs() {
function addon_posixpkgs() {
for alt in ${!alternatives[@]}; do
echo "Linking MingW executable ${alt} to ${alternatives[$alt]}"
@ -351,10 +351,10 @@ function dxvk_install_custom() {
}
############################
# DXVK - CUSTOM PATCHES
# ADDON - CUSTOM PATCHES
# Add and apply custom DXVK patches
function dxvk_custompatches() {
# Add and apply custom addon patches
function addon_custompatches() {
local CURDIR
local dxvk_builddir_name
@ -365,10 +365,10 @@ function dxvk_install_custom() {
CURDIR="${PWD}"
# Check if the following folder exists, and proceed.
if [[ -d "${DXVKROOT}/../../${PATCHDIR}" ]]; then
cp -r "${DXVKROOT}/../../${PATCHDIR}/"*.{patch,diff} "${DXVKROOT}/${pkg_name}/" 2>/dev/null
if [[ -d "${WINE_ADDONS_ROOT}/../../${PATCHDIR}" ]]; then
cp -r "${WINE_ADDONS_ROOT}/../../${PATCHDIR}/"*.{patch,diff} "${WINE_ADDONS_ROOT}/${pkg_name}/" 2>/dev/null
dxvk_builddir_name=$(ls -l "${DXVKROOT}/${pkg_name}" | grep ^d | awk '{print $NF}')
dxvk_builddir_name=$(ls -l "${WINE_ADDONS_ROOT}/${pkg_name}" | grep ^d | awk '{print $NF}')
# TODO Expecting just one folder here. This method doesn't work with multiple dirs present
if [[ $(echo ${dxvk_builddir_name} | wc -l) -gt 1 ]]; then
@ -376,7 +376,7 @@ function dxvk_install_custom() {
exit 1
fi
dxvk_builddir_path="${DXVKROOT}/${pkg_name}/${dxvk_builddir_name}"
dxvk_builddir_path="${WINE_ADDONS_ROOT}/${pkg_name}/${dxvk_builddir_name}"
cd "${dxvk_builddir_path}"
for pfile in ../*.{patch,diff}; do
@ -400,10 +400,28 @@ function dxvk_install_custom() {
}
############################
# DXVK - CUSTOM HOOKS EXECUTION
# ADDON - CUSTOM HOOKS EXECUTION
addon_custompatches && \
addon_posixpkgs
}
###########################################################
# Fetch extra package files
function fetch_extra_pkg_files() {
local pkgname
local pkgdir
local extra_files_dir
pkgname=${1}
pkgdir=${2}
extra_files_dir=${3}
cp -r ${extra_files_dir}/ ${pkgdir}/
dxvk_custompatches && \
dxvk_posixpkgs
}
########################################################
@ -437,6 +455,12 @@ function compile_and_install_deb() {
local _pkg_debbuilder="${15}"
local _pkg_debcompat="${16}"
local _pkg_compatfile="${17}"
local extra_files_dir=$(find "../../extra_files/" -type d -iname "${_pkg_name%-git}")
if [[ -d ${extra_files_dir} ]]; then
fetch_extra_pkg_files ${_pkg_name} "debian/source" ${extra_files_dir}
fi
############################
# COMMON - ARRAY PARAMETER FIX
@ -539,8 +563,8 @@ function compile_and_install_deb() {
}
function pkg_localinstall() {
wget ${1} -O ${DXVKROOT}/"${2}".deb
sudo dpkg -i --force-all ${DXVKROOT}/"${2}".deb
wget ${1} -O ${WINE_ADDONS_ROOT}/"${2}".deb
sudo dpkg -i --force-all ${WINE_ADDONS_ROOT}/"${2}".deb
}
function pkg_configure() {
@ -699,12 +723,10 @@ function compile_and_install_deb() {
bash -c "${_pkg_debbuilder}"
# Once our deb package is compiled, install and store it
# We do not make installation optional for deps because they are required by DXVK
# We do not make installation optional for deps because they may be required by the addon
if [[ $? -eq 0 ]]; then
rm -rf ../*.{changes,buildinfo,tar.xz}
if [[ "${_pkg_name}" == *"dxvk"* ]] && [[ ! -v NO_INSTALL ]]; then
sudo dpkg -i ../${_pkg_name}*.deb
elif [[ "${_pkg_name}" != *"dxvk"* ]]; then
if [[ ! -v NO_INSTALL ]]; then
sudo dpkg -i ../${_pkg_name}*.deb
fi
mv ../${_pkg_name}*.deb ../../../compiled_deb/"${datedir}" && \
@ -730,8 +752,15 @@ function compile_and_install_deb() {
pkg_folderprepare
# TODO use package name or separate override switch here?
if [[ "${_pkg_name}" == *"dxvk"* ]]; then
dxvk_install_custom "dxvk_custom_patches"
if [[ "${_pkg_name%-git}" == "dxvk" ]]; then
addon_install_custom "dxvk_custom_patches"
elif [[ "${_pkg_name%-git}" == "dxvk-nvapi" ]]; then
addon_install_custom "dxvk-nvapi_custom_patches"
elif [[ "${_pkg_name%-git}" == "vkd3d-proton" ]]; then
addon_install_custom "vkd3d-proton_custom_patches"
fi
pkg_debianbuild
@ -851,14 +880,24 @@ function pkg_install_main() {
runtimeCheck Wine "${known_wines[*]}"
# Meson - compile (& install)
pkgcompilecheck pkg_install_main meson "${DXVKROOT}/meson.debdata"
pkgcompilecheck pkg_install_main meson "${WINE_ADDONS_ROOT}/../debdata/meson.debdata"
# Glslang - compile (& install)
pkgcompilecheck pkg_install_main glslang "${DXVKROOT}/glslang.debdata"
pkgcompilecheck pkg_install_main glslang "${WINE_ADDONS_ROOT}/../debdata/glslang.debdata"
if [[ ! -v NO_DXVK ]]; then
# DXVK - compile (& install)
pkg_install_main "${DXVKROOT}/dxvk.debdata"
pkg_install_main "${WINE_ADDONS_ROOT}/../debdata/dxvk.debdata"
fi
if [[ ! -v NO_NVAPI ]]; then
# DXVK NVAPI - compile (& install)
pkg_install_main "${WINE_ADDONS_ROOT}/../debdata/dxvk_nvapi.debdata"
fi
if [[ ! -v NO_VKD3D ]]; then
# VKD3D Proton - compile (& install)
pkg_install_main "${WINE_ADDONS_ROOT}/../debdata/vkd3d_proton.debdata"
fi
# Clean buildtime dependencies

+ 13
- 13
debian/wineroot/winebuild.sh View File

@ -60,7 +60,7 @@ wine_deps_build_common=(
'dctrl-tools'
'khronos-api'
'unicode-data'
'freebsd-glue'
# 'freebsd-glue' # Not available anymore
'icoutils'
'librsvg2-bin'
'imagemagick'
@ -92,13 +92,13 @@ wine_deps_build_amd64=(
'libxml2-dev:amd64'
'libgsm1-dev:amd64'
'libjpeg-dev:amd64'
'libkrb5-dev:amd64'
# 'libkrb5-dev:amd64'
'libtiff-dev:amd64'
'libsane-dev:amd64'
'libudev-dev:amd64'
'libpulse-dev:amd64'
'liblcms2-dev:amd64'
'libldap2-dev:amd64'
# 'libldap2-dev:amd64'
'libxslt1-dev:amd64'
'unixodbc-dev:amd64'
'libcups2-dev:amd64'
@ -145,12 +145,12 @@ wine_deps_build_i386=(
'libv4l-dev:i386'
'libgsm1-dev:i386'
'libjpeg-dev:i386'
'libkrb5-dev:i386'
# 'libkrb5-dev:i386'
'libsane-dev:i386'
'libudev-dev:i386'
'libpulse-dev:i386'
'liblcms2-dev:i386'
'libldap2-dev:i386'
# 'libldap2-dev:i386'
'unixodbc-dev:i386'
'libcapi20-dev:i386'
'libopenal-dev:i386'
@ -202,7 +202,7 @@ wine_deps_runtime_i386=(
'libgphoto2-6:i386'
'libgphoto2-port12:i386'
'liblcms2-2:i386'
'libldap-2.4-2:i386'
# 'libldap-2.4-2:i386'
'libmpg123-0:i386'
'libncurses5:i386'
'libopenal1:i386'
@ -236,7 +236,7 @@ wine_deps_runtime_amd64=(
'libgphoto2-6:amd64'
'libgphoto2-port12:amd64'
'liblcms2-2:amd64'
'libldap-2.4-2:amd64'
# 'libldap-2.4-2:amd64'
'libmpg123-0:amd64'
'libncurses5:amd64'
'libopenal1:amd64'
@ -313,11 +313,11 @@ done
# array in ../updatewine.sh, make sure to update these
# variables!
#
git_commithash_wine=${params[3]}
git_branch_wine=${params[7]}
git_commithash_wine=${params[5]}
git_branch_wine=${params[11]}
git_source_wine=${params[11]}
git_source_winestaging=${params[12]}
git_source_wine_debian=${params[22]}
git_source_winestaging_debian=${params[23]}
########################################################
@ -409,8 +409,8 @@ function getWine() {
local winesrc_url
local winestagingsrc_url
winesrc_url="${git_source_wine}"
winestagingsrc_url="${git_source_winestaging}"
winesrc_url="${git_source_wine_debian}"
winestagingsrc_url="${git_source_winestaging_debian}"
function cleanOldBuilds() {
if [[ $(find "${BUILDROOT}" -type d -name "winebuild_*" | wc -l) -ne 0 ]]; then


+ 4
- 4
debian_cleanup_devpkgs.sh View File

@ -49,13 +49,13 @@ wine_deps=(
'libxml2-dev:amd64'
'libgsm1-dev:amd64'
'libjpeg-dev:amd64'
'libkrb5-dev:amd64'
# 'libkrb5-dev:amd64'
'libtiff-dev:amd64'
'libsane-dev:amd64'
'libudev-dev:amd64'
'libpulse-dev:amd64'
'liblcms2-dev:amd64'
'libldap2-dev:amd64'
# 'libldap2-dev:amd64'
'libxslt1-dev:amd64'
'unixodbc-dev:amd64'
'libcups2-dev:amd64'
@ -98,12 +98,12 @@ wine_deps=(
'libv4l-dev:i386'
'libgsm1-dev:i386'
'libjpeg-dev:i386'
'libkrb5-dev:i386'
# 'libkrb5-dev:i386'
'libsane-dev:i386'
'libudev-dev:i386'
'libpulse-dev:i386'
'liblcms2-dev:i386'
'libldap2-dev:i386'
# 'libldap2-dev:i386'
'unixodbc-dev:i386'
'libcapi20-dev:i386'
'libopenal-dev:i386'


Loading…
Cancel
Save