Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortProton
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortProton
Commits
2f50fd23
Commit
2f50fd23
authored
Sep 07, 2023
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more functions
parent
88bd8a5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
45 deletions
+96
-45
portproton-cmd
portproton-cmd
+96
-45
No files found.
portproton-cmd
View file @
2f50fd23
...
...
@@ -29,24 +29,7 @@ check_variables WINE_HEAP_DELAY_FREE "0"
check_variables WINE_ALLOW_XIM
"0"
check_variables DEBUG 0
if
[[
$DEBUG
!=
1
]]
;
then
check_variables WINEDEBUG
"-all"
check_variables DXVK_LOG_LEVEL
"none"
check_variables VKD3D_SHADER_DEBUG
"none"
check_variables VKD3D_DEBUG
"none"
check_variables DXVK_LOG_PATH
"none"
check_variables VKBASALT_LOG_LEVEL
"none"
check_variables DXVK_NVAPI_LOG_LEVEL
"none"
else
check_variables WINEDEBUG
"fixme-all,err+loaddll,err+dll,err+file,err+reg"
check_variables DXVK_LOG_LEVEL
"warn"
check_variables VKD3D_DEBUG
"warn"
check_variables WINE_MONO_TRACE
"E:System.NotImplementedException"
check_variables VK_LOADER_DEBUG
"warn"
check_variables VKBASALT_LOG_LEVEL
"warn"
check_variables DXVK_NVAPI_LOG_LEVEL
"warn"
fi
check_variables PP_WINE_USE
"PROTON_LG_8-14"
check_variables PP_WINDOWS_VER
"10"
check_variables PP_USE_GSTREAMER
"1"
check_variables PP_USE_D3D_EXTRAS
"1"
...
...
@@ -67,14 +50,14 @@ check_variables USE_OPENGL "0"
check_variables D8VK_VER
"1.0"
check_variables DXVK_STABLE_VER
"1.10.3"
check_variables DXVK_GIT_VER
"2.2"
check_variables DXVK_STABLE_VER
"1.10.3
-28
"
check_variables DXVK_GIT_VER
"2.2
-164
"
# check_variables DXVK_CONFIG_FILE "path/to/dxvk.conf"
check_variables VKD3D_STABLE_VER
"
2.8
"
check_variables VKD3D_GIT_VER
"
2.9
"
check_variables VKD3D_STABLE_VER
"
1.1-2602
"
check_variables VKD3D_GIT_VER
"
1.1-3556
"
check_variables VKD3D_LIMIT_TESS_FACTORS 32
#
check_variables VKD3D_FEATURE_LEVEL "12_0"
check_variables VKD3D_FEATURE_LEVEL
"12_0"
check_variables MANGOHUD 0
check_variables MANGOHUD_CONFIG
"cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt"
...
...
@@ -191,6 +174,19 @@ try_download () {
fi
}
upper_in_dir
()
{
if
[[
-n
$(
ls
$1
)
]]
;
then
orig_IFS
=
"
$IFS
"
&&
IFS
=
$'
\n
'
for
upper_dir
in
$(
ls
-1
"
$1
/"
)
;
do
upper_dir_new
=
$(
echo
"
$upper_dir
"
|
awk
'$1=$1'
|
sed
-e
s/[[:blank:]]/_/g
)
if
[[
!
-d
"
$PP_DIST_DIR
/
${
upper_dir_new
^^
}
"
]]
;
then
mv
--
"
$PP_DIST_DIR
/
$upper_dir
"
"
$PP_DIST_DIR
/
${
upper_dir_new
^^
}
"
fi
done
IFS
=
"
$orig_IFS
"
fi
}
try_copy_other_dll_to_pfx_64
()
{
# добавить условие сравнение файла (копирование только при различии)
if
[[
"
$WINEARCH
"
==
"win64"
]]
;
then
...
...
@@ -279,9 +275,8 @@ init_opengl () {
try_copy_wine_dll_to_pfx_64
"
$wined3dfiles
.dll"
try_copy_wine_dll_to_pfx_32
"
$wined3dfiles
.dll"
done
#
check_variables WINE_D3D_CONFIG "renderer="
#
check_variables WINE_D3D_CONFIG "renderer="
[[
"
$MANGOHUD
"
==
1
]]
&&
MANGOHUD_RUN
=
"mangohud --dlsym"
export
DXVK_HUD
=
full
return
0
else
return
1
...
...
@@ -310,12 +305,13 @@ init_d8vk () {
}
init_dxvk
()
{
check_variables USE_DXVK_VER
"
$DXVK_
STABLE
_VER
"
check_variables USE_DXVK_VER
"
$DXVK_
GIT
_VER
"
for
DXVK_VAR_VER
in
"
$USE_DXVK_VER
"
$@
;
do
if
[[
!
-d
"
${
PP_VULKAN_LIBDIR
}
/dxvk-
$DXVK_VAR_VER
"
]]
;
then
DXVK_URL
=
"https://github.com/doitsujin/dxvk/releases/download/v
${
DXVK_VAR_VER
}
/dxvk-
${
DXVK_VAR_VER
}
.tar.gz"
DXVK_PACKAGE
=
"
${
PP_VULKAN_LIBDIR
}
/dxvk-
${
DXVK_VAR_VER
}
.tar.gz"
# DXVK_URL="https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VAR_VER}/dxvk-${DXVK_VAR_VER}.tar.gz"
DXVK_URL
=
"https://github.com/Castro-Fidel/vulkan/releases/download/dxvk-
${
DXVK_VAR_VER
}
/dxvk-
${
DXVK_VAR_VER
}
.tar.xz"
DXVK_PACKAGE
=
"
${
PP_VULKAN_LIBDIR
}
/dxvk-
${
DXVK_VAR_VER
}
.tar.xz"
if
try_download
"
$DXVK_URL
"
"
$DXVK_PACKAGE
"
then
if
try_unpack_file
"
$DXVK_PACKAGE
"
"
$PP_VULKAN_LIBDIR
"
...
...
@@ -341,12 +337,13 @@ init_dxvk () {
}
init_vkd3d
()
{
check_variables USE_VKD3D_VER
"
$VKD3D_
STABLE
_VER
"
check_variables USE_VKD3D_VER
"
$VKD3D_
GIT
_VER
"
for
VKD3D_VAR_VER
in
"
$USE_VKD3D_VER
"
$@
;
do
if
[[
!
-d
"
${
PP_VULKAN_LIBDIR
}
/vkd3d-proton-
$VKD3D_VAR_VER
"
]]
;
then
VKD3D_URL
=
"https://github.com/HansKristian-Work/vkd3d-proton/releases/download/v
${
VKD3D_VAR_VER
}
/vkd3d-proton-
${
VKD3D_VAR_VER
}
.tar.zst"
VKD3D_PACKAGE
=
"
${
PP_VULKAN_LIBDIR
}
/vkd3d-proton-
${
VKD3D_VAR_VER
}
.tar.zst"
# VKD3D_URL="https://github.com/HansKristian-Work/vkd3d-proton/releases/download/v${VKD3D_VAR_VER}/vkd3d-proton-${VKD3D_VAR_VER}.tar.zst"
VKD3D_URL
=
"https://github.com/Castro-Fidel/vulkan/releases/download/vkd3d-proton-
${
VKD3D_VAR_VER
}
/vkd3d-proton-
${
VKD3D_VAR_VER
}
.tar.xz"
VKD3D_PACKAGE
=
"
${
PP_VULKAN_LIBDIR
}
/vkd3d-proton-
${
VKD3D_VAR_VER
}
.tar.xz"
if
try_download
"
$VKD3D_URL
"
"
$VKD3D_PACKAGE
"
then
if
try_unpack_file
"
$VKD3D_PACKAGE
"
"
$PP_VULKAN_LIBDIR
"
...
...
@@ -356,7 +353,7 @@ init_vkd3d () {
fi
done
VKD3D_FILES
=
"d3d12 d3d12core
"
# libvkd3d-shader-1 libvkd3d-proton-utils-3 libvkd3d-1
VKD3D_FILES
=
"d3d12 d3d12core
libvkd3d-shader-1 libvkd3d-1"
# libvkd3d-proton-utils-3
for
vkd3dfiles
in
$VKD3D_FILES
;
do
try_copy_other_dll_to_pfx_64
"
${
PP_VULKAN_LIBDIR
}
/vkd3d-proton-
$USE_VKD3D_VER
/x64/
$vkd3dfiles
.dll"
if
try_copy_other_dll_to_pfx_32
"
${
PP_VULKAN_LIBDIR
}
/vkd3d-proton-
$USE_VKD3D_VER
/x86/
$vkd3dfiles
.dll"
...
...
@@ -365,10 +362,30 @@ init_vkd3d () {
done
}
##### DOWNLOAD WINE #####
download_wine
()
{
if
[[
!
-d
"
$PP_DIST_DIR
/
$PP_WINE_USE
"
]]
;
then
WINE_URL
=
"https://github.com/Castro-Fidel/wine_builds/releases/download/
$PP_WINE_USE
/
$PP_WINE_USE
.tar.xz"
WINE_PACKAGE
=
"
$PP_TMP_DIR
/
${
PP_WINE_USE
}
.tar.xz"
if
try_download
"
$WINE_URL
"
"
$WINE_PACKAGE
"
;
then
if
try_unpack_file
"
$WINE_PACKAGE
"
"
$PP_DIST_DIR
/"
;
then
echo
"
$PP_WINE_USE
"
>
"
$PP_DIST_DIR
/
$PP_WINE_USE
/version"
try_remove_file
"
$WINE_PACKAGE
"
upper_in_dir
"
$PP_DIST_DIR
"
fi
fi
fi
}
##### INITIAL WINE SETTINGS #####
init_wine_ver
()
{
export
WINEDIR
=
"/home/fidel/wine_builds/wine-8.12-custom-x86"
if
[[
-n
"
$WINEDIR
"
]]
;
then
if
[[
"
$PP_WINE_USE
"
!=
system
*
]]
;
then
export
WINEDIR
=
"
$PP_DIST_DIR
/
$PP_WINE_USE
"
if
[[
!
-d
"
$WINEDIR
"
]]
;
then
download_wine
fi
export
WINE
=
"
${
WINEDIR
}
/bin/wine"
export
WINELOADER
=
"
${
WINEDIR
}
/bin/wine"
export
WINESERVER
=
"
${
WINEDIR
}
/bin/wineserver"
...
...
@@ -409,7 +426,7 @@ init_wine_ver () {
if
check_symlink
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
"
;
then
echo
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
is symlink. OK."
elif
[[
-d
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
"
]]
;
then
try_copy_dir
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
"
"
${
PP_TMP_DIR
}
"
| sszen
try_copy_dir
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
"
"
${
PP_TMP_DIR
}
"
try_remove_dir
"
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
"
try_force_link_dir
"
${
PP_TMP_DIR
}
/
${
mono_gecko_chk
}
"
"
${
WINEDIR
}
"
/share/wine/
echo
"Copy
${
WINEDIR
}
/share/wine/
${
mono_gecko_chk
}
to tmp and create symlink to
${
WINEDIR
}
/share/wine/. OK."
...
...
@@ -424,13 +441,38 @@ init_wine_ver () {
export
WINELOADER
=
"wine"
export
WINEDIR
=
"/usr"
fi
if
[[
$DEBUG
!=
1
]]
;
then
check_variables WINEDEBUG
"-all"
check_variables DXVK_LOG_LEVEL
"none"
check_variables VKD3D_SHADER_DEBUG
"none"
check_variables VKD3D_DEBUG
"none"
check_variables DXVK_LOG_PATH
"none"
check_variables VKBASALT_LOG_LEVEL
"none"
check_variables DXVK_NVAPI_LOG_LEVEL
"none"
else
check_variables WINEDEBUG
"fixme-all,err+loaddll,err+dll,err+file,err+reg"
check_variables DXVK_LOG_LEVEL
"error"
check_variables VKD3D_DEBUG
"error"
check_variables WINE_MONO_TRACE
"E:System.NotImplementedException"
check_variables VK_LOADER_DEBUG
"error"
check_variables VKBASALT_LOG_LEVEL
"error"
check_variables DXVK_NVAPI_LOG_LEVEL
"error"
fi
}
##### INITIAL WINEPREFIX SETTINGS #####
init_wineprefix
()
{
if
[[
-z
"
$WINEPREFIX
"
]]
;
then
export
WINEPREFIX
=
"
$PP_PREFIXES_DIR
/default"
else
if
echo
"
$WINEPREFIX
"
|
grep
-v
'/'
;
then
export
WINEPREFIX
=
"
$PP_PREFIXES_DIR
/
$WINEPREFIX
"
fi
fi
# временная заглушка
check_variables WINEPREFIX
"
$HOME
/.wine"
"
$WINELOADER
"
wineboot
-u
env
WINEDLLOVERRIDES
=
"winegstreamer="
"
$WINELOADER
"
wineboot
-i
}
wait_wineserver
()
{
...
...
@@ -475,11 +517,12 @@ use_winetricks () {
USE_WT_FROM_DB
=
0
[[
!
-f
"
$WINEPREFIX
/winetricks.log"
]]
&&
touch
"
$WINEPREFIX
/winetricks.log"
for
need_install_dll_to_pfx
in
$PP_DLL_INSTALL
;
do
if
[[
"
$need_install_dll_to_pfx
"
==
vcrun20
*
]]
;
then
if
[[
"
$need_install_dll_to_pfx
"
==
vcrun2015
]]
\
||
[[
"
$need_install_dll_to_pfx
"
==
vcrun2017
]]
\
||
[[
"
$need_install_dll_to_pfx
"
==
vcrun2019
]]
then
sed
-i
"/
${
need_install_dll_to_pfx
}
/d"
"
$WINEPREFIX
/winetricks.log"
need_install_dll_to_pfx
=
"vcrun2022"
sed
-i
'/vcrun2015/d'
"
$WINEPREFIX
/winetricks.log"
sed
-i
'/vcrun2017/d'
"
$WINEPREFIX
/winetricks.log"
sed
-i
'/vcrun2019/d'
"
$WINEPREFIX
/winetricks.log"
fi
if
!
grep
"
$need_install_dll_to_pfx
"
"
$WINEPREFIX
/winetricks.log"
&>/dev/null
;
then
if
[[
-z
"
$PP_DLL_NEED_INSTALL
"
]]
...
...
@@ -494,7 +537,7 @@ use_winetricks () {
print_info
"Try to install DLL in prefix:
${
PP_DLL_NEED_INSTALL
}
"
print_info
"START WINETRICKS..."
export
WINETRICKS_DOWNLOADER
=
"curl"
"
$PP_TMP_DIR
/winetricks"
-q
-r
-f
${
PP_DLL_NEED_INSTALL
}
env
WINEDLLOVERRIDES
=
"winegstreamer="
"
$PP_TMP_DIR
/winetricks"
-q
-r
-f
${
PP_DLL_NEED_INSTALL
}
wait_wineserver
fi
fi
...
...
@@ -514,11 +557,18 @@ check_win_file () {
return
1
;;
esac
WIN_FILE_PATH
=
"
$(
dirname
"
$WIN_FILE_EXEC
"
)
"
return
0
else
print_error
"File not found:
\n
$1
"
return
1
case
"
$1
"
in
winecfg
)
WIN_FILE_EXEC
=
"winecfg"
;;
winereg
)
WIN_FILE_EXEC
=
"winereg"
;;
winefile
)
WIN_FILE_EXEC
=
"winefile"
;;
wineconsole
)
WIN_FILE_EXEC
=
"wineconsole"
;;
*
)
print_error
"F: check_win_file"
return
1
;;
esac
fi
return
0
}
###################### MAIN ######################
...
...
@@ -539,6 +589,7 @@ PP_PREFIXES_DIR="$PORTPROTON_PATH/prefixes"
PP_DIST_DIR
=
"
$PORTPROTON_PATH
/dist"
PP_TMP_DIR
=
"
$PORTPROTON_PATH
/tmp"
create_new_dir
"
$PP_VULKAN_LIBDIR
"
"
$PP_TMP_DIR
"
"
$PP_DIST_DIR
"
"
$PP_PREFIXES_DIR
"
upper_in_dir
"
$PP_DIST_DIR
"
##### CHECK USER CONFIG FILE #####
PP_USER_CONF
=
"
$PORTPROTON_PATH
/user.conf"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment