|
@ -228,16 +228,20 @@ tempLinks=( |
|
|
|
|
|
|
|
|
function runtimeCheck() { |
|
|
function runtimeCheck() { |
|
|
|
|
|
|
|
|
|
|
|
local pkgreq_name |
|
|
|
|
|
local known_pkgs |
|
|
|
|
|
local pkglist |
|
|
|
|
|
|
|
|
# Friendly name for this package |
|
|
# Friendly name for this package |
|
|
local pkgreq_name=${1} |
|
|
|
|
|
|
|
|
pkgreq_name=${1} |
|
|
# Known package names to check on Debian |
|
|
# Known package names to check on Debian |
|
|
local known_pkgs=${2} |
|
|
|
|
|
|
|
|
known_pkgs=${2} |
|
|
|
|
|
|
|
|
# Check if any of these Wine packages are present on the system |
|
|
# Check if any of these Wine packages are present on the system |
|
|
i=0 |
|
|
i=0 |
|
|
for pkg in ${known_pkgs[@]}; do |
|
|
for pkg in ${known_pkgs[@]}; do |
|
|
if [[ $(echo $(dpkg -s ${pkg} &>/dev/null)$?) -eq 0 ]]; then |
|
|
if [[ $(echo $(dpkg -s ${pkg} &>/dev/null)$?) -eq 0 ]]; then |
|
|
local pkglist[$i]=${pkg} |
|
|
|
|
|
|
|
|
pkglist[$i]=${pkg} |
|
|
let i++ |
|
|
let i++ |
|
|
fi |
|
|
fi |
|
|
done |
|
|
done |
|
@ -293,9 +297,13 @@ fi |
|
|
|
|
|
|
|
|
function pkgcompilecheck() { |
|
|
function pkgcompilecheck() { |
|
|
|
|
|
|
|
|
local install_function=${1} |
|
|
|
|
|
local pkg=${2} |
|
|
|
|
|
local pkg_data=${3} |
|
|
|
|
|
|
|
|
local install_function |
|
|
|
|
|
local pkg |
|
|
|
|
|
local pkg_data |
|
|
|
|
|
|
|
|
|
|
|
install_function=${1} |
|
|
|
|
|
pkg=${2} |
|
|
|
|
|
pkg_data=${3} |
|
|
|
|
|
|
|
|
if [[ $(echo $(dpkg -s ${pkg} &>/dev/null)$?) -ne 0 ]] || [[ -v UPDATE_OVERRIDE ]]; then |
|
|
if [[ $(echo $(dpkg -s ${pkg} &>/dev/null)$?) -ne 0 ]] || [[ -v UPDATE_OVERRIDE ]]; then |
|
|
${install_function} ${pkg_data} |
|
|
${install_function} ${pkg_data} |
|
@ -312,7 +320,9 @@ function pkgcompilecheck() { |
|
|
|
|
|
|
|
|
function dxvk_install_custom() { |
|
|
function dxvk_install_custom() { |
|
|
|
|
|
|
|
|
local PATCHDIR="${1}" |
|
|
|
|
|
|
|
|
local PATCHDIR |
|
|
|
|
|
|
|
|
|
|
|
PATCHDIR="${1}" |
|
|
|
|
|
|
|
|
# Use posix alternates for MinGW binaries |
|
|
# Use posix alternates for MinGW binaries |
|
|
function dxvk_posixpkgs() { |
|
|
function dxvk_posixpkgs() { |
|
@ -346,15 +356,19 @@ function dxvk_install_custom() { |
|
|
# Add and apply custom DXVK patches |
|
|
# Add and apply custom DXVK patches |
|
|
function dxvk_custompatches() { |
|
|
function dxvk_custompatches() { |
|
|
|
|
|
|
|
|
|
|
|
local CURDIR |
|
|
|
|
|
local dxvk_builddir_name |
|
|
|
|
|
local dxvk_builddir_path |
|
|
|
|
|
|
|
|
# Get our current directory, since we will change it during patching process below |
|
|
# Get our current directory, since we will change it during patching process below |
|
|
# We want to go back here after having applied the patches |
|
|
# We want to go back here after having applied the patches |
|
|
local CURDIR="${PWD}" |
|
|
|
|
|
|
|
|
CURDIR="${PWD}" |
|
|
|
|
|
|
|
|
# Check if the following folder exists, and proceed. |
|
|
# Check if the following folder exists, and proceed. |
|
|
if [[ -d "${DXVKROOT}/../../${PATCHDIR}" ]]; then |
|
|
if [[ -d "${DXVKROOT}/../../${PATCHDIR}" ]]; then |
|
|
cp -r "${DXVKROOT}/../../${PATCHDIR}/"*.{patch,diff} "${DXVKROOT}/${pkg_name}/" 2>/dev/null |
|
|
cp -r "${DXVKROOT}/../../${PATCHDIR}/"*.{patch,diff} "${DXVKROOT}/${pkg_name}/" 2>/dev/null |
|
|
|
|
|
|
|
|
local dxvk_builddir_name=$(ls -l "${DXVKROOT}/${pkg_name}" | grep ^d | awk '{print $NF}') |
|
|
|
|
|
|
|
|
dxvk_builddir_name=$(ls -l "${DXVKROOT}/${pkg_name}" | grep ^d | awk '{print $NF}') |
|
|
|
|
|
|
|
|
# TODO Expecting just one folder here. This method doesn't work with multiple dirs present |
|
|
# 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 |
|
|
if [[ $(echo ${dxvk_builddir_name} | wc -l) -gt 1 ]]; then |
|
@ -362,7 +376,7 @@ function dxvk_install_custom() { |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
local dxvk_builddir_path="${DXVKROOT}/${pkg_name}/${dxvk_builddir_name}" |
|
|
|
|
|
|
|
|
dxvk_builddir_path="${DXVKROOT}/${pkg_name}/${dxvk_builddir_name}" |
|
|
|
|
|
|
|
|
cd "${dxvk_builddir_path}" |
|
|
cd "${dxvk_builddir_path}" |
|
|
for pfile in ../*.{patch,diff}; do |
|
|
for pfile in ../*.{patch,diff}; do |
|
@ -433,16 +447,21 @@ function compile_and_install_deb() { |
|
|
|
|
|
|
|
|
function arrayparser_reverse() { |
|
|
function arrayparser_reverse() { |
|
|
|
|
|
|
|
|
local arrays=( |
|
|
|
|
|
|
|
|
local arrays |
|
|
|
|
|
local s |
|
|
|
|
|
local IFS |
|
|
|
|
|
local y |
|
|
|
|
|
|
|
|
|
|
|
arrays=( |
|
|
'_pkg_deps_build' |
|
|
'_pkg_deps_build' |
|
|
'_pkg_deps_runtime' |
|
|
'_pkg_deps_runtime' |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
for w in ${arrays[@]}; do |
|
|
for w in ${arrays[@]}; do |
|
|
local s=\${${w}} |
|
|
|
|
|
|
|
|
s=\${${w}} |
|
|
|
|
|
|
|
|
local IFS='|' |
|
|
|
|
|
local y=0 |
|
|
|
|
|
|
|
|
IFS='|' |
|
|
|
|
|
y=0 |
|
|
|
|
|
|
|
|
for t in $(eval printf '%s\|' ${s}); do |
|
|
for t in $(eval printf '%s\|' ${s}); do |
|
|
eval ${w}[$y]=\"${t}\" |
|
|
eval ${w}[$y]=\"${t}\" |
|
@ -472,18 +491,27 @@ function compile_and_install_deb() { |
|
|
|
|
|
|
|
|
function pkg_dependencies() { |
|
|
function pkg_dependencies() { |
|
|
|
|
|
|
|
|
local _pkg_list="${1}" |
|
|
|
|
|
local _pkg_type="${2}" |
|
|
|
|
|
local IFS=$'\n' |
|
|
|
|
|
|
|
|
local _pkg_list |
|
|
|
|
|
local _pkg_type |
|
|
|
|
|
local _pkg_type_str |
|
|
|
|
|
local a |
|
|
|
|
|
local b |
|
|
|
|
|
local _validlist |
|
|
|
|
|
local IFS |
|
|
|
|
|
|
|
|
|
|
|
_pkg_list="${1}" |
|
|
|
|
|
_pkg_type="${2}" |
|
|
|
|
|
|
|
|
|
|
|
IFS=$'\n' |
|
|
_pkg_list=$(echo "${_pkg_list}" | sed 's/([^)]*)//g') |
|
|
_pkg_list=$(echo "${_pkg_list}" | sed 's/([^)]*)//g') |
|
|
unset IFS |
|
|
unset IFS |
|
|
|
|
|
|
|
|
case ${_pkg_type} in |
|
|
case ${_pkg_type} in |
|
|
buildtime) |
|
|
buildtime) |
|
|
local _pkg_type_str="build time" |
|
|
|
|
|
|
|
|
_pkg_type_str="build time" |
|
|
;; |
|
|
;; |
|
|
runtime) |
|
|
runtime) |
|
|
local _pkg_type_str="runtime" |
|
|
|
|
|
|
|
|
_pkg_type_str="runtime" |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
@ -492,10 +520,10 @@ function compile_and_install_deb() { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Generate a list of missing dependencies |
|
|
# Generate a list of missing dependencies |
|
|
local a=0 |
|
|
|
|
|
|
|
|
a=0 |
|
|
for p in ${_pkg_list[@]}; do |
|
|
for p in ${_pkg_list[@]}; do |
|
|
if [[ $(pkg_installcheck ${p})$? -eq 0 ]]; then |
|
|
if [[ $(pkg_installcheck ${p})$? -eq 0 ]]; then |
|
|
local _validlist[$a]=${p} |
|
|
|
|
|
|
|
|
_validlist[$a]=${p} |
|
|
let a++ |
|
|
let a++ |
|
|
|
|
|
|
|
|
# Global array to track installed build dependencies |
|
|
# Global array to track installed build dependencies |
|
@ -526,7 +554,7 @@ function compile_and_install_deb() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# Install missing dependencies, be informative |
|
|
# Install missing dependencies, be informative |
|
|
local b=0 |
|
|
|
|
|
|
|
|
b=0 |
|
|
for _pkg_dep in ${_validlist[@]}; do |
|
|
for _pkg_dep in ${_validlist[@]}; do |
|
|
echo -e "$(( $b + 1 ))/$(( ${#_validlist[*]} )) - Installing ${_pkg_name} ${_pkg_type_str} dependency ${_pkg_dep}" |
|
|
echo -e "$(( $b + 1 ))/$(( ${#_validlist[*]} )) - Installing ${_pkg_name} ${_pkg_type_str} dependency ${_pkg_dep}" |
|
|
|
|
|
|
|
@ -610,8 +638,11 @@ function compile_and_install_deb() { |
|
|
|
|
|
|
|
|
function pkg_override_debianfile() { |
|
|
function pkg_override_debianfile() { |
|
|
|
|
|
|
|
|
local contents=${1} |
|
|
|
|
|
local targetfile=${2} |
|
|
|
|
|
|
|
|
local contents |
|
|
|
|
|
local targetfile |
|
|
|
|
|
|
|
|
|
|
|
contents=${1} |
|
|
|
|
|
targetfile=${2} |
|
|
|
|
|
|
|
|
if [[ ${contents} != "empty" ]]; then |
|
|
if [[ ${contents} != "empty" ]]; then |
|
|
echo "${contents}" > "${targetfile}" |
|
|
echo "${contents}" > "${targetfile}" |
|
@ -749,8 +780,10 @@ function buildpkg_removal() { |
|
|
|
|
|
|
|
|
function pkg_install_main() { |
|
|
function pkg_install_main() { |
|
|
|
|
|
|
|
|
|
|
|
local pkg_datafile |
|
|
|
|
|
|
|
|
# Read necessary variables from debdata file |
|
|
# Read necessary variables from debdata file |
|
|
local pkg_datafile=${1} |
|
|
|
|
|
|
|
|
pkg_datafile=${1} |
|
|
|
|
|
|
|
|
if [[ -f ${pkg_datafile} ]]; then |
|
|
if [[ -f ${pkg_datafile} ]]; then |
|
|
source ${pkg_datafile} |
|
|
source ${pkg_datafile} |
|
@ -765,7 +798,12 @@ function pkg_install_main() { |
|
|
# Separate each array index with | in these arrays |
|
|
# Separate each array index with | in these arrays |
|
|
function pkg_arrayparser() { |
|
|
function pkg_arrayparser() { |
|
|
|
|
|
|
|
|
local pkg_arrays=( |
|
|
|
|
|
|
|
|
local pkg_arrays |
|
|
|
|
|
local IFS |
|
|
|
|
|
local s |
|
|
|
|
|
local t |
|
|
|
|
|
|
|
|
|
|
|
pkg_arrays=( |
|
|
'pkg_deps_build' |
|
|
'pkg_deps_build' |
|
|
'pkg_deps_runtime' |
|
|
'pkg_deps_runtime' |
|
|
) |
|
|
) |
|
@ -774,8 +812,8 @@ function pkg_install_main() { |
|
|
|
|
|
|
|
|
for w in ${pkg_arrays[@]}; do |
|
|
for w in ${pkg_arrays[@]}; do |
|
|
|
|
|
|
|
|
local s=\${${w}[@]} |
|
|
|
|
|
local t=$(eval printf '%s\|' ${s}) |
|
|
|
|
|
|
|
|
s=\${${w}[@]} |
|
|
|
|
|
t=$(eval printf '%s\|' ${s}) |
|
|
unset ${w} |
|
|
unset ${w} |
|
|
eval ${w}=\"${t}\" |
|
|
eval ${w}=\"${t}\" |
|
|
|
|
|
|
|
|