diff options
author | Jaja | 2022-04-23 19:58:04 +0200 |
---|---|---|
committer | Jaja | 2022-04-23 19:58:04 +0200 |
commit | 1c4afc876fcbaaa58ea7538bdff1209c4f62181a (patch) | |
tree | 51c3b54c917fb5c75e95d6d76e90fd66993042ce | |
parent | 4349bb10d4c7fd6c7b4761b7cbd51ab6299986d9 (diff) | |
download | aur-1c4afc876fcbaaa58ea7538bdff1209c4f62181a.tar.gz |
Got questions about supplementary archive again.
Ok, then.. Here you are.
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rwxr-xr-x | launcher.sh | 146 | ||||
-rw-r--r-- | pam_limits.conf | 1 | ||||
-rw-r--r-- | supplementary.tar.zst | bin | 4399 -> 0 bytes | |||
-rwxr-xr-x | user_settings.py | 125 |
6 files changed, 288 insertions, 8 deletions
@@ -45,8 +45,12 @@ pkgbase = proton-ge-custom-bin options = emptydirs backup = usr/share/steam/compatibilitytools.d/proton-ge-custom/user_settings.py source = GE-Proton7-15_1.tar.gz::https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton7-15/GE-Proton7-15.tar.gz - source = supplementary.tar.zst + source = user_settings.py + source = launcher.sh + source = pam_limits.conf sha512sums = c4fb4e9165d3a09a9a5e72042d2b2176072535678c745bbd27562050a43f74bc29f59fe10870c61ac01c98cc49af319d18d6e38d7691bc1ebb53da35c1e74505 - sha512sums = 78f4874746b45151890edede89acc5fef6c6143d93d63db27b592a17f9a3eaa7bcfd25049807f9600794ba1244b121636ebf58ea51a5079e7c7ceef36d0c56a0 + sha512sums = cd70fa35e8565197148c6135628ea4c751c7dc4d7eba6e59cf8a8f2315e79f45e80fc3adce68c8ca2c195a18aaa2a8b2b346e8843b369f3d0ac97e752dbb5399 + sha512sums = 33efb407e47140a72f1024bec67f2d718eec56e13ca76bcc18e03471b2c64f2b04034eb1e20b0da79afb727e59672fd3539fecc8131da88a8a1330f48a1c8424 + sha512sums = c64898bd41801470925fb0efdcf7d247e5cb476fb4745f83ceeccf12041474e5c309fb1c2ac1483b419d12b4ade7668c046bebded4e3bf4708737ee505b080a1 pkgname = proton-ge-custom-bin @@ -69,13 +69,17 @@ backup=("${_protoncfg}") ## sources url='https://github.com/GloriousEggroll/proton-ge-custom' source=("${_pkgver}_${pkgrel}.tar.gz::${url}/releases/download/${_pkgver}/${_pkgver}.tar.gz" - 'supplementary.tar.zst') + 'user_settings.py' + 'launcher.sh' + 'pam_limits.conf') sha512sums=('c4fb4e9165d3a09a9a5e72042d2b2176072535678c745bbd27562050a43f74bc29f59fe10870c61ac01c98cc49af319d18d6e38d7691bc1ebb53da35c1e74505' - '78f4874746b45151890edede89acc5fef6c6143d93d63db27b592a17f9a3eaa7bcfd25049807f9600794ba1244b121636ebf58ea51a5079e7c7ceef36d0c56a0') + 'cd70fa35e8565197148c6135628ea4c751c7dc4d7eba6e59cf8a8f2315e79f45e80fc3adce68c8ca2c195a18aaa2a8b2b346e8843b369f3d0ac97e752dbb5399' + '33efb407e47140a72f1024bec67f2d718eec56e13ca76bcc18e03471b2c64f2b04034eb1e20b0da79afb727e59672fd3539fecc8131da88a8a1330f48a1c8424' + 'c64898bd41801470925fb0efdcf7d247e5cb476fb4745f83ceeccf12041474e5c309fb1c2ac1483b419d12b4ade7668c046bebded4e3bf4708737ee505b080a1') build() { ## patches - sed -i "s|_proton=echo|_proton=/${_protondir}/proton|" "${srcdir}"/launchers/proton.sh + sed -i "s|_proton=echo|_proton=/${_protondir}/proton|" "${srcdir}"/launcher.sh sed -i -r 's|"GE-Proton.*"|"Proton-GE"|' "${_srcdir}"/compatibilitytool.vdf ## remove artifacts rm "${_srcdir}"/protonfixes/*.tar.xz @@ -96,9 +100,9 @@ package() { mv "${_srcdir}/PATENTS.AV1" "${pkgdir}/${_licensedir}/license_AV1" mv "${_srcdir}/protonfixes/LICENSE" "${pkgdir}/${_licensedir}/license_protonfixes" ## config files - install --mode=0775 --group=50 "${srcdir}"/configs/user_settings.py "${pkgdir}/${_protoncfg}" - install --mode=0644 "${srcdir}"/configs/limits.conf "${pkgdir}"/etc/security/limits.d/10-games.conf + install --mode=0775 --group=50 "${srcdir}"/user_settings.py "${pkgdir}/${_protoncfg}" + install --mode=0644 "${srcdir}"/pam_limits.conf "${pkgdir}"/etc/security/limits.d/10-games.conf ## executables mv "${_srcdir}"/* "${pkgdir}/${_protondir}" - install --mode=0755 "${srcdir}"/launchers/proton.sh "${pkgdir}/${_execfile}" + install --mode=0755 "${srcdir}"/launcher.sh "${pkgdir}/${_execfile}" } diff --git a/launcher.sh b/launcher.sh new file mode 100755 index 000000000000..80ee62746912 --- /dev/null +++ b/launcher.sh @@ -0,0 +1,146 @@ +#!/bin/bash + +## configuration +# proton executable +_proton=echo +# default prefix dir if STEAM_COMPAT_DATA_PATH not set +_pfx=${XDG_DATA_HOME:-~/.local/share}/proton-pfx +# default appid if STEAM_COMPAT_DATA_PATH or SteamAppId not set nor given as an argument +_appid=0 +# default mode of execution if not given as an argument +_mode=waitforexitandrun +# default steam install path (don't worry, you still don't need steam) +_steam=${XDG_DATA_HOME:-~/.local/share}/Steam + +## functions +set_env() { + # Proton now cares about steam install - it wants to update the tracked files according to installed steam. + # While this makes no sense in standalone, we need to set *some* path even if does not exists. + if [ -z ${STEAM_COMPAT_CLIENT_INSTALL_PATH+x} ]; then + export STEAM_COMPAT_CLIENT_INSTALL_PATH=${_steam} + echo "ProtonLauncher[$$] INFO: empty STEAM_COMPAT_CLIENT_INSTALL_PATH set to ${STEAM_COMPAT_CLIENT_INSTALL_PATH}" + fi + if ! [ -d "${STEAM_COMPAT_CLIENT_INSTALL_PATH}" ]; then + echo "ProtonLauncher[$$] WARN: directory ${STEAM_COMPAT_CLIENT_INSTALL_PATH} does not exist" + fi + + # No data path to prefix? Let's set the default path. We want to include the AppId in the path like steam. + if [ -z ${STEAM_COMPAT_DATA_PATH+x} ]; then + export STEAM_COMPAT_DATA_PATH=${_pfx}/${SteamAppId:-${_appid}} + echo "ProtonLauncher[$$] INFO: empty STEAM_COMPAT_DATA_PATH set to ${STEAM_COMPAT_DATA_PATH}" + elif ! [ "${SteamGameId}" -ge 0 ] 2>/dev/null && ! [ "${SteamAppId}" -ge 0 ] 2>/dev/null && ! [ "$(basename "${STEAM_COMPAT_DATA_PATH}")" -ge 0 ] 2>/dev/null; then + export SteamAppId=${_appid} + echo "ProtonLauncher[$$] INFO: empty SteamAppId set to ${SteamAppId}" + fi + # If the prefix path does not exist yet, we will create it. + if ! [ -d "${STEAM_COMPAT_DATA_PATH}" ]; then + install -d "${STEAM_COMPAT_DATA_PATH}" || exit 1 + echo "ProtonLauncher[$$] INFO: directory ${STEAM_COMPAT_DATA_PATH} created" + fi + + # Placeholder in case we need the workaround again when tracked_files missing + if ! [ -f "${STEAM_COMPAT_DATA_PATH}"/tracked_files ]; then + if [ -f "${STEAM_COMPAT_DATA_PATH}"/version ]; then + echo "ProtonLauncher[$$] WARN: file ${STEAM_COMPAT_DATA_PATH}/tracked_files missing! Please report to AUR maintainer" + fi + fi + + # argument -e was provided, so summerize the relevant env we set so far. + if [ "${_printenv}" == "true" ] 2>/dev/null; then print_env; fi +} + +print_usage() { + cat <<EOF + +USAGE: proton executable.exe + proton [mode] executable.exe + proton [appid] executable.exe + proton [--environment|-e] [--help|-h] + +EOF +} + +print_help() { + print_usage + cat <<EOF +ENV: STEAM_COMPAT_DATA_PATH + SteamAppId + SteamGameId + +Just call this proton launcher script with your app as the only argument +to run it with the default prefix +${_pfx}/${_appid} and default mode "${_mode}". + +_mode_ +You can change the mode of operation by specifying it as the first argument. +Possible values are: waitforexitandrun, run, getcompatpath, getnativepath + +_appid_ +Protonfixes uses three environment variables to determine the application to +run fixes for. The env STEAM_COMPAT_DATA_PATH points to the wine prefix and +usually includes the AppId. If the env SteamAppId (or SteamGameId) is set, it +takes precedence as the AppId used. + +As proton itself needs the env STEAM_COMPAT_DATA_PATH, the default prefix +${_pfx}/${_appid} is used when it is not set or empty. +An AppId given by env SteamAppId will alter this path accordingly. + +Provide "appid" as an argument instead of "mode" to change the AppId regardless +of the env vars. In this case, the mode defaults to "${_mode}". +Useable for "appid": see https://steamdb.info/apps/ + +Note that the env SteamGameId is not set by this launcher script in any case. +This env is evaluated by steam executables inside the prefix. Set it yourself +as you see fit. + +To see the current ENV when this script is called, use "-e" the switch. + +EOF +} + +print_env() { + cat <<EOF + +Current ENVIRONMENT variables: + +STEAM_COMPAT_CLIENT_INSTALL_PATH ${STEAM_COMPAT_CLIENT_INSTALL_PATH:-"Empty or not set."} +STEAM_COMPAT_DATA_PATH ${STEAM_COMPAT_DATA_PATH:-"Empty or not set."} +SteamAppId ${SteamAppId:-"Empty or not set."} +SteamGameId ${SteamGameId:-"Empty or not set."} +EOF +} + +## main +if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then + print_help + exit 0 +fi +if [ "$1" == "--environment" ] || [ "$1" == "-e" ]; then + _printenv=true + shift +fi + +case $# in +0) + print_usage + ;; +1) + # just start an application with default appid and mode + set_env + "${_proton}" "${_mode}" "$1" + ;; +*) + if ! [ "$1" -ge 0 ] 2>/dev/null; then + # start proton with given arguments, compatible with standard proton invokation + set_env + "${_proton}" "${@}" + else + # first arg is a positive signed int, thus the appid + export SteamAppId="$1" + #export SteamGameId="$1" + echo "ProtonLauncher[$$] INFO: forcing SteamAppId to $1" + set_env + "${_proton}" "${_mode}" "${@:2}" + fi + ;; +esac diff --git a/pam_limits.conf b/pam_limits.conf new file mode 100644 index 000000000000..42cc75559de4 --- /dev/null +++ b/pam_limits.conf @@ -0,0 +1 @@ +@games - nice -10 diff --git a/supplementary.tar.zst b/supplementary.tar.zst Binary files differdeleted file mode 100644 index 9e49c9d24d3a..000000000000 --- a/supplementary.tar.zst +++ /dev/null diff --git a/user_settings.py b/user_settings.py new file mode 100755 index 000000000000..4f09d0b0f661 --- /dev/null +++ b/user_settings.py @@ -0,0 +1,125 @@ +#Settings here will take effect for all games run in this Proton version. + +user_settings = { + ###### Proton GE flags ###### + + #Disables DX12. +# "PROTON_NO_D3D12": "1", + + #Allows Async to be used with DXVK. + #This can help with stutter in some games, however it is recommended not to be used with games that have sensitive anti-cheats. + #Use at your own risk. +# "DXVK_ASYNC": "1", + + #Enable AMD FidelityFX Super Resolution (FSR). Only works in vulkan games (dxvk and vkd3d-proton included). +# "WINE_FULLSCREEN_FSR": "1", + + #The default sharpening of 5 is enough without needing modification, but can be changed with 0-5 if wanted. + #0 is the maximum sharpness, higher values mean less sharpening. + #2 is the AMD recommended default and is set by proton-ge. +# "WINE_FULLSCREEN_FSR_STRENGTH": "2", + + ###### Proton flags ###### + + #Convenience method for dumping a useful debug log to $PROTON_LOG_DIR/steam-$APPID.log +# "PROTON_LOG": "1", + + #Log directory can be overridden with $PROTON_LOG_DIR. +# "PROTON_LOG_DIR": "~/", + + #When running a game, Proton will write some useful debug scripts for that game into $PROTON_DEBUG_DIR/proton_$USER/. +# "PROTON_DUMP_DEBUG_COMMANDS": "1", + + #Root directory for the Proton debug scripts, /tmp by default. +# "PROTON_DEBUG_DIR": "1", + + #Use OpenGL-based wined3d for d3d11, d3d10, and d3d9 instead of Vulkan-based DXVK +# "PROTON_USE_WINED3D": "1", + + #Disable d3d11.dll, for d3d11 games which can fall back to and run better with d3d9. +# "PROTON_NO_D3D11": "1", + + #DDisable d3d10.dll and dxgi.dll, for d3d10 games which can fall back to and run better with d3d9. +# "PROTON_NO_D3D10": "1", + + #Disable eventfd-based in-process synchronization primitives +# "PROTON_NO_ESYNC": "1", + + #Disable futex-based in-process synchronization primitives +# "PROTON_NO_FSYNC": "1", + + #Enable NVIDIA's NVAPI GPU support library. +# "PROTON_ENABLE_NVAPI": "1", + + #Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. +# "PROTON_FORCE_LARGE_ADDRESS_AWARE": "0", + + #Delay freeing some memory, to work around application use-after-free bugs. +# "PROTON_HEAP_DELAY_FREE": "1", + + #Create an S: drive which points to the Steam Library which contains the game. +# "PROTON_SET_GAME_DRIVE": "1", + + #Create an S: drive which points to the Steam Library which contains the game. +# "PROTON_OLD_GL_STRING": "1", + + #Force Nvidia GPUs to always be reported as AMD GPUs. + #Some games require this if they depend on Windows-only Nvidia driver functionality. + #See also DXVK's nvapiHack config, which only affects reporting from Direct3D. +# "PROTON_HIDE_NVIDIA_GPU": "1", + + #Disable support for memory write watches in ntdll. + #This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. + #This improves performance for some very specific games (e.g. CoreRT-based games). +# "PROTON_NO_WRITE_WATCH": "1", + + ###### DXVK flags ###### + + #DXVK debug logging; none|error|warn|info|debug +# "DXVK_LOG_LEVEL": "info", + + #DXVK debug log; Set to none to disable log file creation entirely, without disabling logging. +# "DXVK_LOG_PATH": "~/", + + #Enables use of the VK_EXT_debug_utils extension for translating performance event markers. +# "DXVK_PERF_EVENTS": "1", + + #Enables use of the VK_EXT_debug_utils extension for translating performance event markers. +# "DXVK_CONFIG_FILE": "~/.config/dxvk.conf", + + #Enable DXVK's HUD; devinfo|fps|frametimes|submissions|drawcalls|pipelines|memory|gpuload|version|api|compiler|samplers|scale=x +# "DXVK_HUD": "devinfo,fps", + + #Limit the frame rate. A value of 0 uncaps the frame rate, while any positive value will limit rendering to the given number of frames per second. +# "DXVK_FRAME_RATE": "60", + + #DXVK pipeline cache; "0" disable|"/some/directory" Defaults to the current working directory of the application. +# "DXVK_STATE_CACHE": "0", + + #Selects devices with a matching Vulkan device name, which can be retrieved with tools such as vulkaninfo. +# "DXVK_FILTER_DEVICE_NAME": "Device Name", + + #Vulkan debug layers. Requires the Vulkan SDK to be installed. +# "VK_INSTANCE_LAYERS": "VK_LAYER_KHRONOS_validation", + + ###### Wine flags ###### + + #Enable integer scaling mode, to give sharp pixels when upscaling. +# "WINE_FULLSCREEN_INTEGER_SCALING": "1", + + #Wine debug logging +# "WINEDEBUG": "+timestamp,+pid,+seh,+unwind,+debugstr,+loaddll,+mscoree", + + #vkd3d debug logging +# "VKD3D_DEBUG": "warn", + + #wine-mono debug logging (Wine's .NET replacement) +# "WINE_MONO_TRACE": "E:System.NotImplementedException", + #"MONO_LOG_LEVEL": "info", + + #general purpose media logging +# "GST_DEBUG": "4", + #or, verbose converter logging (may impact playback performance): +# "GST_DEBUG": "4,WINE:7,protonaudioconverter:7,protonaudioconverterbin:7,protonvideoconverter:7", +# "GST_DEBUG_NO_COLOR": "1", +} |