22 Commits

Author SHA1 Message Date
  Pekka Helenius 65555e9520 Update README 1 year ago
  Pekka Helenius 868019aaab [Debian] minor style fixes 1 year ago
  Pekka Helenius b2202ff6ad [Debian] Update DXVK NVAPI debdata file 1 year ago
  Pekka Helenius 9aec924b26 [Debian] Restructure Wine addons install script. Partial re-implementation 1 year ago
  Pekka Helenius 341c0ae588 [Debian] Specify LDFLAGS for Wine addons 1 year ago
  Pekka Helenius 6cecbe9671 [Debian] Minor syntax update 1 year ago
  Pekka Helenius e66e7057bc [Debian] Fix build time deps check logic; other improvements 1 year ago
  Pekka Helenius 5ba73473fa Update options.conf: set meson commit to HEAD; fix Debian source URLs 1 year ago
  Pekka Helenius 94d1380f01 [Debian] Update scripts. Add support to VKD3D Proton & DXVK NVAPI 1 year ago
  Pekka Helenius 2f2f17cb44 Add debian-specific variables 1 year ago
  Pekka Helenius 66f0b180e8 [Arch] Update updatewine_arch script 1 year ago
  Pekka Helenius 8aa4c87fb1 [Arch] Fetch pkg additional files from extra_files dir 1 year ago
  Pekka Helenius b4f621e531 Add missing envvars 1 year ago
  Pekka Helenius 73725a8b08 Update README 1 year ago
  Pekka Helenius f2211ba565 Add missing disabled_patches dirs 1 year ago
  Pekka Helenius b7d61a2e0c [Arch] Add DXVK NVAPI package (Nvidia NVAPI) 1 year ago
  Pekka Helenius 6086897345 [Arch] Fix DXVK & VKD3D Proton path references again 1 year ago
  Pekka Helenius 6e23b741d2 [Arch] Change DXVK & VKD3D Proton PKGBUILD build() workdir 1 year ago
  Pekka Helenius 6b437a46a4 [Arch] Fix DXVK & VKD3D Proton path references 1 year ago
  Pekka Helenius f4a6102f91 [Arch/wine] Remove obsolete sed replace operation 1 year ago
  Pekka Helenius dc18887dac [Arch] Add VKD3D Proton package (DX12) 1 year ago
  Pekka Helenius b1e486c3c3 [Arch/DXVK] Update pkgver() regex replace pattern 1 year ago
23 changed files with 1611 additions and 299 deletions
Unified View
  1. +113
    -38
      README.md
  2. +8
    -4
      arch/0-dxvk-git/PKGBUILD
  3. +112
    -0
      arch/0-dxvk-nvapi-git/PKGBUILD
  4. +102
    -0
      arch/0-vkd3d-proton-git/PKGBUILD
  5. +0
    -1
      arch/0-wine-staging-git/PKGBUILD
  6. +149
    -24
      arch/updatewine_arch.sh
  7. +14
    -12
      debian/debdata/dxvk.debdata
  8. +189
    -0
      debian/debdata/dxvk_nvapi.debdata
  9. +1
    -1
      debian/debdata/glslang.debdata
  10. +1
    -1
      debian/debdata/meson.debdata
  11. +184
    -0
      debian/debdata/vkd3d_proton.debdata
  12. +30
    -17
      debian/playonlinux_prefixupdate.sh
  13. +40
    -21
      debian/updatewine_debian.sh
  14. +378
    -142
      debian/wine_addons_root/wine_addons_build.sh
  15. +13
    -13
      debian/wineroot/winebuild.sh
  16. +4
    -4
      debian_cleanup_devpkgs.sh
  17. +4
    -0
      dxvk-nvapi_custom_patches/put_your_dxvk-nvapi_patches_here
  18. +0
    -0
      dxvk-nvapi_disabled_patches/put_disabled_dxvk-nvapi_patches_here
  19. +201
    -0
      extra_files/dxvk-nvapi/setup_dxvk_nvapi.sh
  20. +23
    -6
      options.conf
  21. +41
    -15
      updatewine.sh
  22. +4
    -0
      vkd3d-proton_custom_patches/put_your_vkd3d-proton_patches_here
  23. +0
    -0
      vkd3d-proton_disabled_patches/put_disabled_vkd3d-proton_patches_here

+ 113
- 38
README.md View File

@ -1,8 +1,8 @@
# Wine/Wine Staging + DXVK package builder & auto-installer
# Wine/Wine Staging, DXVK, DXVK NVAPI, VKD3D Proton package bundle builder & auto-installer
![](https://i.imgur.com/5WCPioZ.png) ![](https://i.imgur.com/5WCPioZ.png)
Boost up your Wine experience with a taste of DXVK and automate installation of [DXVK](https://github.com/doitsujin/dxvk) + [Wine](https://www.winehq.org/)/[Wine Staging](https://github.com/wine-staging/wine-staging/) on Debian/Ubuntu/Mint/Arch Linux/Manjaro. Additionally, update your GPU drivers + PlayonLinux wineprefixes to use the latest Wine & DXVK combination available.
Boost up your Wine experience with a taste of DXVK and automate installation of [DXVK](https://github.com/doitsujin/dxvk), [VKD3D Proton](https://github.com/HansKristian-Work/vkd3d-proton), [DXVK NVAPI](https://github.com/jp7677/dxvk-nvapi) & [Wine](https://www.winehq.org/)/[Wine Staging](https://github.com/wine-staging/wine-staging/) on Debian/Ubuntu/Mint/Arch Linux/Manjaro. Additionally, update your GPU drivers + PlayonLinux wineprefixes to use the latest Wine & DXVK combination available.
## About ## About
@ -102,6 +102,10 @@ All supported arguments are:
- `--no-dxvk` = Do not compile or install DXVK - `--no-dxvk` = Do not compile or install DXVK
- `--no-vkd3d` = Do not compile or install VKD3D Proton
- `--no-nvapi` = Do not compile or install DXVK NVAPI
- `--no-pol` = Do not update current user's PlayOnLinux Wine prefixes - `--no-pol` = Do not update current user's PlayOnLinux Wine prefixes
### Force/Lock package versions ### Force/Lock package versions
@ -114,11 +118,11 @@ This is handy if you encounter issues during package compilation (DXVK/glslang o
- Git commit: - Git commit:
- `git_commithash_dxvk`, `git_commithash_wine`, `git_commithash_glslang`, `git_commithash_meson`
- `git_commithash_vkd3dproton`, `git_commithash_dxvknvapi`, `git_commithash_dxvk`, `git_commithash_wine`, `git_commithash_glslang`, `git_commithash_meson`
- Git branch: - Git branch:
- `git_branch_dxvk`, `git_branch_wine`, `git_branch_glslang`, `git_branch_meson`
- `git_branch_vkd3dproton`, `git_branch_dxvknvapi`, `git_branch_dxvk`, `git_branch_wine`, `git_branch_glslang`, `git_branch_meson`
**These settings apply only on Debian/Ubuntu/Mint:** **These settings apply only on Debian/Ubuntu/Mint:**
@ -136,7 +140,19 @@ Each variable applies values which must be match package git commit tree. The va
- **A)** 40 characters long commit hash. Use this if you want this commit to be the latest to be used in package compilation, not anything after it. - **A)** 40 characters long commit hash. Use this if you want this commit to be the latest to be used in package compilation, not anything after it.
- defined in git commit tree: [DXVK commit tree](https://github.com/doitsujin/dxvk/commits/master), [Wine commit tree](https://source.winehq.org/git/wine.git/) (or [GitHub mirror](https://github.com/wine-mirror/wine)), [glslang commit tree](https://github.com/KhronosGroup/glslang/commits/master), [meson commit tree](https://github.com/mesonbuild/meson/commits/master)
- defined in git commit trees:
- [VKD3D Proton commit tree](https://github.com/HansKristian-Work/vkd3d-proton/commits/master)
- [DXVK NVAPI commit tree](https://github.com/jp7677/dxvk-nvapi/commits/master)
- [DXVK commit tree](https://github.com/doitsujin/dxvk/commits/master)
- [Wine commit tree](https://source.winehq.org/git/wine.git/) (or [GitHub mirror](https://github.com/wine-mirror/wine))
- [glslang commit tree](https://github.com/KhronosGroup/glslang/commits/master)
- [meson commit tree](https://github.com/mesonbuild/meson/commits/master)
- You can obtain proper hash by opening the commit. Hash syntax is: `654544e96bfcd1bbaf4a0fc639ef655299276a39` etc... - You can obtain proper hash by opening the commit. Hash syntax is: `654544e96bfcd1bbaf4a0fc639ef655299276a39` etc...
@ -168,11 +184,23 @@ Since Debian doesn't provide winetricks package on official repositories, it is
---------------- ----------------
## Custom patches for Wine & DXVK
## Custom patches for Wine, DXVK, DXVK NVAPI & VKD3D Proton
You can apply your own patches for DXVK & Wine by dropping valid `.patch` or `.diff` files into the following folders:
- VKD3D Proton: `vkd3d-proton_custom_patches`
- DXVK NVAPI: `dxvk-nvapi_custom_patches`
You can apply your own patches for DXVK & Wine by dropping valid `.patch` or `.diff` files into `dxvk_custom_patches` (DXVK) or `wine_custom_patches` (Wine) folder.
- DXVK: `dxvk_custom_patches`
Folders `dxvk_disabled_patches` and `wine_disabled_patches` are just for management purposes, they do not have a role in script logic at all.
- Wine: `wine_custom_patches`
Only patch files prefixed with `.diff` or `.patch` are applied.
## Disabled patches
Folders `vkd3d-proton_disabled_patches`, `dxvk-nvapi_disabled_patches`, `dxvk_disabled_patches` and `wine_disabled_patches` are just for management purposes, they do not have a role in script logic at all.
Wine patches are not related to Wine Staging patchset. You can use your custom Wine patches either with Wine Staging or vanilla Wine. Wine patches are not related to Wine Staging patchset. You can use your custom Wine patches either with Wine Staging or vanilla Wine.
@ -200,10 +228,32 @@ The actual subfolders which hold compiled programs are generated according to bu
**NOTE:** DXVK must be installed before applying these steps. **NOTE:** DXVK must be installed before applying these steps.
To enable DXVK on existing wineprefixes, just run
To enable DXVK on an existing wineprefix, run
```
WINEPREFIX=/path/to/my/wineprefix setup_dxvk install --symlink
```
## DXVK NVAPI usage
**NOTE:** DXVK & DXVK NVAPI must be installed before applying these steps.
**NOTE:** DXVK NVAPI requires DXVK to be installed on the same wineprefix. Therefore you need to apply `setup_dxvk` _before_ `setup_dxvk_nvapi` to the target wineprefix.
Once you have applied `setup_dxvk` to your wineprefix, apply `setup_dxvk_nvapi`, as well. Run
```
WINEPREFIX=/path/to/my/wineprefix setup_dxvk_nvapi install --symlink
```
## VKD3D Proton usage
**NOTE:** VKD3D Proton must be installed before applying these steps.
To enable VKD3D Proton on an existing wineprefix, run
``` ```
WINEPREFIX=/path/to/my/wineprefix setup_dxvk
WINEPREFIX=/path/to/my/wineprefix setup_vkd3d_proton install --symlink
``` ```
## Add DXVK to PlayOnLinux Wine prefixes ## Add DXVK to PlayOnLinux Wine prefixes
@ -211,10 +261,24 @@ WINEPREFIX=/path/to/my/wineprefix setup_dxvk
To install DXVK on specific PlayOnLinux wineprefix which uses a different than `system` version of Wine, apply the following command syntax: To install DXVK on specific PlayOnLinux wineprefix which uses a different than `system` version of Wine, apply the following command syntax:
``` ```
WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/myprefix" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/wineversion/bin" setup_dxvk
WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/<myprefix>" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/<wineversion>/bin" setup_dxvk install --symlink
```
With the same logic, you can install DXVK NVAPI and VKD3D Proton, as well.
### DXVK NVAPI
```
WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/<myprefix>" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/<wineversion>/bin" setup_dxvk_nvapi install --symlink
```
### VKD3D Proton
```
WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/<myprefix>" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/<wineversion>/bin" setup_vkd3d_proton install --symlink
``` ```
where you need to set either `linux-amd64` or `linux-x86`, and `wineversion` + `myprefix` to match real ones, obviously.
You need to set either `linux-amd64` or `linux-x86`, and `wineversion` + `myprefix` to match real ones, obviously.
### Manually uninstall temporary development packages (Debian/Ubuntu/Mint): ### Manually uninstall temporary development packages (Debian/Ubuntu/Mint):
@ -230,41 +294,45 @@ bash debian_cleanup_devpkgs.sh
### EXAMPLES: ### EXAMPLES:
**NOTE:** If `--no-install` option is given, the script doesn't check for PlayOnLinux Wine prefixes.
**NOTE:** If `--no-install` or `--no-pol` option is given, the script doesn't check for PlayOnLinux Wine prefixes. `--no-install` additionally skips system-wide installation of compiled packages.
**NOTE:** PlayOnLinux Wine prefixes are checked for current user only. **NOTE:** PlayOnLinux Wine prefixes are checked for current user only.
**1)** Compile Wine Staging & DXVK, and make installable packages for them. Install the packages:
**1)** Compile Wine Staging, DXVK, DXVK NVAPI & VKD3D Proton, and make installable packages for them. Install the packages:
`bash updatewine.sh` `bash updatewine.sh`
**2)** Compile DXVK and make an installable package for it. Do not install:
**2)** Compile DXVK, DXVK NVAPI & VKD3D Proton and make an installable package for them. Do not install these packages.
`bash updatewine.sh --no-wine --no-install` `bash updatewine.sh --no-wine --no-install`
**3)** Compile Wine Staging and make an installable package for it. Do not install:
**3)** Compile and install VKD3D Proton only. Do not install it.
`bash updatewine.sh --no-dxvk --no-install`
`bash updatewine.sh --no-wine --no-dxvk --no-nvapi --no-install`
**4)** Compile Wine and make an installable package for it. Do not install:
**4)** Compile Wine Staging and VKD3D Proton, and make an installable package for them. Do not install them.
`bash updatewine.sh --no-staging --no-dxvk --no-install`
`bash updatewine.sh --no-dxvk --no-nvapi --no-install`
**5)** Compile Wine & DXVK, and make installable packages for them. Do not install:
**5)** Compile vanilla Wine and make an installable package for it. Do not install it.
`bash updatewine.sh --no-staging --no-install`
`bash updatewine.sh --no-staging --no-dxvk --no-nvapi --no-vkd3d --no-install`
**6)** Compile Wine Staging & DXVK, and make installable packages for them. Do not install:
**6)** Compile vanilla Wine, DXVK & DXVK NVAPI, and make installable packages for them. Do not install them.
`bash updatewine.sh --no-install`
`bash updatewine.sh --no-staging --no-vkd3d --no-install`
**7)** Compile Wine & DXVK, and make installable packages for them. Install the packages:
**6)** Compile Wine Staging & DXVK, and make installable packages for them. Do not install them.
`bash updatewine.sh --no-staging`
`bash updatewine.sh --no-nvapi --no-vkd3d --no-install`
**8)** Compile Wine, and make an installable package for it. Install the package, do not check PlayOnLinux wineprefixes:
**7)** Compile vanilla Wine & DXVK, and make installable packages for them. Install the packages.
`bash updatewine.sh --no-staging --no-dxvk --no-pol`
`bash updatewine.sh --no-staging --no-nvapi --no-vkd3d`
**8)** Compile vanilla Wine & VKD3D Proton, and make an installable package for them. Install the packages, do not check PlayOnLinux wineprefixes.
`bash updatewine.sh --no-staging --no-nvapi --no-dxvk --no-pol`
---------------- ----------------
@ -300,21 +368,28 @@ The following section contains important notes about the script usage.
Runtime test done for the script to ensure it works as expected. Occasional test-runs are mandatory due to rapid development of the packages (Wine/DXVK) it handles. Runtime test done for the script to ensure it works as expected. Occasional test-runs are mandatory due to rapid development of the packages (Wine/DXVK) it handles.
**Latest test-run:** 29th July, 2020
**Linux Distributions:**
- Success: Arch Linux 64-bit, Xubuntu 20.04 LTS 64-bit
- Failure: N/A
#### Failure reasons:
```
Compilation & installation status
2th November, 2022
Distribution | Package Status
-----------------------------------------
Arch Linux | vkd3d-proton | Success
| wine | Success
| dxvk | Success
| dxvk-nvapi | Success
_____________|____________________|
Linux Mint | vkd3d-proton | Success
| wine | Success
| dxvk | Build failure. Too old MinGW available (>= 11 required)
| dxvk-nvapi | Build failure. Failure with directx-headers-dev
N/A
```
#### Notes: #### Notes:
N/A
Linux Mint build failures are likely trivial to fix with custom patches.
--------------------------- ---------------------------


+ 8
- 4
arch/0-dxvk-git/PKGBUILD View File

@ -89,12 +89,13 @@ prepare() {
# Retrieve DXVK version tag # Retrieve DXVK version tag
pkgver() { pkgver() {
cd "${pkgname}" cd "${pkgname}"
printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./; s/[a-z]//g')
printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')
} }
# Launch DXVK build script # Launch DXVK build script
build() { build() {
"${srcdir}/${pkgname}"/package-release.sh ${pkgver} "${srcdir}"/build --no-package
cd "${pkgname}"
./package-release.sh ${pkgver} "${srcdir}"/build --no-package
} }
# Bundle the compiled files # Bundle the compiled files
@ -102,8 +103,11 @@ package() {
mkdir -p "${pkgdir}"/usr/{bin,share/dxvk} mkdir -p "${pkgdir}"/usr/{bin,share/dxvk}
cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/" cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk/"
echo -e "#!/bin/sh\n/usr/share/dxvk/setup_dxvk.sh \${@}" \
> "${pkgdir}/usr/bin/setup_dxvk"
echo -e "#!/bin/sh" > "${pkgdir}/usr/bin/setup_dxvk"
echo -e "
cd /usr/share/dxvk/
./setup_dxvk.sh \${@}
" >> "${pkgdir}/usr/bin/setup_dxvk"
chmod +x "${pkgdir}/usr/bin/setup_dxvk" chmod +x "${pkgdir}/usr/bin/setup_dxvk"
} }

+ 112
- 0
arch/0-dxvk-nvapi-git/PKGBUILD View File

@ -0,0 +1,112 @@
# Maintainer: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
# Override /etc/makepkg.conf PKGDEST variable if it's enabled
PKGDEST="${PWD}"
pkgname=dxvk-nvapi-git
_pkgname=dxvk-nvapi
pkgver=580.6268
pkgrel=1
pkgdesc="Alternative NVAPI implementation on top of DXVK."
url="https://github.com/jp7677/dxvk-nvapi"
license=('MIT')
arch=('x86_64')
conflicts=(
'dxvk-nvapi'
)
depends=('dxvk' 'wine' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
makedepends=(
'ninja'
'meson>=0.49'
'glslang'
'mingw-w64-gcc'
'git'
'wine'
'python'
)
_dxvknvapi_gitsrc=
_git_branch_dxvknvapi=master
_dxvknvapi_commit=HEAD
provides=('dxvk-nvapi')
options=(!strip !buildflags staticlibs)
source=(
${pkgname}::"${_dxvknvapi_gitsrc}#commit=${_dxvknvapi_commit}"
'setup_dxvk_nvapi.sh'
)
sha256sums=(
'SKIP'
'e2ff99af4ecb739629e0f873077f986cffcc9418c8ecb7e6040744f05110afbb'
)
##############################
# Copy custom patches to correct location
if [[ $(find "${startdir}/dxvk-nvapi-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
cp -r "${startdir}/dxvk-nvapi-patches/"*.{patch,diff} "${startdir}"/
p=0
for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
patches[$p]="$(basename ${patch})"
let p++
done
unset p
source+=(${source[@]} ${patches[@]})
fi
# Reset git tree and apply custom patches
prepare() {
cd "${srcdir}/dxvk-nvapi-git"
git checkout ${_git_branch_dxvknvapi}
git reset --hard ${_dxvknvapi_commit} # Restore tracked files
git clean -d -x -f # Delete untracked files
git submodule update --init --recursive
# Apply patches, if present
if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
# Apply all custom patches
msg2 "Applying custom patches..."
for i in "${srcdir}"/*.{patch,diff}; do
if [[ -f ${i} ]]; then
patch -Np1 < ${i}
fi
done
fi
}
##############################
# Retrieve DXVK NVAPI version tag
pkgver() {
cd "${pkgname}"
printf '%s.%s' $(git rev-list --count HEAD) $(git rev-parse --short HEAD | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')
}
# Launch DXVK NVAPI build script
build() {
cd "${pkgname}"
./package-release.sh ${pkgver} "${srcdir}"/build
}
# Bundle the compiled files
package() {
mkdir -p "${pkgdir}"/usr/{bin,share/dxvk_nvapi}
cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/dxvk_nvapi/"
cp "${srcdir}"/setup_dxvk_nvapi.sh "${pkgdir}/usr/share/dxvk_nvapi/"
echo -e "#!/bin/sh" > "${pkgdir}/usr/bin/setup_dxvk_nvapi"
echo -e "
cd /usr/share/dxvk_nvapi/
./setup_dxvk_nvapi.sh \${@}
" >> "${pkgdir}/usr/bin/setup_dxvk_nvapi"
chmod +x "${pkgdir}/usr/share/dxvk_nvapi/setup_dxvk_nvapi.sh"
chmod +x "${pkgdir}/usr/bin/setup_dxvk_nvapi"
}

+ 102
- 0
arch/0-vkd3d-proton-git/PKGBUILD View File

@ -0,0 +1,102 @@
# Maintainer: Pekka Helenius (~Fincer) <fincer89 at hotmail dot com>
# Override /etc/makepkg.conf PKGDEST variable if it's enabled
PKGDEST="${PWD}"
pkgname=vkd3d-proton-git
_pkgname=vkd3d-proton
pkgver=3.1.1.2967
pkgrel=1
pkgdesc="Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation."
url="https://github.com/HansKristian-Work/vkd3d-proton"
license=('LGPL2.1')
arch=('x86_64')
conflicts=(
'vkd3d-proton'
)
depends=('wine' 'vulkan-icd-loader' 'lib32-vulkan-icd-loader')
makedepends=(
'ninja'
'meson>=0.49'
'glslang'
'mingw-w64-gcc'
'git'
'wine'
)
_vkd3d_gitsrc=
_git_branch_vkd3d=master
_vkd3d_commit=HEAD
provides=('vkd3d-proton')
options=(!strip !buildflags staticlibs)
source=(${pkgname}::"${_vkd3d_gitsrc}#commit=${_vkd3d_commit}")
sha256sums=('SKIP')
##############################
# Copy custom patches to correct location
if [[ $(find "${startdir}/vkd3d-proton-patches" -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$") ]]; then
cp -r "${startdir}/vkd3d-proton-patches/"*.{patch,diff} "${startdir}"/
p=0
for patch in $(find . -mindepth 1 -maxdepth 1 -regex ".*\.\(patch\|diff\)$"); do
patches[$p]="$(basename ${patch})"
let p++
done
unset p
source+=(${source[@]} ${patches[@]})
fi
# Reset git tree and apply custom patches
prepare() {
cd "${srcdir}/vkd3d-proton-git"
git checkout ${_git_branch_vkd3d}
git reset --hard ${_vkd3d_commit} # Restore tracked files
git clean -d -x -f # Delete untracked files
git submodule update --init --recursive
# Apply patches, if present
if [[ $(ls "${srcdir}"/*.{patch,diff} 2>/dev/null | wc -w) -ne 0 ]]; then
# Apply all custom patches
msg2 "Applying custom patches..."
for i in "${srcdir}"/*.{patch,diff}; do
if [[ -f ${i} ]]; then
patch -Np1 < ${i}
fi
done
fi
}
##############################
# Retrieve VKD3D version tag
pkgver() {
cd "${pkgname}"
printf '%s' $(git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')
}
# Launch VKD3D build script
build() {
cd "${pkgname}"
./package-release.sh ${pkgver} "${srcdir}"/build --no-package
}
# Bundle the compiled files
package() {
mkdir -p "${pkgdir}"/usr/{bin,share/vkd3d_proton}
cp -r "${srcdir}"/build/${_pkgname}-${pkgver}/* "${pkgdir}/usr/share/vkd3d_proton/"
echo -e "#!/bin/sh" > "${pkgdir}/usr/bin/setup_vkd3d_proton"
echo -e "
cd /usr/share/vkd3d_proton/
./setup_vkd3d_proton.sh \${@}
" >> "${pkgdir}/usr/bin/setup_vkd3d_proton"
chmod +x "${pkgdir}/usr/bin/setup_vkd3d_proton"
}

+ 0
- 1
arch/0-wine-staging-git/PKGBUILD View File

@ -162,7 +162,6 @@ if [[ -d ${PWD}/wine-patches ]]; then
fi fi
if [[ enable_staging -eq 1 ]]; then if [[ enable_staging -eq 1 ]]; then
_staging_gitsrc=$(echo ${_staging_gitsrc} | sed 's/^git/git+https/')
stagingsrc=wine-staging-git::"${_staging_gitsrc}#commit=${_staging_commit}" stagingsrc=wine-staging-git::"${_staging_gitsrc}#commit=${_staging_commit}"
source+=($stagingsrc) source+=($stagingsrc)
fi fi


+ 149
- 24
arch/updatewine_arch.sh View File

@ -45,15 +45,21 @@ done
# array in ../updatewine.sh, make sure to update these # array in ../updatewine.sh, make sure to update these
# variables! # variables!
# #
git_commithash_dxvk=${params[0]}
git_commithash_wine=${params[3]}
git_branch_dxvk=${params[4]}
git_branch_wine=${params[7]}
git_source_dxvk=${params[8]}
git_source_wine=${params[11]}
git_source_winestaging=${params[12]}
git_commithash_dxvknvapi=${params[0]}
git_commithash_vkd3dproton=${params[1]}
git_commithash_dxvk=${params[2]}
git_commithash_wine=${params[5]}
git_branch_dxvknvapi=${params[6]}
git_branch_vkd3dproton=${params[7]}
git_branch_dxvk=${params[8]}
git_branch_wine=${params[11]}
git_source_dxvknvapi=${params[12]}
git_source_vkd3dproton=${params[13]}
git_source_dxvk=${params[14]}
git_source_wine=${params[17]}
git_source_winestaging=${params[18]}
######################################################## ########################################################
@ -65,7 +71,7 @@ git_source_winestaging=${params[12]}
# Filter all but <args>, i.e. the first 0-4 arguments # Filter all but <args>, i.e. the first 0-4 arguments
i=0 i=0
for arg in ${params[@]:8}; do
for arg in ${params[@]:24}; do
args[$i]="${arg}" args[$i]="${arg}"
let i++ let i++
done done
@ -87,6 +93,12 @@ for check in ${args[@]}; do
--no-dxvk) --no-dxvk)
NO_DXVK= NO_DXVK=
;; ;;
--no-vkd3d)
NO_VKD3D=
;;
--no-nvapi)
NO_NVAPI=
;;
--no-pol) --no-pol)
NO_POL= NO_POL=
;; ;;
@ -106,6 +118,15 @@ dxvk_wine_cleanlist=('*.patch' '*.diff' 'pkg' 'src' '*-patches' '*.tar.xz' '*.si
function cleanUp() { function cleanUp() {
rm -rf ${ARCH_BUILDROOT}/*/{$(echo "${dxvk_wine_cleanlist[@]}" | tr ' ' ',')} rm -rf ${ARCH_BUILDROOT}/*/{$(echo "${dxvk_wine_cleanlist[@]}" | tr ' ' ',')}
files_compiled_pkg_subdir=( $(find ${ARCH_BUILDROOT}/compiled_pkg/"${datedir}" -type f 2>/dev/null) )
if [[ ${#files_compiled_pkg_subdir[@]} -eq 0 ]]; then
rm -rf ${ARCH_BUILDROOT}/compiled_pkg/"${datedir}"
fi
[[ ${1} == "_exit" ]] && exit 0
} }
# Allow interruption of the script at any time (Ctrl + C) # Allow interruption of the script at any time (Ctrl + C)
@ -129,23 +150,29 @@ function checkFiles() {
local wine_files local wine_files
local dxvk_files local dxvk_files
local vkd3dproton_files
local dxvknvapi_files
wine_files=('30-win32-aliases.conf' 'PKGBUILD') wine_files=('30-win32-aliases.conf' 'PKGBUILD')
dxvk_files=('PKGBUILD') dxvk_files=('PKGBUILD')
vkd3dproton_files=('PKGBUILD')
dxvknvapi_files=('PKGBUILD' 'setup_dxvk_nvapi.sh')
function validatefiles() { function validatefiles() {
local list local list
local name local name
local path local path
local extra_files_path
list=${1} list=${1}
name=${2} name=${2}
path=${3} path=${3}
extra_files_path=${4}
for file in ${list[@]}; do for file in ${list[@]}; do
if [[ ! -f "${path}/${file}" ]]; then
echo -e "\e[1mERROR:\e[0m Could not locate file ${} for ${name}. Aborting\n"
if [[ ! -f "${path}/${file}" ]] && [[ ! -f ${extra_files_path}/${file} ]]; then
echo -e "\e[1mERROR:\e[0m Could not locate file ${file} for ${name}. Aborting\n"
exit 1 exit 1
fi fi
done done
@ -153,11 +180,19 @@ function checkFiles() {
} }
if [[ ! -v NO_WINE ]]; then if [[ ! -v NO_WINE ]]; then
validatefiles "${wine_files[*]}" Wine "${ARCH_BUILDROOT}/0-wine-staging-git"
validatefiles "${wine_files[*]}" Wine "${ARCH_BUILDROOT}/0-wine-staging-git" "${ARCH_BUILDROOT}/../extra_files/wine"
fi fi
if [[ ! -v NO_DXVK ]]; then if [[ ! -v NO_DXVK ]]; then
validatefiles "${dxvk_files[*]}" DXVK "${ARCH_BUILDROOT}/0-dxvk-git"
validatefiles "${dxvk_files[*]}" DXVK "${ARCH_BUILDROOT}/0-dxvk-git" "${ARCH_BUILDROOT}/../extra_files/dxvk"
fi
if [[ ! -v NO_VKD3D ]]; then
validatefiles "${vkd3dproton_files[*]}" "VKD3D Proton" "${ARCH_BUILDROOT}/0-vkd3d-proton-git" "${ARCH_BUILDROOT}/../extra_files/vkd3d-proton"
fi
if [[ ! -v NO_NVAPI ]]; then
validatefiles "${dxvknvapi_files[*]}" "DXVK NVAPI" "${ARCH_BUILDROOT}/0-dxvk-nvapi-git" "${ARCH_BUILDROOT}/../extra_files/dxvk-nvapi"
fi fi
} }
@ -263,12 +298,17 @@ $(for o in ${errpkgs[@]}; do printf '%s\n' ${o}; done)\
function prepare_env() { function prepare_env() {
# Remove old Wine & DXVK patch files
rm -rf ${ARCH_BUILDROOT}/0-wine-staging-git/wine-patches
rm -rf ${ARCH_BUILDROOT}/0-dxvk-git/dxvk-patches
# Remove old Wine & DXVK subdirectories
find ${ARCH_BUILDROOT}/0-wine-staging-git -mindepth 1 -type d -exec rm -rf {} 2> /dev/null \;
find ${ARCH_BUILDROOT}/0-dxvk-git -mindepth 1 -type d -exec rm -rf {} 2> /dev/null \;
find ${ARCH_BUILDROOT}/0-vkd3d-proton-git -mindepth 1 -type d -exec rm -rf {} 2> /dev/null \;
find ${ARCH_BUILDROOT}/0-dxvk-nvapi-git -mindepth 1 -type d -exec rm -rf {} 2> /dev/null \;
# Add empty patch directories
mkdir -p ${ARCH_BUILDROOT}/0-wine-staging-git/wine-patches mkdir -p ${ARCH_BUILDROOT}/0-wine-staging-git/wine-patches
mkdir -p ${ARCH_BUILDROOT}/0-dxvk-git/dxvk-patches mkdir -p ${ARCH_BUILDROOT}/0-dxvk-git/dxvk-patches
mkdir -p ${ARCH_BUILDROOT}/0-vkd3d-proton-git/vkd3d-proton-patches
mkdir -p ${ARCH_BUILDROOT}/0-dxvk-nvapi-git/dxvk-nvapi-patches
# Copy new Wine & DXVK patch files # Copy new Wine & DXVK patch files
find ${ARCH_BUILDROOT}/../wine_custom_patches \ find ${ARCH_BUILDROOT}/../wine_custom_patches \
@ -277,7 +317,16 @@ function prepare_env() {
find ${ARCH_BUILDROOT}/../dxvk_custom_patches \ find ${ARCH_BUILDROOT}/../dxvk_custom_patches \
-mindepth 1 -maxdepth 1 -type f \( -iname "*.patch" -or -iname "*.diff" \) \ -mindepth 1 -maxdepth 1 -type f \( -iname "*.patch" -or -iname "*.diff" \) \
-exec cp {} ${ARCH_BUILDROOT}/0-dxvk-git/dxvk-patches \;
-exec cp {} ${ARCH_BUILDROOT}/0-dxvk-git/dxvk-patches/ \;
find ${ARCH_BUILDROOT}/../vkd3d-proton_custom_patches \
-mindepth 1 -maxdepth 1 -type f \( -iname "*.patch" -or -iname "*.diff" \) \
-exec cp {} ${ARCH_BUILDROOT}/0-vkd3d-proton-git/vkd3d-proton-patches/ \;
find ${ARCH_BUILDROOT}/../dxvk-nvapi_custom_patches \
-mindepth 1 -maxdepth 1 -type f \( -iname "*.patch" -or -iname "*.diff" \) \
-exec cp {} ${ARCH_BUILDROOT}/0-dxvk-nvapi-git/dxvk-nvapi-patches/ \;
# Create identifiable directory for this build # Create identifiable directory for this build
mkdir -p ${ARCH_BUILDROOT}/compiled_pkg/"${datedir}" mkdir -p ${ARCH_BUILDROOT}/compiled_pkg/"${datedir}"
@ -404,6 +453,26 @@ function check_gitOverride_wine() {
########################################################### ###########################################################
# Fetch extra package files
function fetch_extra_pkg_files() {
local pkgname
local pkgdir
local extra_files_dir
pkgname=${1}
pkgdir=${2}
extra_files_dir="${ARCH_BUILDROOT}/../extra_files/${pkgname}"
if [[ -d ${extra_files_dir} ]]; then
find ${extra_files_dir} -mindepth 1 -maxdepth 1 -type f -exec cp -f {} "${ARCH_BUILDROOT}/${pkgdir}/" \;
fi
}
###########################################################
# Build & install package # Build & install package
function build_pkg() { function build_pkg() {
@ -419,11 +488,13 @@ function build_pkg() {
pkgdir=${3} pkgdir=${3}
cleanlist=${4} cleanlist=${4}
# Fetch extra files if any defined
fetch_extra_pkg_files ${pkgname} ${pkgdir}
# Create package and install it to the system # Create package and install it to the system
# We need to download git sources beforehand in order # We need to download git sources beforehand in order
# to determine git commit hashes # to determine git commit hashes
cd "${ARCH_BUILDROOT}"/${pkgdir} cd "${ARCH_BUILDROOT}"/${pkgdir}
bash -c "updpkgsums && makepkg -o"
pkgbuild_file="${ARCH_BUILDROOT}/${pkgdir}/PKGBUILD" pkgbuild_file="${ARCH_BUILDROOT}/${pkgdir}/PKGBUILD"
@ -440,22 +511,41 @@ function build_pkg() {
sed -i "s/\(^_git_branch_wine=\).*/\1${git_branch_wine}/" ${pkgbuild_file} sed -i "s/\(^_git_branch_wine=\).*/\1${git_branch_wine}/" ${pkgbuild_file}
if [[ ! -v NO_STAGING ]]; then if [[ ! -v NO_STAGING ]]; then
git_source_winestaging=$(echo ${git_source_winestaging} | sed 's/\//\\\//g; s/\./\\\./g')
git_source_winestaging=$(echo ${git_source_winestaging} | sed 's/\//\\\//g; s/\./\\\./g;')
sed -i "s/\(^_staging_gitsrc=\).*/\1\"${git_source_winestaging}\"/" ${pkgbuild_file} sed -i "s/\(^_staging_gitsrc=\).*/\1\"${git_source_winestaging}\"/" ${pkgbuild_file}
sed -i "s/\(^_staging_commit=\).*/\1${git_commithash_winestaging}/" ${pkgbuild_file} sed -i "s/\(^_staging_commit=\).*/\1${git_commithash_winestaging}/" ${pkgbuild_file}
fi fi
elif [[ ${pkgname} == dxvk ]]; then elif [[ ${pkgname} == dxvk ]]; then
git_source_dxvk=$(echo ${git_source_dxvk} | sed 's/\//\\\//g; s/\./\\\./g')
git_source_dxvk=$(echo ${git_source_dxvk} | sed 's/\//\\\//g; s/\./\\\./g;')
sed -i "s/\(^_dxvk_gitsrc=\).*/\1\"${git_source_dxvk}\"/" ${pkgbuild_file} sed -i "s/\(^_dxvk_gitsrc=\).*/\1\"${git_source_dxvk}\"/" ${pkgbuild_file}
sed -i "s/\(^_git_branch_dxvk=\).*/\1${git_branch_dxvk}/" ${pkgbuild_file} sed -i "s/\(^_git_branch_dxvk=\).*/\1${git_branch_dxvk}/" ${pkgbuild_file}
sed -i "s/\(^_dxvk_commit=\).*/\1${git_commithash_dxvk}/" ${pkgbuild_file} sed -i "s/\(^_dxvk_commit=\).*/\1${git_commithash_dxvk}/" ${pkgbuild_file}
elif [[ ${pkgname} == vkd3d-proton ]]; then
git_source_vkd3dproton=$(echo ${git_source_vkd3dproton} | sed 's/\//\\\//g; s/\./\\\./g;')
sed -i "s/\(^_vkd3d_gitsrc=\).*/\1\"${git_source_vkd3dproton}\"/" ${pkgbuild_file}
sed -i "s/\(^_git_branch_vkd3d=\).*/\1${git_branch_vkd3dproton}/" ${pkgbuild_file}
sed -i "s/\(^_vkd3d_commit=\).*/\1${git_commithash_vkd3dproton}/" ${pkgbuild_file}
elif [[ ${pkgname} == dxvk-nvapi ]]; then
git_source_dxvknvapi=$(echo ${git_source_dxvknvapi} | sed 's/\//\\\//g; s/\./\\\./g;')
sed -i "s/\(^_dxvknvapi_gitsrc=\).*/\1\"${git_source_dxvknvapi}\"/" ${pkgbuild_file}
sed -i "s/\(^_git_branch_dxvknvapi=\).*/\1${git_branch_dxvknvapi}/" ${pkgbuild_file}
sed -i "s/\(^_dxvknvapi_commit=\).*/\1${git_commithash_dxvknvapi}/" ${pkgbuild_file}
fi fi
fi fi
if [[ $? -eq 0 ]]; then bash -c "updpkgsums && makepkg -Cf"; else exit 1; fi
if [[ $? -eq 0 ]]; then
bash -c "updpkgsums && makepkg -Cf"
else
cleanUp "_exit"
fi
# After successful compilation... # After successful compilation...
if [[ $(ls ./${pkgname}-*tar.xz 2>/dev/null | wc -l) -ne 0 ]]; then if [[ $(ls ./${pkgname}-*tar.xz 2>/dev/null | wc -l) -ne 0 ]]; then
@ -516,10 +606,29 @@ function updatePOL() {
if [[ ! -v NO_DXVK ]]; then if [[ ! -v NO_DXVK ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then if [[ -d ${wineprefix}/dosdevices ]]; then
WINEPREFIX=${wineprefix} setup_dxvk
WINEPREFIX=${wineprefix} setup_dxvk install --symlink
fi
done
fi
# TODO remove duplicate functionality
if [[ ! -v NO_VKD3D ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
WINEPREFIX=${wineprefix} setup_vkd3d_proton install --symlink
fi fi
done done
fi fi
# TODO remove duplicate functionality
if [[ ! -v NO_NVAPI ]]; then
for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
if [[ -d ${wineprefix}/dosdevices ]]; then
WINEPREFIX=${wineprefix} setup_dxvk_nvapi install --symlink
fi
done
fi
} }
########################################################## ##########################################################
@ -554,6 +663,14 @@ if [[ ! -v NO_DXVK ]]; then
checkDepends "0-dxvk-git" "dxvk-git" depends makedepends checkDepends "0-dxvk-git" "dxvk-git" depends makedepends
fi fi
if [[ ! -v NO_VKD3D ]]; then
checkDepends "0-vkd3d-proton-git" "vkd3d-proton-git" depends makedepends
fi
if [[ ! -v NO_NVAPI ]]; then
checkDepends "0-dxvk-nvapi-git" "dxvk-nvapi-git" depends makedepends
fi
check_alldeps check_alldeps
######################### #########################
@ -570,6 +687,14 @@ if [[ ! -v NO_DXVK ]]; then
build_pkg dxvk DXVK "0-dxvk-git" "${dxvk_wine_cleanlist[*]}" gitcheck build_pkg dxvk DXVK "0-dxvk-git" "${dxvk_wine_cleanlist[*]}" gitcheck
fi fi
if [[ ! -v NO_VKD3D ]]; then
build_pkg vkd3d-proton "VKD3D Proton" "0-vkd3d-proton-git" "${dxvk_wine_cleanlist[*]}" gitcheck
fi
if [[ ! -v NO_NVAPI ]]; then
build_pkg dxvk-nvapi "DXVK NVAPI" "0-dxvk-nvapi-git" "${dxvk_wine_cleanlist[*]}" gitcheck
fi
######################### #########################
# Update user's PlayonLinux wine prefixes if needed # Update user's PlayonLinux wine prefixes if needed


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

@ -8,7 +8,7 @@ pkg_section="otherosfs"
pkg_priority="optional" pkg_priority="optional"
pkg_arch="all" 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_commondesc="Vulkan-based D3D11, D3D10 & D3D9 implementation for Linux / Wine"
pkg_longdesc=" pkg_longdesc="
@ -16,12 +16,12 @@ A Vulkan-based translation layer for Direct3D 10/11 which
allows running 3D applications on Linux using Wine. 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_homeurl="https://github.com/doitsujin/dxvk"
pkg_gitbranch=${git_branch_dxvk} pkg_gitbranch=${git_branch_dxvk}
git_commithash=${git_commithash_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_installfile="./debian/install"
pkg_controlfile="./debian/control" pkg_controlfile="./debian/control"
@ -52,13 +52,13 @@ override_dh_install:
bash ./package-release.sh master debian/source/ --no-package bash ./package-release.sh master debian/source/ --no-package
# Tell deb builder to create DXVK x32 & x64 subfolders # 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 # 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 dh_install
" "
@ -66,9 +66,9 @@ override_dh_install:
# Debian install file section # Debian install file section
pkg_debinstall="\ 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)
" "
######################################################## ########################################################
@ -112,8 +112,9 @@ pkg_deps_build=(
'meson' 'meson'
'glslang' 'glslang'
'ninja-build (>= 1.5)' 'ninja-build (>= 1.5)'
'gcc-mingw-w64-base'
#'binutils-common' #'binutils-common'
'libisl22'
'gcc-mingw-w64-base'
'mingw-w64-common' 'mingw-w64-common'
'binutils-mingw-w64-x86-64' 'binutils-mingw-w64-x86-64'
'binutils-mingw-w64-i686' 'binutils-mingw-w64-i686'
@ -145,8 +146,9 @@ empty
############################ ############################
# Deb builder execution field # Deb builder execution field
# Exclude -z flag from LDFLAGS because it does not work with meson
# Do not build either debug symbols or doc files # 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"
pkg_debbuilder="LDFLAGS=\"-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto\" DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
######################################################## ########################################################
# Contents of Debian control file # Contents of Debian control file

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

@ -0,0 +1,189 @@
########################################################
# 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'
'directx-headers-dev'
)
# 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
# Exclude -z flag from LDFLAGS because it does not work with meson
# Do not build either debug symbols or doc files
pkg_debbuilder="LDFLAGS=\"-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto\" 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 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_homeurl="https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/"
pkg_gitbranch=${git_branch_glslang} 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. 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_homeurl="http://mesonbuild.com"
pkg_gitbranch=${git_branch_meson} pkg_gitbranch=${git_branch_meson}

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

@ -0,0 +1,184 @@
########################################################
# 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
# Exclude -z flag from LDFLAGS because it does not work with meson
# Do not build either debug symbols or doc files
pkg_debbuilder="LDFLAGS=\"-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto\" 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 #!/bin/env bash
# Update PoL Wine prefixes (DXVK & Wine Staging) on Debian/Ubuntu/Mint # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -25,24 +25,37 @@ if [[ ! -d "$HOME/.PlayOnLinux" ]]; then
fi fi
# Install dxvk-git to every PlayOnLinux wineprefix # 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 fi
# If a new Wine Staging version was installed and 'System' version of Wine has been used in # 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 # 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 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 # Filter all but <args>, i.e. the first 0-8 arguments
i=0 i=0
for arg in ${params[@]:8}; do
for arg in ${params[@]:24}; do
args[$i]="${arg}" args[$i]="${arg}"
let i++ let i++
done done
@ -66,21 +66,27 @@ done
for check in ${args[@]}; do for check in ${args[@]}; do
case ${check} in case ${check} in
--no-wine)
NO_WINE=
;;
--no-staging) --no-staging)
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_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= NO_POL=
;; ;;
esac 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" 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\ 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- Wine/Wine Staging (latest git version)\n\
\t- DXVK (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\ \t- meson & glslang (latest git versions; these are build time dependencies for DXVK)\n\n\
Do you want to continue? [Y/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 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\ 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 mainQuestions
coredeps_check coredeps_check
fi 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 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 fi
#################### ####################


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

@ -1,7 +1,7 @@
#!/bin/env bash #!/bin/env bash
# Compile DXVK git on Debian/Ubuntu/Mint and variants # Compile DXVK git on Debian/Ubuntu/Mint and variants
# Copyright (C) 2019 Pekka Helenius
# Copyright (C) 2019, 2022 Pekka Helenius
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -23,7 +23,7 @@
######################################################## ########################################################
# Root directory of this script file # Root directory of this script file
DXVKROOT="${PWD}"
WINE_ADDONS_ROOT="${PWD}"
# datedir variable supplied by ../updatewine_debian.sh script file # datedir variable supplied by ../updatewine_debian.sh script file
datedir="${1}" datedir="${1}"
@ -45,17 +45,23 @@ done
# array in ../updatewine.sh, make sure to update these # array in ../updatewine.sh, make sure to update these
# variables! # variables!
# #
git_commithash_dxvk=${params[0]}
git_commithash_glslang=${params[1]}
git_commithash_meson=${params[2]}
git_branch_dxvk=${params[3]}
git_branch_glslang=${params[5]}
git_branch_meson=${params[6]}
git_source_dxvk=${params[8]}
git_source_glslang=${params[9]}
git_source_meson=${params[10]}
git_commithash_dxvknvapi=${params[0]}
git_commithash_vkd3dproton=${params[1]}
git_commithash_dxvk=${params[2]}
git_commithash_glslang=${params[3]}
git_commithash_meson=${params[4]}
git_branch_dxvknvapi=${params[6]}
git_branch_vkd3dproton=${params[7]}
git_branch_dxvk=${params[8]}
git_branch_glslang=${params[9]}
git_branch_meson=${params[10]}
git_source_dxvknvapi_debian=${params[19]}
git_source_vkd3dproton_debian=${params[20]}
git_source_dxvk_debian=${params[21]}
git_source_glslang_debian=${params[15]}
git_source_meson_debian=${params[16]}
######################################################## ########################################################
@ -67,7 +73,7 @@ git_source_meson=${params[10]}
# Filter all but <args>, i.e. the first 0-8 arguments # Filter all but <args>, i.e. the first 0-8 arguments
i=0 i=0
for arg in ${params[@]:8}; do
for arg in ${params[@]:24}; do
args[$i]="${arg}" args[$i]="${arg}"
let i++ let i++
done done
@ -87,6 +93,12 @@ for check in ${args[@]}; do
--no-dxvk) --no-dxvk)
NO_DXVK= NO_DXVK=
;; ;;
--no-nvapi)
NO_NVAPI=
;;
--no-vkd3d)
NO_VKD3D=
;;
esac esac
done done
@ -94,7 +106,7 @@ done
######################################################## ########################################################
# Check presence of Wine. Some version of Wine should # 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=( known_wines=(
'wine' 'wine'
@ -107,7 +119,7 @@ known_wines=(
'wine-staging-git' 'wine-staging-git'
) )
# Alternative remote dependency packages for Debian distributions which offer too old packages for DXVK
# Alternative remote dependency packages for Debian distributions which offer too old packages for Wine addons
# #
# Left side: <package name in repositories>,<version_number> # Left side: <package name in repositories>,<version_number>
# Right side: package alternative source URL # Right side: package alternative source URL
@ -115,27 +127,24 @@ known_wines=(
# NOTE: Determine these packages in corresponding debdata files as runtime or buildtime dependencies # NOTE: Determine these packages in corresponding debdata files as runtime or buildtime dependencies
# #
# As this seems to be a dependency for binutils-mingw packages # As this seems to be a dependency for binutils-mingw packages
function binutils_common_ver() {
if [[ $(dpkg -s binutils-common &>/dev/null)$? -ne 0 ]]; then
sudo apt -y install binutils-common
fi
if [[ $? -eq 0 ]]; then
binutils_ver=$(dpkg -s binutils-common | sed -rn 's/^Version: ([0-9\.]+).*$/\1/p')
fi
}
if [[ $(dpkg -s "binutils-common" &>/dev/null)$? -ne 0 ]]; then
sudo apt -y install "binutils-common"
fi
binutils_common_ver
binutils_ver=$(dpkg -s "binutils-common" | sed -rn 's/^Version: ([0-9\.]+).*$/\1/p')
remotePackagesUrls=(
"http://mirrors.edge.kernel.org/ubuntu/pool/universe/b/binutils-mingw-w64"
"http://mirrors.edge.kernel.org/ubuntu/pool/universe/g/gcc-mingw-w64"
"http://mirrors.edge.kernel.org/ubuntu/pool/universe/m/mingw-w64"
remote_package_repositories=(
"https://mirrors.edge.kernel.org/ubuntu/pool/universe/d/directx-headers"
"https://mirrors.edge.kernel.org/ubuntu/pool/main/i/isl"
"https://mirrors.edge.kernel.org/ubuntu/pool/universe/b/binutils-mingw-w64"
"https://mirrors.edge.kernel.org/ubuntu/pool/universe/g/gcc-mingw-w64"
"https://mirrors.edge.kernel.org/ubuntu/pool/universe/m/mingw-w64"
) )
remotePackagesPool=(
remote_packages_pool=(
"directx-headers-dev"
"libisl22"
"gcc-mingw-w64-base" "gcc-mingw-w64-base"
"mingw-w64-common" "mingw-w64-common"
"binutils-mingw-w64-x86-64" "binutils-mingw-w64-x86-64"
@ -148,60 +157,178 @@ remotePackagesPool=(
"g++-mingw-w64-i686" "g++-mingw-w64-i686"
) )
typeset -A remotePackagesAlt
for rpp in ${remotePackagesPool[@]}; do
# NOTE: Package versions defined here *must* exist in some of the repositories!
typeset -A remote_packages_version_locks
remote_packages_version_locks=(
[directx-headers-dev]="1.606.4"
)
pkg_multi_data_binutils=()
typeset -A rpp_alternatives
typeset -A remote_packages_selected
typeset -A remote_packages_alt_available
for rpp in "${remote_packages_pool[@]}"; do
version_len=100
new_rpp_url=
new_rpp_token=
version_lock=
version_lock_set=0
rpp_alternative_time=-1
alt_remote_epoch_time=-1
alt_remote_flat_version=-1
for URL in "${remotePackagesUrls[@]}"; do
rpp_alternatives=()
remote_packages_alt_available=()
# Fetch exact package name and associated date
pkg_data=$(curl -s "${URL}/" | sed -rn 's/.*href="(.*(amd64|all)\.deb)">.*([0-9]{2}\-[A-Za-z]{3}\-[0-9]{4}).*/\1 \3/p' | sed 's/%2B/+/g' | grep "${rpp}")
for package_version_lock in ${!remote_packages_version_locks[@]}; do
if [[ ${pkg_data} = "" ]]; then
continue
if [[ ${rpp} == ${package_version_lock} ]]; then
version_lock=${remote_packages_version_locks[${package_version_lock}]}
version_lock_set=1
break 1
fi fi
# Associate Unix-formatted date with the exact package name
IFS=$'\n'
for ps in ${pkg_data[@]}; do
ps_pkg=$(printf "%s" "${ps}" | awk '{print $1}')
ps_date=$(date --date=$(printf "%s" "${ps}" | awk '{print $NF}') +%s)
remotePackagesAltDate+=("${ps_date}|${ps_pkg}")
done
IFS=" "
done
# Sort exact package names by date
remotePackagesAltDateSorted=($(sort <<<"${remotePackagesAltDate[*]}"))
for source_url in "${remote_package_repositories[@]}"; do
# binutils packages depend on system binutils-common. Versions must match, even if not the newest package available.
if [[ ${ps_pkg} =~ binutils ]] && [[ ${binutils_ver} != "" ]]; then
for b in ${remotePackagesAltDateSorted[@]}; do
# Fetch exact package name and associated date.
# rpp_rx is just for regex escaping purposes.
rpp_rx=$(echo ${rpp} | sed 's/\+/\\\+/g')
pkg_multi_data=(
$(curl -s "${source_url}/" | \
sed -rn 's/.*href="(.*(amd64|all)\.deb)">.*([0-9]{2}\-[A-Za-z]{3}\-[0-9]{4}).*/\1|\3/p' | \
sed 's/%2B/+/g' | grep -E "${rpp_rx}_[0-9]" | xargs echo
)
)
[[ ${#pkg_multi_data[@]} -eq 0 ]] && continue
# binutils packages depend on system binutils-common.
# Versions must match, even if the newest package is not available.
if [[ ${rpp} =~ binutils ]] && [[ ${binutils_ver} != "" ]]; then
for b in "${pkg_multi_data[@]}"; do
if [[ ${b} =~ ${binutils_ver} ]]; then if [[ ${b} =~ ${binutils_ver} ]]; then
remotePackagesAltBinUtils+=(${b})
pkg_multi_data_binutils+=("${b}")
fi fi
done done
unset remotePackagesAltDateSorted
remotePackagesAltDateSorted=(${remotePackagesAltBinUtils[@]})
unset remotePackagesAltBinUtils
pkg_multi_data=( ${pkg_multi_data_binutils[@]} )
unset pkg_multi_data_binutils
fi fi
# Get the newest exact package name
pkg=$(printf "%s" ${remotePackagesAltDateSorted[-1]} | sed -r 's/^[0-9]+\|(.*)/\1/')
unset remotePackagesAltDate
unset remotePackagesAltDateSorted
# TODO: Remove duplicate functionality
# Check relevant version parts while collecting
# different versions of a package.
# version_len is count of relevant parts.
#
# For instance
# - In a case of versions 2.23.1, 2.28 and 2.34.6.1
# count of relevant parts is 2 as determined by
# version 2.28.
# In this fair comparison, we therefore consider
# normalized version 2.23, 2.28 and 2.34
#
for pkg_data in "${pkg_multi_data[@]}"; do
rpp_pkg=$(printf '%s' "${pkg_data}" | awk -F '|' '{print $1}')
rpp_version_raw=$(printf '%s' $(echo "${rpp_pkg}" | sed -r 's/.*_(.*[0-9]+)\-.*_(all|amd64).*/\1/g;'))
version_parts=( $(echo ${rpp_version_raw} | sed 's/\./ /g') )
new_version_len=$(printf '%d' ${#version_parts[@]})
if [[ ${new_version_len} -lt ${version_len} ]]; then
version_len=${new_version_len}
fi
# Prepare and set a well-formatted value into remotePackagesAlt associative array
if [ ! "${pkg}" == "" ]; then
rpp_url=$(printf "%s/%s" "${URL}" "${pkg}")
rpp_shortver=$(printf "%s" "${pkg}" | sed -r 's/.*_(.*[0-9]+)\-.*_(all|amd64).*/\1/g; s/[^0-9]//g')
done
rpp_token=$(printf "%s,%d" "${rpp}" "${rpp_shortver}")
remotePackagesAlt+=(["${rpp_token}"]="${rpp_url}")
# Add each version of a package into associated array remote_packages_alt_available
# We collect the next information here for each entry:
# - package normalized version number
# - package release date in epoch format
# - package source root url and .deb name
#
# This information is collected so that we can determine which
# package version to use, and which URL is associated to it.
#
for pkg_data in "${pkg_multi_data[@]}"; do
break 1
rpp_pkg=$(printf '%s' "${pkg_data}" | awk -F '|' '{print $1}')
rpp_epoch_time=$(date --date=$(printf '%s' "${ps}" | awk -F '|' '{print $2}') +%s)
rpp_version_raw=$(printf '%s' $(echo "${rpp_pkg}" | sed -r 's/.*_(.*[0-9]+)\-.*_(all|amd64).*/\1/g;'))
version_parts=( $(echo ${rpp_version_raw} | sed 's/\./ /g') )
relevant_version_parts=( ${version_parts[@]:0:${version_len}} )
rpp_flat_version=$(printf '%d' $(echo ${relevant_version_parts[@]} | sed 's/ //g'))
rpp_dot_version=$(echo ${relevant_version_parts[@]} | sed 's/ /./g')
rpp_token=$(printf '%s,%d,%d,%s' "${rpp}" "${rpp_epoch_time}" "${rpp_flat_version}" "${rpp_dot_version}")
rpp_url=$(printf '%s/%s' "${source_url}" "${rpp_pkg}")
remote_packages_alt_available+=(["${rpp_token}"]="${rpp_url}")
done
done
# For collected package versions, get the highest available
#
for alt_remote_package in "${!remote_packages_alt_available[@]}"; do
new_alt_remote_epoch_time=$(echo ${alt_remote_package} | awk -F ',' '{print $2}')
new_alt_remote_flat_version=$(echo ${alt_remote_package} | awk -F ',' '{print $3}')
new_alt_remote_dot_version=$(echo ${alt_remote_package} | awk -F ',' '{print $4}')
# TODO: Remove duplicate functionality
if [[ ${version_lock} =~ ${new_alt_remote_dot_version} ]]; then
alt_remote_epoch_time=${new_alt_remote_epoch_time}
alt_remote_flat_version=${new_alt_remote_flat_version}
alt_remote_dot_version=${new_alt_remote_dot_version}
new_rpp_token=${alt_remote_package}
new_rpp_url=${remote_packages_alt_available[${alt_remote_package}]}
rpp_alternatives+=(["${new_rpp_token}"]="${new_rpp_url}|${alt_remote_epoch_time}|${alt_remote_flat_version}")
fi
if [[ ${new_alt_remote_flat_version} -ge ${alt_remote_flat_version} ]] && [[ ${version_lock_set} -eq 0 ]]; then
alt_remote_epoch_time=${new_alt_remote_epoch_time}
alt_remote_flat_version=${new_alt_remote_flat_version}
alt_remote_dot_version=${new_alt_remote_dot_version}
new_rpp_token=${alt_remote_package}
new_rpp_url=${remote_packages_alt_available[${alt_remote_package}]}
rpp_alternatives+=(["${new_rpp_token}"]="${new_rpp_url}|${alt_remote_epoch_time}|${alt_remote_flat_version}")
fi
done
# Do epoch time comparison for collected package versions
#
for rpp_alternative in ${!rpp_alternatives[@]}; do
new_rpp_alternative=${rpp_alternative}
new_rpp_alternative_time=$(printf '%d' $(echo ${rpp_alternative} | awk -F '|' '{print $2}') )
if [[ ${new_rpp_alternative_time} -gt ${rpp_alternative_time} ]]; then
rpp_alternative_time=${new_rpp_alternative_time}
fi fi
rpp_alternative=${new_rpp_alternative}
done done
remote_packages_selected+=( ["${rpp}"]=$(echo "${rpp_alternatives[$rpp_alternative]}|${version_lock_set}") )
done done
# Posix-compliant MingW alternative executables # Posix-compliant MingW alternative executables
@ -226,7 +353,7 @@ tempLinks=(
######################################################## ########################################################
function runtimeCheck() {
function runtime_check() {
local pkgreq_name local pkgreq_name
local known_pkgs local known_pkgs
@ -247,14 +374,11 @@ function runtimeCheck() {
done done
if [[ -z ${pkglist[*]} ]]; then 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 fi
} }
@ -263,17 +387,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 # 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 wine_addons_int_cleanup() {
rm -rf ${WINE_ADDONS_ROOT}/{dxvk-git,meson,glslang,*.deb}
rm -rf ${WINE_ADDONS_ROOT}/../compiled_deb/"${datedir}"
exit 0 exit 0
} }
# Allow interruption of the script at any time (Ctrl + C) # Allow interruption of the script at any time (Ctrl + C)
trap "DXVK_intCleanup" INT
# Error event
#trap "DXVK_intCleanup" ERR
trap "wine_addons_int_cleanup" INT
######################################################## ########################################################
@ -295,7 +416,7 @@ fi
# Check do we need to compile the package # Check do we need to compile the package
# given as input for this function # given as input for this function
function pkgcompilecheck() {
function pkg_compile_check() {
local install_function local install_function
local pkg local pkg
@ -313,19 +434,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. # They are not used independently.
function dxvk_install_custom() {
function addon_install_custom() {
local PATCHDIR local PATCHDIR
PATCHDIR="${1}" PATCHDIR="${1}"
# Use posix alternates for MinGW binaries # Use posix alternates for MinGW binaries
function dxvk_posixpkgs() {
function addon_posixpkgs() {
for alt in ${!alternatives[@]}; do for alt in ${!alternatives[@]}; do
echo "Linking MingW executable ${alt} to ${alternatives[$alt]}" echo "Linking MingW executable ${alt} to ${alternatives[$alt]}"
@ -351,42 +472,42 @@ 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_custom_patches() {
local CURDIR local CURDIR
local dxvk_builddir_name
local dxvk_builddir_path
local addon_builddir_name
local addon_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
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
cp -r "${DXVKROOT}/../../${PATCHDIR}/"*.{patch,diff} "${DXVKROOT}/${pkg_name}/" 2>/dev/null
if [[ -d "${WINE_ADDONS_ROOT}/../../${PATCHDIR}" ]]; then
find "${WINE_ADDONS_ROOT}/../../${PATCHDIR}/" \( -iname "*.patch" -or -iname "*.diff" \) -exec cp -f {} "${WINE_ADDONS_ROOT}/${pkg_name}/" 2>/dev/null \;
dxvk_builddir_name=$(ls -l "${DXVKROOT}/${pkg_name}" | grep ^d | awk '{print $NF}')
addon_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 # 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
echo -e "\e[1mERROR:\e[0m Multiple entries in dxvk build directory detected. Can't decide which one to use. Aborting\n"
if [[ $(echo ${addon_builddir_name} | wc -l) -gt 1 ]]; then
echo -e "\e[1mERROR:\e[0m Multiple entries in addon build directory detected. Can't decide which one to use. Aborting\n"
exit 1 exit 1
fi fi
dxvk_builddir_path="${DXVKROOT}/${pkg_name}/${dxvk_builddir_name}"
addon_builddir_path="${WINE_ADDONS_ROOT}/${pkg_name}/${addon_builddir_name}"
cd "${dxvk_builddir_path}"
cd "${addon_builddir_path}"
for pfile in ../*.{patch,diff}; do for pfile in ../*.{patch,diff}; do
if [[ -f ${pfile} ]]; then if [[ -f ${pfile} ]]; then
echo -e "Applying DXVK patch: ${pfile}\n"
echo -e "Applying addon's patch: ${pfile}\n"
patch -Np1 < ${pfile} patch -Np1 < ${pfile}
fi fi
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo -e "\e[1mERROR:\e[0m Error occured while applying DXVK patch '${pfile}'. Aborting\n"
echo -e "\e[1mERROR:\e[0m Error occured while applying addon's patch '${pfile}'. Aborting\n"
cd ${CURDIR} cd ${CURDIR}
exit 1 exit 1
fi fi
@ -400,10 +521,28 @@ function dxvk_install_custom() {
} }
############################ ############################
# DXVK - CUSTOM HOOKS EXECUTION
# ADDON - CUSTOM HOOKS EXECUTION
addon_custom_patches && \
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}
find ${extra_files_dir} -mindepth 1 -type f -exec cp -f {} ${pkgdir}/ \;
dxvk_custompatches && \
dxvk_posixpkgs
} }
######################################################## ########################################################
@ -438,6 +577,13 @@ function compile_and_install_deb() {
local _pkg_debcompat="${16}" local _pkg_debcompat="${16}"
local _pkg_compatfile="${17}" local _pkg_compatfile="${17}"
local extra_files_dir=$(find "../../extra_files/" -type d -iname "${_pkg_name%-*}")
if [[ -d ${extra_files_dir} ]]; then
[[ ! -d "debian/source" ]] && mkdir -p "debian/source"
fetch_extra_pkg_files ${_pkg_name} "debian/source" ${extra_files_dir}
fi
############################ ############################
# COMMON - ARRAY PARAMETER FIX # COMMON - ARRAY PARAMETER FIX
@ -451,7 +597,7 @@ function compile_and_install_deb() {
local s local s
local IFS local IFS
local y local y
arrays=( arrays=(
'_pkg_deps_build' '_pkg_deps_build'
'_pkg_deps_runtime' '_pkg_deps_runtime'
@ -477,13 +623,47 @@ function compile_and_install_deb() {
############################ ############################
function pkg_installcheck() { function pkg_installcheck() {
return $(echo $(dpkg -s "${1}" &>/dev/null)$?)
local full_pkg_name_found
full_pkg_name_found_return_code=$(echo $(dpkg -s "${1}" &>/dev/null)$?)
# Bad and error-prone fallback
if [[ ${full_pkg_name_found_return_code} -ne 0 ]]; then
full_pkg_name_matches=$(dpkg --get-selections | awk '{print $1}' | grep ^${1} | wc -l)
if [[ ${full_pkg_name_matches} -ne 0 ]]; then
full_pkg_name_found_return_code=0
fi
fi
return ${full_pkg_name_found_return_code}
} }
############################ ############################
echo -e "Starting compilation$(if [[ ! -v NO_INSTALL ]] || [[ ${_pkg_name} =~ ^meson|glslang$ ]]; then printf " & installation"; fi) of ${_pkg_name}\n" echo -e "Starting compilation$(if [[ ! -v NO_INSTALL ]] || [[ ${_pkg_name} =~ ^meson|glslang$ ]]; then printf " & installation"; fi) of ${_pkg_name}\n"
############################
function get_locked_packages() {
local _lock_pkgs
# Generate a list of version-locked-dependencies
if [[ ${#remote_packages_selected[@]} -gt 0 ]]; then
for alt_remote_pkg in ${!remote_packages_selected[@]}; do
alt_remote_version_lock_set=$(echo ${remote_packages_selected[${alt_remote_pkg}]} | awk -F '|' '{print $4}')
if [[ ${alt_remote_version_lock_set} -eq 1 ]]; then
_lock_pkgs+=(${alt_remote_pkg})
fi
done
fi
echo "${_lock_pkgs[*]}"
}
############################ ############################
# COMMON - PACKAGE DEPENDENCIES CHECK # COMMON - PACKAGE DEPENDENCIES CHECK
@ -497,11 +677,15 @@ function compile_and_install_deb() {
local a local a
local b local b
local _validlist local _validlist
local _lock_pkgs
local is_locked
local IFS local IFS
_pkg_list="${1}"
_pkg_list=("${1}")
_pkg_type="${2}" _pkg_type="${2}"
_lock_pkgs=($(get_locked_packages))
IFS=$'\n' IFS=$'\n'
_pkg_list=$(echo "${_pkg_list}" | sed 's/([^)]*)//g') _pkg_list=$(echo "${_pkg_list}" | sed 's/([^)]*)//g')
unset IFS unset IFS
@ -519,16 +703,26 @@ function compile_and_install_deb() {
return 0 return 0
fi fi
# Generate a list of missing dependencies
a=0 a=0
# Generate a list of missing dependencies
for p in ${_pkg_list[@]}; do for p in ${_pkg_list[@]}; do
if [[ $(pkg_installcheck ${p})$? -eq 0 ]]; then
_validlist[$a]=${p}
is_locked=0
for lock_pkg in "${_lock_pkgs[@]}"; do
if [[ ${p%% *} == ${lock_pkg} ]]; then
is_locked=1
break 1
fi
done
if [[ $(pkg_installcheck ${p%% *})$? -ne 0 ]] || [[ ${is_locked} -eq 1 ]]; then
_validlist[$a]=${p%% *}
let a++ let a++
# Global array to track installed build dependencies # Global array to track installed build dependencies
if [[ ${_pkg_type} == "buildtime" ]]; then if [[ ${_pkg_type} == "buildtime" ]]; then
_buildpkglist[$z]="${p}"
_buildpkglist[$z]=${p%% *}
let z++ let z++
fi fi
fi fi
@ -539,8 +733,8 @@ function compile_and_install_deb() {
} }
function pkg_localinstall() { 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() { function pkg_configure() {
@ -558,30 +752,53 @@ function compile_and_install_deb() {
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}"
if [[ ${#remotePackagesAlt[@]} -gt 0 ]]; then
for altRemote in ${!remotePackagesAlt[@]}; do
altRemotepkg=$(echo ${altRemote} | awk -F ',' '{print $1}')
altRemotever=$(echo ${altRemote} | awk -F ',' '{print $2}')
if [[ "${_pkg_dep}" == "${altRemotepkg}" ]]; then
if [[ $(pkg_installcheck ${altRemotepkg})$? -ne 0 ]]; then
if [[ ${#remote_packages_selected[@]} -gt 0 ]]; then
for alt_remote_pkg in ${!remote_packages_selected[@]}; do
if [[ "${_pkg_dep}" == "${alt_remote_pkg}" ]]; then
alt_remote_url=$(echo ${remote_packages_selected[${alt_remote_pkg}]} | awk -F '|' '{print $1}')
alt_remote_version=$(echo ${remote_packages_selected[${alt_remote_pkg}]} | awk -F '|' '{print $3}')
alt_remote_version_lock_set=$(echo ${remote_packages_selected[${alt_remote_pkg}]} | awk -F '|' '{print $4}')
# If remote pkg is not installed
if [[ $(pkg_installcheck ${alt_remote_pkg})$? -ne 0 ]]; then
# TODO remove duplicate functionality # TODO remove duplicate functionality
if [[ $(apt-cache show "${altRemotepkg}" | grep -m1 -oP "(?<=^Version: )[0-9|\.]*" | sed 's/\.//g') < ${altRemotever} ]]; then
pkg_localinstall ${remotePackagesAlt["${altRemote}"]} "${altRemotepkg}"
pkg_configure "${altRemotepkg}" ${remotePackagesAlt["${altRemote}"]}
repository_version=$(apt-cache show "${alt_remote_pkg}" 2>/dev/null | grep -m1 -oP "(?<=^Version: )[0-9|\.]*" | sed 's/\.//g')
[[ ! -z ${repository_version} ]] && repository_version=0
if [[ ${repository_version} -eq ${alt_remote_version} ]]; then
echo -e "Already updated. Skipping"
continue 1
fi
if [[ ${repository_version} -lt ${alt_remote_version} ]] || [[ ${alt_remote_version_lock_set} -eq 1 ]]; then
pkg_localinstall "${alt_remote_url}" "${alt_remote_pkg}"
pkg_configure "${alt_remote_pkg}" "${alt_remote_url}"
else else
pkg_remoteinstall "${altRemotepkg}"
pkg_configure "${altRemotepkg}"
pkg_remoteinstall "${alt_remote_pkg}"
pkg_configure "${alt_remote_pkg}"
fi fi
# If remote pkg is installed
else else
if [[ $(dpkg -s "${altRemotepkg}" | grep -m1 -oP "(?<=^Version: )[0-9|\.]*" | sed 's/\.//g') < ${altRemotever} ]]; then
pkg_localinstall ${remotePackagesAlt["${altRemote}"]} "${altRemotepkg}"
pkg_configure "${altRemotepkg}" ${remotePackagesAlt["${altRemote}"]}
else
pkg_remoteinstall "${altRemotepkg}"
pkg_configure "${altRemotepkg}"
local_version=$(dpkg -s "${alt_remote_pkg}" | grep -m1 -oP "(?<=^Version: )[0-9|\.]*" | sed 's/\.//g')
[[ ! -z ${local_version} ]] && local_version=0
if [[ ${local_version} -eq ${alt_remote_version} ]]; then
echo -e "Already updated. Skipping"
continue 1
fi fi
if [[ ${local_version} -lt ${alt_remote_version} ]] || [[ ${alt_remote_version_lock_set} -eq 1 ]]; then
pkg_localinstall "${alt_remote_url}" "${alt_remote_pkg}"
pkg_configure "${alt_remote_pkg}" "${alt_remote_url}"
else
pkg_remoteinstall "${alt_remote_pkg}"
pkg_configure "${alt_remote_pkg}"
fi
fi fi
fi fi
done done
@ -672,10 +889,14 @@ function compile_and_install_deb() {
# Access the folder after which package specific debianbuild function will be run # Access the folder after which package specific debianbuild function will be run
# That function is defined inside package specific install_main function below # That function is defined inside package specific install_main function below
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
pkg_gitversion && \ pkg_gitversion && \
mv ${_pkg_name} ${_pkg_name}-${_pkg_gitver} mv ${_pkg_name} ${_pkg_name}-${_pkg_gitver}
cd ${_pkg_name}-${_pkg_gitver} cd ${_pkg_name}-${_pkg_gitver}
# Get all required submodules
git submodule update --init --recursive
dh_make --createorig -s -y -c ${_pkg_license} && \ dh_make --createorig -s -y -c ${_pkg_license} && \
pkg_override_debianfile "${_pkg_debinstall}" "${_pkg_installfile}" pkg_override_debianfile "${_pkg_debinstall}" "${_pkg_installfile}"
pkg_override_debianfile "${_pkg_debcontrol}" "${_pkg_controlfile}" pkg_override_debianfile "${_pkg_debcontrol}" "${_pkg_controlfile}"
@ -699,12 +920,10 @@ function compile_and_install_deb() {
bash -c "${_pkg_debbuilder}" bash -c "${_pkg_debbuilder}"
# Once our deb package is compiled, install and store it # 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 if [[ $? -eq 0 ]]; then
rm -rf ../*.{changes,buildinfo,tar.xz} 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 sudo dpkg -i ../${_pkg_name}*.deb
fi fi
mv ../${_pkg_name}*.deb ../../../compiled_deb/"${datedir}" && \ mv ../${_pkg_name}*.deb ../../../compiled_deb/"${datedir}" && \
@ -730,8 +949,15 @@ function compile_and_install_deb() {
pkg_folderprepare pkg_folderprepare
# TODO use package name or separate override switch here? # TODO use package name or separate override switch here?
if [[ "${_pkg_name}" == *"dxvk"* ]]; then
dxvk_install_custom "dxvk_custom_patches"
if [[ "${_pkg_name%-*}" == "dxvk" ]]; then
addon_install_custom "dxvk_custom_patches"
elif [[ "${_pkg_name%-*}" == "dxvk-nvapi" ]]; then
addon_install_custom "dxvk-nvapi_custom_patches"
elif [[ "${_pkg_name%-*}" == "vkd3d-proton" ]]; then
addon_install_custom "vkd3d-proton_custom_patches"
fi fi
pkg_debianbuild pkg_debianbuild
@ -848,17 +1074,27 @@ function pkg_install_main() {
######################################################## ########################################################
# Check existence of known Wine packages # Check existence of known Wine packages
runtimeCheck Wine "${known_wines[*]}"
runtime_check Wine "${known_wines[*]}"
# Meson - compile (& install) # Meson - compile (& install)
pkgcompilecheck pkg_install_main meson "${DXVKROOT}/meson.debdata"
pkg_compile_check pkg_install_main meson "${WINE_ADDONS_ROOT}/../debdata/meson.debdata"
# Glslang - compile (& install) # Glslang - compile (& install)
pkgcompilecheck pkg_install_main glslang "${DXVKROOT}/glslang.debdata"
pkg_compile_check pkg_install_main glslang "${WINE_ADDONS_ROOT}/../debdata/glslang.debdata"
if [[ ! -v NO_DXVK ]]; then if [[ ! -v NO_DXVK ]]; then
# DXVK - compile (& install) # 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 fi
# Clean buildtime dependencies # Clean buildtime dependencies

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

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


+ 4
- 0
dxvk-nvapi_custom_patches/put_your_dxvk-nvapi_patches_here View File

@ -0,0 +1,4 @@
Put your custom DXVK patches here.
Valid file suffix formats are: .diff and .patch
These patches are applied during DXVK compilation

+ 0
- 0
dxvk-nvapi_disabled_patches/put_disabled_dxvk-nvapi_patches_here View File


+ 201
- 0
extra_files/dxvk-nvapi/setup_dxvk_nvapi.sh View File

@ -0,0 +1,201 @@
#!/usr/bin/env bash
# NOTE: This is a modified version of script file
# https://github.com/HansKristian-Work/vkd3d-proton/blob/master/setup_vkd3d_proton.sh
#
# default directories
dxvk_nvapi_lib32=${dxvk_nvapi_lib32:-"x32"}
dxvk_nvapi_lib64=${dxvk_nvapi_lib64:-"x64"}
# figure out where we are
basedir=$(dirname "$(readlink -f "$0")")
# figure out which action to perform
action="$1"
case "$action" in
install)
;;
uninstall)
;;
*)
echo "Unrecognized action: $action"
echo "Usage: $0 [install|uninstall] [--symlink]"
exit 1
esac
# process arguments
shift
file_cmd="cp -v"
while (($# > 0)); do
case "$1" in
"--symlink")
file_cmd="ln -s -v"
;;
esac
shift
done
# check wine prefix before invoking wine, so that we
# don't accidentally create one if the user screws up
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
exit 1
fi
# find wine executable
export WINEDEBUG=-all
# disable mscoree and mshtml to avoid downloading
# wine gecko and mono
export WINEDLLOVERRIDES="mscoree,mshtml="
wine="wine"
wine64="wine64"
wineboot="wineboot"
# $PATH is the way for user to control where wine is located (including custom Wine versions).
# Pure 64-bit Wine (non Wow64) requries skipping 32-bit steps.
# In such case, wine64 and winebooot will be present, but wine binary will be missing,
# however it can be present in other PATHs, so it shouldn't be used, to avoid versions mixing.
wine_path=$(dirname "$(which $wineboot)")
wow64=true
if ! [ -f "$wine_path/$wine" ]; then
wine=$wine64
wow64=false
fi
# resolve 32-bit and 64-bit system32 path
winever=$($wine --version | grep wine)
if [ -z "$winever" ]; then
echo "$wine: Not a wine executable. Check your $wine." >&2
exit 1
fi
# ensure wine placeholder dlls are recreated
# if they are missing
$wineboot -u
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
win64_sys_path="${win64_sys_path/$'\r'/}"
if $wow64; then
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
win32_sys_path="${win32_sys_path/$'\r'/}"
fi
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
echo 'Failed to resolve C:\windows\system32.' >&2
exit 1
fi
# create native dll override
overrideDll() {
if ! $wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f >/dev/null 2>&1
then
echo -e "Failed to add override for $1"
exit 1
fi
}
# remove dll override
restoreDll() {
if ! $wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /f > /dev/null 2>&1
then
echo "Failed to remove override for $1"
fi
}
# copy or link nvapi dll, back up original file
installFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if [ -n "$1" ]; then
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
if ! [ -f "${dstfile}.old" ]; then
mv -v "${dstfile}" "${dstfile}.old"
else
rm -v "${dstfile}"
fi
else
touch "${dstfile}.old_none"
fi
$file_cmd "${srcfile}" "${dstfile}"
fi
return 0
}
# remove nvapi dll, restore original file
uninstallFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
echo "${dstfile}: File not found. Skipping." >&2
return 1
fi
if [ -f "${dstfile}.old" ]; then
rm -v "${dstfile}"
mv -v "${dstfile}.old" "${dstfile}"
return 0
elif [ -f "${dstfile}.old_none" ]; then
rm -v "${dstfile}.old_none"
rm -v "${dstfile}"
return 0
else
return 1
fi
}
install() {
installFile "$win64_sys_path" "$dxvk_nvapi_lib64" "${1}64"
inst64_ret="$?"
inst32_ret=-1
if $wow64; then
installFile "$win32_sys_path" "$dxvk_nvapi_lib32" "$1"
inst32_ret="$?"
fi
if (( (inst32_ret == 0) )); then
overrideDll "$1"
fi
if (( (inst64_ret == 0) )); then
overrideDll "${1}64"
fi
}
uninstall() {
uninstallFile "$win64_sys_path" "$dxvk_nvapi_lib64" "${1}64"
uninst64_ret="$?"
uninst32_ret=-1
if $wow64; then
uninstallFile "$win32_sys_path" "$dxvk_nvapi_lib32" "$1"
uninst32_ret="$?"
fi
if (( (uninst32_ret == 0) )); then
restoreDll "$1"
fi
if (( (uninst64_ret == 0) )); then
restoreDll "${1}64"
fi
}
$action nvapi

+ 23
- 6
options.conf View File

@ -15,14 +15,31 @@
######### #########
git_source_dxvk="git://github.com/doitsujin/dxvk.git"
git_source_wine="git://source.winehq.org/git/wine.git"
git_source_winestaging="git://github.com/wine-staging/wine-staging.git"
git_source_dxvknvapi="git+https://github.com/jp7677/dxvk-nvapi.git"
git_source_vkd3dproton="git+https://github.com/HansKristian-Work/vkd3d-proton.git"
git_source_dxvk="git+https://github.com/doitsujin/dxvk.git"
git_source_wine="git://source.winehq.org/git/wine"
git_source_winestaging="git+https://github.com/wine-staging/wine-staging.git"
# Debian versions
git_source_dxvknvapi_debian="https://github.com/jp7677/dxvk-nvapi"
git_source_vkd3dproton_debian="https://github.com/HansKristian-Work/vkd3d-proton"
git_source_dxvk_debian="https://github.com/doitsujin/dxvk"
git_source_wine_debian="git://source.winehq.org/git/wine"
git_source_winestaging_debian="https://github.com/wine-staging/wine-staging"
# DXVK commits & branches # DXVK commits & branches
git_commithash_dxvk=HEAD git_commithash_dxvk=HEAD
git_branch_dxvk=master git_branch_dxvk=master
# DXVK NVAPI commits & branches
git_commithash_dxvknvapi=HEAD
git_branch_dxvknvapi=master
# VKD3D commits & branches
git_commithash_vkd3dproton=HEAD
git_branch_vkd3dproton=master
# Wine commits & branches # Wine commits & branches
git_commithash_wine=HEAD git_commithash_wine=HEAD
git_branch_wine=master git_branch_wine=master
@ -30,11 +47,11 @@ git_branch_wine=master
########## ##########
# These apply only on Debian/Ubuntu/Mint # These apply only on Debian/Ubuntu/Mint
git_source_meson="git://github.com/mesonbuild/meson.git"
git_source_glslang="git://github.com/KhronosGroup/glslang.git"
git_source_meson_debian="https://github.com/mesonbuild/meson"
git_source_glslang_debian="https://github.com/KhronosGroup/glslang"
# Commits & branches: https://github.com/mesonbuild/meson # Commits & branches: https://github.com/mesonbuild/meson
git_commithash_meson=5d6dcf8850fcc5d552f55943b6aa3582754dedf8
git_commithash_meson=HEAD
git_branch_meson=master git_branch_meson=master
# Commits & branches: https://github.com/KhronosGroup/glslang # Commits & branches: https://github.com/KhronosGroup/glslang


+ 41
- 15
updatewine.sh View File

@ -132,10 +132,12 @@ for arg in ${@}; do
case ${arg} in case ${arg} in
--no-staging) --no-staging)
# Do not build Wine staging version, just Wine # Do not build Wine staging version, just Wine
NO_STAGING=
;; ;;
--no-install) --no-install)
# Just build, do not install DXVK or Wine-Staging # Just build, do not install DXVK or Wine-Staging
# Note that some version of Wine is required for DXVK compilation, though! # Note that some version of Wine is required for DXVK compilation, though!
NO_INSTALL=
;; ;;
--no-wine) --no-wine)
# Skip Wine build & installation process all together # Skip Wine build & installation process all together
@ -145,8 +147,17 @@ for arg in ${@}; do
# Skip DXVK build & installation process all together # Skip DXVK build & installation process all together
NO_DXVK= NO_DXVK=
;; ;;
--no-vkd3d)
# Skip VKD3D Proton build & installation process all together
NO_VKD3D=
;;
--no-nvapi)
# Skip DXVK NVAPI build & installation process all together
NO_NVAPI=
;;
--no-pol) --no-pol)
# Skip PlayOnLinux Wine prefixes update process # Skip PlayOnLinux Wine prefixes update process
NO_POL=
;; ;;
*) *)
echo -e "\n\ echo -e "\n\
@ -155,6 +166,8 @@ ${SCRIPT_TITLE} by ${SCRIPT_AUTHOR}\n\n\
Usage:\n\nbash updatewine.sh\n\nArguments:\n\n\ Usage:\n\nbash updatewine.sh\n\nArguments:\n\n\
--no-install\tDo not install Wine or DXVK. Just compile them. Wine, meson & glslang must be installed for DXVK compilation.\n\ --no-install\tDo not install Wine or DXVK. Just compile them. Wine, meson & glslang must be installed for DXVK compilation.\n\
--no-dxvk\tDo not compile or install DXVK\n\ --no-dxvk\tDo not compile or install DXVK\n\
--no-vkd3d\tDo not compile or install VKD3D Proton\n\
--no-nvapi\tDo not compile or install DXVK NVAPI\n\
--no-pol\tDo not update PlayOnLinux Wine prefixes\n\n\ --no-pol\tDo not update PlayOnLinux Wine prefixes\n\n\
--no-staging\tCompile Wine instead of Wine Staging\n\ --no-staging\tCompile Wine instead of Wine Staging\n\
--no-wine\tDo not compile or install Wine/Wine Staging\n\n\ --no-wine\tDo not compile or install Wine/Wine Staging\n\n\
@ -182,31 +195,44 @@ datesuffix=$(echo $(date '+%Y-%m-%d-%H%M%S'))
# Pass them to subscripts, as well. # Pass them to subscripts, as well.
githash_overrides=( githash_overrides=(
"${git_commithash_dxvk}" # 0
"${git_commithash_glslang}" # 1
"${git_commithash_meson}" # 2
"${git_commithash_wine}" # 3
"${git_commithash_dxvknvapi}" # 0
"${git_commithash_vkd3dproton}" # 1
"${git_commithash_dxvk}" # 2
"${git_commithash_glslang}" # 3
"${git_commithash_meson}" # 4
"${git_commithash_wine}" # 5
) )
# Add git branches to argument list # Add git branches to argument list
# Pass them to subscripts, as well. # Pass them to subscripts, as well.
gitbranch_overrides=( gitbranch_overrides=(
"${git_branch_dxvk}" # 4
"${git_branch_glslang}" # 5
"${git_branch_meson}" # 6
"${git_branch_wine}" # 7
"${git_branch_dxvknvapi}" # 6
"${git_branch_vkd3dproton}" # 7
"${git_branch_dxvk}" # 8
"${git_branch_glslang}" # 9
"${git_branch_meson}" # 10
"${git_branch_wine}" # 11
) )
# Add git sources to argument list # Add git sources to argument list
# Pass them to subscripts, as well. # Pass them to subscripts, as well.
gitsources=( gitsources=(
"${git_source_dxvk}" # 8
"${git_source_glslang}" # 9
"${git_source_meson}" # 10
"${git_source_wine}" # 11
"${git_source_winestaging}" # 12
"${git_source_dxvknvapi}" # 12
"${git_source_vkd3dproton}" # 13
"${git_source_dxvk}" # 14
"${git_source_glslang_debian}" # 15
"${git_source_meson_debian}" # 16
"${git_source_wine}" # 17
"${git_source_winestaging}" # 18
# Debian
"${git_source_dxvknvapi_debian}" # 19
"${git_source_vkd3dproton_debian}" # 20
"${git_source_dxvk_debian}" # 21
"${git_source_wine_debian}" # 22
"${git_source_winestaging_debian}" # 23
) )
############################# #############################
@ -378,7 +404,7 @@ function determineDistroFamily() {
esac esac
} }
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]]; then
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]] || [[ ! -v NO_VKD3D ]] || [[ ! -v NO_NVAPI ]]; then
echo -e "\n${SCRIPT_TITLE}\n\nBuild identifier:\t${datesuffix}\n" echo -e "\n${SCRIPT_TITLE}\n\nBuild identifier:\t${datesuffix}\n"
else else
echo "" echo ""
@ -395,7 +421,7 @@ echo -e "\e[1mNOTE: \e[0mDXVK requires very latest Nvidia/AMD drivers to work.\n
This script comes with GPU driver installation scripts for Debian-based Linux distributions.\n" This script comes with GPU driver installation scripts for Debian-based Linux distributions.\n"
INFO_SEP INFO_SEP
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]]; then
if [[ ! -v NO_WINE ]] || [[ ! -v NO_DXVK ]] || [[ ! -v NO_VKD3D ]] || [[ ! -v NO_NVAPI ]]; then
reqsCheck reqsCheck
sudoQuestion sudoQuestion
echo "" echo ""


+ 4
- 0
vkd3d-proton_custom_patches/put_your_vkd3d-proton_patches_here View File

@ -0,0 +1,4 @@
Put your custom DXVK patches here.
Valid file suffix formats are: .diff and .patch
These patches are applied during DXVK compilation

+ 0
- 0
vkd3d-proton_disabled_patches/put_disabled_vkd3d-proton_patches_here View File


Loading…
Cancel
Save