-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment-wine-general
More file actions
executable file
·519 lines (516 loc) · 17.8 KB
/
environment-wine-general
File metadata and controls
executable file
·519 lines (516 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
#!/usr/bin/env bash
jmn_wine_get_file_arch_dxvk() {
echo "Getting file architecture for \"$1\"..."
_W_ob_output="$(od -An -t x1 -j 0x12 -N 1 "${1}" | tr -d "[:space:]")"
local _W_ob_output
case "${_W_ob_output}" in
"3e") _W_file_arch="x86_64" ;;
"03"|"06") _W_file_arch="i386" ;;
*) _W_file_arch="" ;;
esac
echo "${_W_file_arch}"
}
if [[ -z "${PROTON_LOCAL_SHADER_CACHE+x}" ]]; then
export PROTON_LOCAL_SHADER_CACHE=1
fi
if [[ -z "${PROTONCOMPATPATH+x}" ]]; then
if [[ -n "${PROTONPATH+x}" ]]; then
export PROTONCOMPATPATH="$PROTONPATH"
fi
fi
if [[ -z "${SteamAppId+x}" ]]; then
if [[ -n "${APPID+x}" ]]; then
export SteamAppId="$APPID"
elif [[ -z "${APPID+x}" ]] && [[ -n "${JMN_DEFAULT_APPID+x}" ]]; then
export SteamAppId="$JMN_DEFAULT_APPID"
fi
fi
if [[ -z "${APPID+x}" ]]; then
if [[ -n "${SteamAppId+x}" ]]; then
export APPID="$SteamAppId"
fi
fi
if [[ -z "${STEAM_COMPAT_DATA_PATH+x}" ]]; then
if [[ -z "${WINEPREFIX+x}" ]] && [[ -n "${JMN_DEFAULT_COMPAT_ROOT+x}" ]]; then
export STEAM_COMPAT_DATA_PATH="$HOME/Games/__Userdata__/compatdata/$JMN_DEFAULT_COMPAT_ROOT/$SteamAppId"
fi
fi
if [[ -z "${STEAM_COMPAT_SHADER_PATH+x}" ]]; then
if [[ "$STEAM_COMPAT_DATA_PATH" == "$HOME/Games/__Userdata__/compatdata/$JMN_DEFAULT_COMPAT_ROOT/$SteamAppId" ]]; then
STEAM_COMPAT_SHADER_PATH="$HOME/Games/__Apps__/Shader-Cache/$JMN_DEFAULT_COMPAT_ROOT/$SteamAppId"
else
STEAM_COMPAT_SHADER_PATH="$(realpath -q "$STEAM_COMPAT_DATA_PATH/../../shadercache/$SteamAppId")"
fi
export STEAM_COMPAT_SHADER_PATH
fi
if [[ -z ${BASE_STEAM_COMPAT+x} ]]; then
BASE_STEAM_COMPAT="$STEAM_COMPAT_DATA_PATH"
fi
if [[ "$APPID" == "$JMN_DEFAULT_APPID" ]]; then
export UMU_STEAM_GAME_ID="$APPID"
export STORE="none"
export GAMEID="umu-default"
elif [[ "$APPID" != "$JMN_DEFAULT_APPID" ]]; then
export UMU_STEAM_GAME_ID="$APPID"
export STORE="steam"
export GAMEID="umu-$APPID"
fi
if [[ -z "${JMN_LOCAL_PROTON+x}" ]]; then
export JMN_LOCAL_PROTON="0"
fi
if [[ -z "${WINEPREFIXDRIVEC+x}" ]]; then
export WINEPREFIXDRIVEC="$WINEPREFIX/drive_c"
fi
if [[ "$JMN_LOCAL_PROTON" = "1" ]] || [[ "$JMN_LOCAL_PROTON" = "true" ]] || [[ "$JMN_LOCAL_PROTON" = "yes" ]]; then
PROTON_VERSION="$(< "${STEAM_COMPAT_DATA_PATH}/version" sed -n 1p)"
export PROTON_VERSION
export PROTONCOMPATPATH="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/compatibilitytools.d/$PROTON_VERSION"
fi
if [[ -z "${PROTONPATH+x}" ]]; then
export PROTONPATH="$PROTONCOMPATPATH"
fi
if [[ -d "${PROTONCOMPATPATH}" ]]; then
if [[ -z "${WINESERVER+x}" ]]; then
WINESERVER="$(find "$PROTONCOMPATPATH" -type f -wholename "*/bin/wineserver")"
export WINESERVER
if [[ -e "${WINESERVER}" ]] && [[ -d "${WINESERVER}" ]]; then
unset WINESERVER
fi
fi
if [[ -z "${WINE+x}" ]]; then
WINE="$(find "$PROTONCOMPATPATH" -type f -wholename "*/bin/wine")"
export WINE
if [[ -e "${WINE}" ]] && [[ -d "${WINE}" ]]; then
unset WINE
elif ! [[ -e "${WINE}" ]]; then
unset WINE
fi
fi
if [[ -z "${WINE64+x}" ]]; then
WINE64="$(find "$PROTONCOMPATPATH" -type f -wholename "*/bin/wine64")"
export WINE64
if [[ -e "${WINE64}" ]] && [[ -d "${WINE64}" ]]; then
unset WINE64
elif ! [[ -e "${WINE64}" ]]; then
unset WINE64
fi
fi
if [[ -z "$WINE64" ]]; then
export WINE64="$WINE"
fi
if [[ -z "$WINEARCH" ]]; then
WINE_ARCH="$(jmn_wine_get_file_arch_dxvk "$WINE")"
export WINE_ARCH
WINE64_ARCH="$(jmn_wine_get_file_arch_dxvk "$WINE64")"
export WINE64_ARCH
if [[ -f "$WINEPREFIX"/system.reg ]]; then
ARCH="$(grep "^#arch=win" "$WINEPREFIX"/system.reg)"
ARCH="${ARCH##*=}"
export ARCH
elif [[ "$WINE_ARCH" == "x86_64" ]] || [[ "$WINE64_ARCH" == "x86_64" ]]; then
export ARCH="win64"
elif [[ "$WINE_ARCH" == "i386" ]] && [[ "$WINE64_ARCH" == "i386" ]]; then
export ARCH="win32"
fi
else
export ARCH="$WINEARCH"
fi
if [[ -z "${WINE_PATH+x}" ]]; then
WINE_PATH="$(dirname "$WINESERVER")"
export WINE_PATH
fi
if [[ -z "${WINEBOOT+x}" ]]; then
WINEBOOT="$(find "$PROTONCOMPATPATH" -type f -wholename "*/bin/wineboot")"
export WINEBOOT
if [[ -e "${WINEBOOT}" ]] && [[ -d "${WINEBOOT}" ]]; then
unset WINEBOOT
elif ! [[ -e "${WINEBOOT}" ]]; then
unset WINEBOOT
fi
fi
if [[ -z "${WINELOADER+x}" ]]; then
if [[ -n "${WINE}" ]]; then
export WINELOADER="$WINE"
elif [[ -n "${WINE64}" ]]; then
export WINELOADER="$WINE64"
fi
if [[ -e "${WINELOADER}" ]] && [[ -d "${WINELOADER}" ]]; then
unset WINELOADER
elif ! [[ -e "${WINELOADER}" ]]; then
unset WINELOADER
fi
fi
WINE_VER="$("$WINESERVER" --version | grep Wine)"
export WINE_VER
fi
if [[ -z "${STEAM_COMPAT_INSTALL_PATH+x}" ]]; then
export STEAM_COMPAT_INSTALL_PATH="$STEAM_COMPAT_DATA_PATH"
fi
if [[ -z "${INSTALL_BASE+x}" ]]; then
INSTALL_BASE="${STEAM_COMPAT_INSTALL_PATH##*/}"
export INSTALL_BASE
fi
if [[ -z "${DXVK_FILTER_DEVICE_NAME+x}" ]]; then
export DXVK_FILTER_DEVICE_NAME="NVIDIA GeForce RTX 3060"
fi
if [[ -z "${VKD3D_FILTER_DEVICE_NAME}" ]]; then
export VKD3D_FILTER_DEVICE_NAME="NVIDIA GeForce RTX 3060"
fi
if [[ -z "${STEAM_COMPAT_BY_NAME_BASE+x}" ]]; then
export STEAM_COMPAT_BY_NAME_BASE="$HOME/Games/__Userdata__/compatdata/By-Name"
fi
if [[ -z "${STEAM_COMPAT_BY_NAME+x}" ]]; then
export STEAM_COMPAT_BY_NAME="$STEAM_COMPAT_BY_NAME_BASE/$INSTALL_BASE"
fi
if [[ -z "${SDL_VIDEODRIVER+x}" ]]; then
export SDL_VIDEODRIVER="wayland,x11"
fi
if [[ -z "${JMN_LSFG+x}" ]]; then
export JMN_LSFG="0"
fi
if [[ "$JMN_LSFG" = "1" ]] || [[ "$JMN_LSFG" = "true" ]] || [[ "$JMN_LSFG" = "yes" ]]; then
export LSFGVK_PROFILE="2x FG / 100%"
elif [[ "$JMN_LSFG" != "1" ]] && [[ "$JMN_LSFG" != "true" ]] && [[ "$JMN_LSFG" != "yes" ]]; then
export DISABLE_LSFGVK="1"
fi
if [[ -z "${JMN_WAYLAND+x}" ]]; then
export JMN_WAYLAND="0"
fi
if [[ "$JMN_WAYLAND" = "1" ]] || [[ "$JMN_WAYLAND" = "true" ]] || [[ "$JMN_WAYLAND" = "yes" ]]; then
export PROTON_ENABLE_WAYLAND="1"
fi
if [[ -z "${JMN_PRIORITY+x}" ]]; then
export JMN_PRIORITY="1"
fi
if [[ "$JMN_PRIORITY" = "1" ]] || [[ "$JMN_PRIORITY" = "true" ]] || [[ "$JMN_PRIORITY" = "yes" ]]; then
export PROTON_PRIORITY_HIGH="1"
fi
if [[ -z "${JMN_DXVK+x}" ]]; then
export JMN_DXVK="1"
fi
if [[ -z "${JMN_EXPLORER+x}" ]]; then
export JMN_EXPLORER="0"
fi
if [[ -z "${JMN_MANGOHUD+x}" ]]; then
export JMN_MANGOHUD="0"
fi
if [[ -z "${JMN_NODECORATE+x}" ]]; then
export JMN_NODECORATE="0"
fi
if [[ -z "${JMN_NONGX+x}" ]]; then
export JMN_NONGX="0"
fi
if [[ -z "${JMN_NONVAPI+x}" ]]; then
export JMN_NONVAPI="0"
fi
if [[ -z "${JMN_NOSYNC+x}" ]]; then
export JMN_NOSYNC="1"
fi
if [[ -z "${JMN_SDL+x}" ]]; then
export JMN_SDL="1"
fi
if [[ -z "${JMN_WEMOD+x}" ]]; then
export JMN_WEMOD="0"
fi
if [[ -z "${JMN_WEMOD_UPDATE_SCRIPT+x}" ]]; then
export JMN_WEMOD_UPDATE_SCRIPT="0"
fi
if [[ -z "${JMN_ZINK+x}" ]]; then
export JMN_ZINK="0"
fi
if [[ -z "${JMN_DECK+x}" ]]; then
export JMN_DECK="0"
fi
if [[ -z "${JMN_NOXESSUP+x}" ]]; then
export JMN_NOXESSUP="1"
fi
if [[ -z "${JMN_SURROUND+x}" ]]; then
export JMN_SURROUND="0"
fi
if [[ "$JMN_SURROUND" = "1" ]] || [[ "$JMN_SURROUND" = "true" ]] || [[ "$JMN_SURROUND" = "yes" ]]; then
if [[ -z "${WINEDLLOVERRIDES+x}" ]]; then
export WINEDLLOVERRIDES="winepulse.drv=d"
elif [[ -n "${WINEDLLOVERRIDES+x}" ]]; then
export WINEDLLOVERRIDES="${WINEDLLOVERRIDES};winepulse.drv=d"
fi
export WINEALSA_CHANNELS="6"
fi
if [[ -z "${JMN_SURROUND_FIX+x}" ]]; then
export JMN_SURROUND_FIX="0"
fi
if [[ "$JMN_SURROUND_FIX" = "1" ]] || [[ "$JMN_SURROUND_FIX" = "true" ]] || [[ "$JMN_SURROUND_FIX" = "yes" ]]; then
export WINEALSA_SPATIAL="1"
fi
if [[ "$JMN_NOXESSUP" = "1" ]] || [[ "$JMN_NOXESSUP" = "true" ]] || [[ "$JMN_NOXESSUP" = "yes" ]]; then
export PROTON_XESS_UPGRADE="0"
fi
if [[ -z "${PROTON_XESS_UPGRADE+x}" ]]; then
export PROTON_XESS_UPGRADE="1"
fi
if [[ -z "${JMN_NOFSR4UP+x}" ]]; then
export JMN_NOFSR4UP="1"
fi
if [[ "$JMN_NOFSR4UP" = "1" ]] || [[ "$JMN_NOFSR4UP" = "true" ]] || [[ "$JMN_NOFSR4UP" = "yes" ]]; then
export PROTON_FSR4_UPGRADE="0"
fi
if [[ -z "${PROTON_FSR4_UPGRADE+x}" ]]; then
export PROTON_FSR4_UPGRADE="1"
fi
if [[ -z "${JMN_NODLSSUP+x}" ]]; then
export JMN_NODLSSUP="1"
fi
if [[ "$JMN_NODLSSUP" = "1" ]] || [[ "$JMN_NODLSSUP" = "true" ]] || [[ "$JMN_NODLSSUP" = "yes" ]]; then
export PROTON_DLSS_UPGRADE="0"
fi
if [[ -z "${PROTON_DLSS_UPGRADE+x}" ]]; then
export PROTON_DLSS_UPGRADE="1"
fi
if [[ -n "${JMN_FPS+x}" ]]; then
if ! [[ "${JMN_FPS}" =~ ^[0-9]+$ ]] || [[ -z "${JMN_FPS}" ]]; then
export JMN_FPS="30"
elif [[ "${JMN_FPS}" =~ ^[0-9]+$ ]]; then
export JMN_FPS
fi
fi
if [[ -z "${JMN_ANISO+x}" ]]; then
export JMN_ANISO="-1"
fi
if [[ -z "${JMN_VSYNC+x}" ]]; then
export JMN_VSYNC="-1"
fi
if [[ -z "${JMN_32+x}" ]]; then
export JMN_32="1"
fi
if [[ "$JMN_32" = "1" ]] || [[ "$JMN_32" = "true" ]] || [[ "$JMN_32" = "yes" ]]; then
export PROTON_USE_WOW64="1"
fi
if [[ -z "${PROTON_USE_WOW64+x}" ]]; then
export PROTON_USE_WOW64="0"
fi
if [[ -z "${JMN_NONTSYNC+x}" ]]; then
export JMN_NONTSYNC="0"
fi
if [[ "$JMN_NONTSYNC" = "1" ]] || [[ "$JMN_NONTSYNC" = "true" ]] || [[ "$JMN_NONTSYNC" = "yes" ]]; then
export PROTON_USE_NTSYNC="0"
export PROTON_NO_NTSYNC="1"
elif [[ "$JMN_NONTSYNC" != "1" ]] && [[ "$JMN_NONTSYNC" != "true" ]] && [[ "$JMN_NONTSYNC" != "yes" ]]; then
export PROTON_USE_NTSYNC="1"
export PROTON_NO_NTSYNC="0"
fi
if [[ "$JMN_SDL" = "1" ]] || [[ "$JMN_SDL" = "true" ]] || [[ "$JMN_SDL" = "yes" ]]; then
export PROTON_USE_SDL="1"
export PROTON_PREFER_SDL_INPUT="1"
export WINE_PREFER_SDL_INPUT="1"
fi
if [[ "$JMN_NODECORATE" = "1" ]] || [[ "$JMN_NODECORATE" = "true" ]] || [[ "$JMN_NODECORATE" = "yes" ]]; then
export PROTON_NO_WM_DECORATION="1"
export WINE_NO_WM_DECORATION="1"
fi
if [[ -z "${UMU_NO_RUNTIME+x}" ]]; then
export UMU_NO_RUNTIME="1"
fi
if [[ -z "${UMU_RUNTIME_UPDATE+x}" ]]; then
export UMU_RUNTIME_UPDATE="1"
fi
if [[ -z "${JMN_NODLSSSWAP+x}" ]]; then
export JMN_NODLSSSWAP="1"
fi
if [[ "$JMN_DECK" = "1" ]] || [[ "$JMN_DECK" = "true" ]] || [[ "$JMN_DECK" = "yes" ]]; then
export SteamDeck="1"
fi
if [[ -z "${DXVK_CONFIG+x}" ]]; then
export DXVK_CONFIG="d3d11.maxFeatureLevel=12_1:d3d11.samplerAnisotropy=$JMN_ANISO:d3d9.customDeviceId=2503:d3d9.customVendorId=10de:d3d9.dpiAware=True:d3d9.maxAvailableMemory=12160:d3d9.maxFrameRate=$JMN_FPS:d3d9.presentInterval=$JMN_VSYNC:d3d9.samplerAnisotropy=$JMN_ANISO:d3d9.shaderModel=3:dxgi.customDeviceId=2503:dxgi.customVendorId=10de:dxgi.maxDeviceMemory=12160:dxgi.maxFrameRate=$JMN_FPS:dxgi.nvapiHack = False:dxgi.syncInterval=$JMN_VSYNC:dxvk.enableAsync=true:dxvk.tearFree=Auto"
elif [[ -n "${DXVK_CONFIG+x}" ]]; then
export DXVK_CONFIG="${DXVK_CONFIG}:d3d11.maxFeatureLevel=12_1:d3d11.samplerAnisotropy=$JMN_ANISO:d3d9.customDeviceId=2503:d3d9.customVendorId=10de:d3d9.dpiAware=True:d3d9.maxAvailableMemory=12160:d3d9.maxFrameRate=$JMN_FPS:d3d9.presentInterval=$JMN_VSYNC:d3d9.samplerAnisotropy=$JMN_ANISO:d3d9.shaderModel=3:dxgi.customDeviceId=2503:dxgi.customVendorId=10de:dxgi.maxDeviceMemory=12160:dxgi.maxFrameRate=$JMN_FPS:dxgi.nvapiHack = False:dxgi.syncInterval=$JMN_VSYNC:dxvk.enableAsync=true:dxvk.tearFree=Auto"
fi
if [[ -z "${VKD3D_FRAME_RATE+x}" ]]; then
export VKD3D_FRAME_RATE="$JMN_FPS"
fi
if [[ "$JMN_ZINK" = "1" ]] || [[ "$JMN_ZINK" = "true" ]] || [[ "$JMN_ZINK" = "yes" ]]; then
export __GLX_VENDOR_LIBRARY_NAME="mesa"
export GALLIUM_DRIVER="zink"
export MESA_LOADER_DRIVER_OVERRIDE="zink"
fi
if [[ "$JMN_EXPLORER" = "1" ]] || [[ "$JMN_EXPLORER" = "true" ]] || [[ "$JMN_EXPLORER" = "yes" ]]; then
export PROTON_REMOTE_DEBUG_CMD="$HOME/Games/__Tools__/Explorer++/Explorer++.exe"
fi
if [[ -n "${PROTON_DEBUG_DIR}" ]] && [[ -d "${PROTON_DEBUG_DIR}" ]] && [[ -e "${PROTON_DEBUG_DIR}" ]]; then
if [[ -z "${LOG_DIR+x}" ]]; then
export LOG_DIR="$PROTON_DEBUG_DIR/logs/$INSTALL_BASE"
fi
if [[ -z "${PROTONLOGPATH+x}" ]]; then
export PROTONLOGPATH="$PROTON_DEBUG_DIR/logs/$INSTALL_BASE"
fi
fi
if [[ -z "${SCRIPT_DIR+x}" ]]; then
export SCRIPT_DIR="$HOME/Games/wine"
fi
if [[ -d "${STEAM_COMPAT_SHADER_PATH}" ]]; then
if [[ -z "${__GL_SHADER_DISK_CACHE_PATH+x}" ]]; then
export __GL_SHADER_DISK_CACHE_PATH="$STEAM_COMPAT_SHADER_PATH/nvidiav1"
fi
if [[ -z "${AMD_VK_PIPELINE_CACHE_PATH+x}" ]]; then
export AMD_VK_PIPELINE_CACHE_PATH="$STEAM_COMPAT_SHADER_PATH/AMDv1"
fi
if [[ -z "${DXVK_STATE_CACHE_PATH+x}" ]]; then
export DXVK_STATE_CACHE_PATH="$STEAM_COMPAT_SHADER_PATH/DXVK_state_cache"
fi
if [[ -z "${DXVK_SHADER_CACHE_PATH+x}" ]]; then
export DXVK_SHADER_CACHE_PATH="$STEAM_COMPAT_SHADER_PATH/DXVK_shader_cache"
fi
if [[ -z "${MESA_GLSL_CACHE_DIR+x}" ]]; then
export MESA_GLSL_CACHE_DIR="$STEAM_COMPAT_SHADER_PATH"
fi
if [[ -z "${MESA_SHADER_CACHE_DIR+x}" ]]; then
export MESA_SHADER_CACHE_DIR="$STEAM_COMPAT_SHADER_PATH"
fi
if [[ -z "${VKD3D_SHADER_CACHE_PATH+x}" ]]; then
export VKD3D_SHADER_CACHE_PATH="$STEAM_COMPAT_SHADER_PATH/VKD3D_state_cache"
fi
fi
if [[ "$JMN_NONVAPI" != "1" ]] && [[ "$JMN_NONVAPI" != "true" ]] && [[ "$JMN_NONVAPI" != "yes" ]]; then
export PROTON_DISABLE_NVAPI="0"
export PROTON_ENABLE_NVAPI="1"
export PROTON_FORCE_NVAPI="1"
export PROTON_HIDE_NVIDIA_GPU="0"
fi
if [[ "$JMN_NOSYNC" != "1" ]] && [[ "$JMN_NOSYNC" != "true" ]] && [[ "$JMN_NOSYNC" != "yes" ]]; then
export PROTON_NO_ESYNC="0"
export PROTON_NO_FSYNC="0"
export WINEESYNC="1"
export WINEFSYNC="1"
fi
if [[ "$JMN_NONGX" != "1" ]] && [[ "$JMN_NONGX" != "true" ]] && [[ "$JMN_NONGX" != "yes" ]]; then
export PROTON_ENABLE_NGX_UPDATER="1"
fi
if [[ -z "${__GL_SHADER_DISK_CACHE_SKIP_CLEANUP+x}" ]]; then
export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP="1"
fi
if [[ -z "${__GL_SHADER_DISK_CACHE+x}" ]]; then
export __GL_SHADER_DISK_CACHE="1"
fi
if [[ -z "${__GL_THREADED_OPTIMIZATIONS+x}" ]]; then
export __GL_THREADED_OPTIMIZATIONS="1"
fi
if [[ -z "${DXVK_HUD+x}" ]]; then
export DXVK_HUD="compiler"
elif [[ -n "${DXVK_HUD+x}" ]]; then
export DXVK_HUD="${DXVK_HUD},compiler"
fi
if [[ -z "${DXVK_LOG_LEVEL+x}" ]]; then
export DXVK_LOG_LEVEL="none"
fi
if [[ -z "${VKD3D_DEBUG+x}" ]]; then
export VKD3D_DEBUG="none"
fi
if [[ -z "${VKD3D_SHADER_DEBUG+x}" ]]; then
export VKD3D_SHADER_DEBUG="none"
fi
if [[ -z "${DXVK_NVAPI_ALLOW_OTHER_DRIVERS+x}" ]]; then
export DXVK_NVAPI_ALLOW_OTHER_DRIVERS="1"
fi
if [[ -z "${DXVK_NVAPI_LOG_LEVEL+x}" ]]; then
export DXVK_NVAPI_LOG_LEVEL="none"
fi
if [[ -z "${DXVK_STATE_CACHE+x}" ]]; then
export DXVK_STATE_CACHE="1"
fi
if [[ -z "${DXVK_SHADER_CACHE+x}" ]]; then
export DXVK_SHADER_CACHE="1"
fi
if [[ -z "${PROTON_DUMP_DEBUG_COMMANDS+x}" ]]; then
export PROTON_DUMP_DEBUG_COMMANDS="1"
fi
if [[ -z "${PROTON_FORCE_LARGE_ADDRESS_AWARE+x}" ]]; then
export PROTON_FORCE_LARGE_ADDRESS_AWARE="1"
fi
if [[ -z "${STAGING_SHARED_MEMORY+x}" ]]; then
export STAGING_SHARED_MEMORY="1"
fi
if [[ -z "${PROTON_LOG+x}" ]]; then
export PROTON_LOG="0"
fi
if [[ -z "${PROTON_SET_GAME_DRIVE+x}" ]]; then
export PROTON_SET_GAME_DRIVE="1"
fi
if [[ -z "${PROTON_USE_XALIA+x}" ]]; then
export PROTON_USE_XALIA="0"
fi
if [[ -z "${RADV_PERFTEST+x}" ]]; then
export RADV_PERFTEST="gpl"
elif [[ -n "${RADV_PERFTEST+x}" ]]; then
export RADV_PERFTEST="${RADV_PERFTEST},gpl"
fi
if [[ -z "${VK_ICD_FILENAMES+x}" ]] && [[ -z "${container+x}" ]]; then
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json"
fi
if [[ -z "${VKD3D_CONFIG+x}" ]]; then
export VKD3D_CONFIG="dxr12"
elif [[ -n "${VKD3D_CONFIG+x}" ]]; then
export VKD3D_CONFIG="${VKD3D_CONFIG},dxr12"
fi
if [[ -z "${VKD3D_FEATURE_LEVEL+x}" ]]; then
export VKD3D_FEATURE_LEVEL="12_2"
fi
if [[ -z "${WINE_FULLSCREEN_INTEGER_SCALING+x}" ]]; then
export WINE_FULLSCREEN_INTEGER_SCALING="1"
fi
if [[ -z "${VKD3D_SHADER_MODEL+x}" ]]; then
export VKD3D_SHADER_MODEL="6_7"
fi
if [[ -z "${WINE_CPU_TOPOLOGY+x}" ]]; then
export WINE_CPU_TOPOLOGY="7:1,2,3,4,5,6,7"
fi
if [[ -z "${WINEDEBUG+x}" ]]; then
export WINEDEBUG="-all"
fi
if [[ -z "${WINE_SIMULATE_WRITECOPY+x}" ]]; then
export WINE_SIMULATE_WRITECOPY="1"
fi
if [[ -z "${JMN_EXEC+x}" ]]; then
if ! [[ -f "$(which gamemoderun 2>/dev/null)" ]] && [[ -f "$(which game-performance 2>/dev/null)" ]]; then
export JMN_EXEC=("game-performance" "${@:-${@}}")
elif [[ -f "$(which gamemoderun 2>/dev/null)" ]] && [[ -f "$(which game-performance 2>/dev/null)" ]]; then
export JMN_EXEC=("game-performance" "${@:-${@}}")
elif [[ -f "$(which gamemoderun 2>/dev/null)" ]] && ! [[ -f "$(which game-performance 2>/dev/null)" ]]; then
export JMN_EXEC=("gamemoderun" "${@:-${@}}")
elif ! [[ -f "$(which gamemoderun 2>/dev/null)" ]] && ! [[ -f "$(which game-performance 2>/dev/null)" ]]; then
export JMN_EXEC=("${@:-${@}}")
fi
elif [[ -n "${JMN_EXEC+x}" ]]; then
export JMN_EXEC_TMP=("${JMN_EXEC[@]}" "${@:-${@}}")
export JMN_EXEC=("${JMN_EXEC_TMP[@]}")
unset JMN_EXEC_TMP
fi
if [[ "$JMN_WEMOD" = "1" ]] || [[ "$JMN_WEMOD" = "true" ]] || [[ "$JMN_WEMOD" = "yes" ]]; then
export WEMOD_DIR="$HOME/Repos/Games/wemod-launcher"
if [[ "$JMN_WEMOD_UPDATE_SCRIPT" = "1" ]] || [[ "$JMN_WEMOD_UPDATE_SCRIPT" = "true" ]] || [[ "$JMN_WEMOD_UPDATE_SCRIPT" = "yes" ]]; then
do_git_pull "$WEMOD_DIR"
fi
chmod -R ug+x "$WEMOD_DIR"
export JMN_EXEC_TMP=("$WEMOD_DIR/wemod" "${JMN_EXEC[@]}")
export JMN_EXEC=("${JMN_EXEC_TMP[@]}")
unset JMN_EXEC_TMP
fi
if [[ -z "${JMN_FGMOD+x}" ]]; then
export JMN_FGMOD="0"
fi
if [[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/goverlay/fgmod/fgmod" ]]; then
if [[ "$JMN_FGMOD" = "1" ]] || [[ "$JMN_FGMOD" = "true" ]] || [[ "$JMN_FGMOD" = "yes" ]]; then
export JMN_EXEC_TMP=("${XDG_DATA_HOME:-$HOME/.local/share}/goverlay/fgmod/fgmod" "${JMN_EXEC[@]}")
export JMN_EXEC=("${JMN_EXEC_TMP[@]}")
unset JMN_EXEC_TMP
fi
fi
if [[ -n "${JMN_NODLSSSWAP+x}" ]] && [[ "$JMN_NODLSSSWAP" != "1" ]] && [[ "$JMN_NODLSSSWAP" != "true" ]] && [[ "$JMN_NODLSSSWAP" != "yes" ]]; then
export JMN_EXEC_TMP=("dlss-swapper" "${JMN_EXEC[@]}")
export JMN_EXEC=("${JMN_EXEC_TMP[@]}")
unset JMN_EXEC_TMP
fi
if [[ "$JMN_MANGOHUD" = "1" ]] || [[ "$JMN_MANGOHUD" = "true" ]] || [[ "$JMN_MANGOHUD" = "yes" ]]; then
export JMN_EXEC_TMP=("mangohud" "${JMN_EXEC[@]}")
export JMN_EXEC=("${JMN_EXEC_TMP[@]}")
unset JMN_EXEC_TMP
fi
export JMN_EXEC_STRING="${JMN_EXEC[*]}"
source environment-general-functions