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
88bd8a5f
Commit
88bd8a5f
authored
Aug 25, 2023
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetricks is working
parent
c37a2936
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
5 deletions
+77
-5
portproton-cmd
portproton-cmd
+77
-5
No files found.
portproton-cmd
View file @
88bd8a5f
...
@@ -11,7 +11,8 @@ fi
...
@@ -11,7 +11,8 @@ fi
check_variables
()
{
[[
-z
${
!1
}
]]
&&
export
$1
=
"
$2
"
;
}
check_variables
()
{
[[
-z
${
!1
}
]]
&&
export
$1
=
"
$2
"
;
}
##### DEFAULT VARIABLES #####
##### DEFAULT VARIABLES #####
check_variables PP_DEFAULT_PATH
"
$HOME
/.local/share/PortProton"
PP_DEFAULT_PATH
=
"
$HOME
/.local/share/PortProton"
PP_MUST_HAVE_DLL
=
"vcrun2022 physx nocrashdialog"
check_variables WINEESYNC
"1"
check_variables WINEESYNC
"1"
check_variables WINEFSYNC
"1"
check_variables WINEFSYNC
"1"
...
@@ -52,6 +53,7 @@ check_variables PP_USE_D3D_EXTRAS "1"
...
@@ -52,6 +53,7 @@ check_variables PP_USE_D3D_EXTRAS "1"
check_variables PP_USE_SHADER_CACHE
"1"
check_variables PP_USE_SHADER_CACHE
"1"
check_variables PP_USE_EAC_AND_BE
"1"
check_variables PP_USE_EAC_AND_BE
"1"
check_variables PP_USE_WINE_DXGI
"0"
check_variables PP_USE_WINE_DXGI
"0"
check_variables PP_DLL_INSTALL
""
check_variables WINE_WIN_START
"start /wait /high /unix"
check_variables WINE_WIN_START
"start /wait /high /unix"
...
@@ -263,9 +265,9 @@ var_radv_perftest_config_update () {
...
@@ -263,9 +265,9 @@ var_radv_perftest_config_update () {
}
}
var_vk_istance_layers_config_update
()
{
var_vk_istance_layers_config_update
()
{
if
[
!
-z
"
${
PW_
VK_INSTANCE_LAYERS
}
"
]
if
[
!
-z
"
${
VK_INSTANCE_LAYERS
}
"
]
then
export
PW_VK_INSTANCE_LAYERS
=
"
${
1
}
:
${
PW_
VK_INSTANCE_LAYERS
}
"
then
export
VK_INSTANCE_LAYERS
=
"
${
1
}
:
${
VK_INSTANCE_LAYERS
}
"
else
export
PW_
VK_INSTANCE_LAYERS
=
"
${
1
}
"
else
export
VK_INSTANCE_LAYERS
=
"
${
1
}
"
fi
fi
}
}
...
@@ -365,7 +367,7 @@ init_vkd3d () {
...
@@ -365,7 +367,7 @@ init_vkd3d () {
##### INITIAL WINE SETTINGS #####
##### INITIAL WINE SETTINGS #####
init_wine_ver
()
{
init_wine_ver
()
{
export
WINEDIR
=
""
export
WINEDIR
=
"
/home/fidel/wine_builds/wine-8.12-custom-x86
"
if
[[
-n
"
$WINEDIR
"
]]
;
then
if
[[
-n
"
$WINEDIR
"
]]
;
then
export
WINE
=
"
${
WINEDIR
}
/bin/wine"
export
WINE
=
"
${
WINEDIR
}
/bin/wine"
export
WINELOADER
=
"
${
WINEDIR
}
/bin/wine"
export
WINELOADER
=
"
${
WINEDIR
}
/bin/wine"
...
@@ -428,6 +430,75 @@ init_wine_ver () {
...
@@ -428,6 +430,75 @@ init_wine_ver () {
init_wineprefix
()
{
init_wineprefix
()
{
# временная заглушка
# временная заглушка
check_variables WINEPREFIX
"
$HOME
/.wine"
check_variables WINEPREFIX
"
$HOME
/.wine"
"
$WINELOADER
"
wineboot
-u
}
wait_wineserver
()
{
while
[
-n
"
$(
ls
-l
/proc/
*
/exe 2>/dev/null |
grep
-ie
portproton |
grep
-E
'wine(64)?-preloader|wineserver'
|
awk
-F
/
'{print $3}'
)
"
]
;
do
sleep
1
done
}
##### CHECK WINETRICKS #####
update_winetricks
()
{
W_TRX_URL
=
"https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
W_TRX_EXT_VER
=
"
$(
curl
-s
--list-only
"
$W_TRX_URL
"
|
grep
-i
'WINETRICKS_VERSION='
|
sed
's/WINETRICKS_VERSION=//'
)
"
print_info
"Version winetricks on server:
$W_TRX_EXT_VER
"
if
[[
-f
"
$PP_TMP_DIR
/winetricks"
]]
;
then
W_TRX_INT_VER
=
"
$(
cat
"
$PP_TMP_DIR
/winetricks"
|
grep
-i
'WINETRICKS_VERSION='
|
sed
's/WINETRICKS_VERSION=//'
)
"
print_info
"Version winetricks local:
$W_TRX_INT_VER
"
fi
if
[[
-n
"
$W_TRX_EXT_VER
"
]]
&&
[[
"
$W_TRX_INT_VER
"
!=
"
$W_TRX_EXT_VER
"
]]
;
then
if
try_download
"
$W_TRX_URL
"
"
$PP_TMP_DIR
/winetricks_new"
;
then
mv
-f
"
$PP_TMP_DIR
/winetricks_new"
"
$PP_TMP_DIR
/winetricks"
W_TRX_INT_VER
=
"
$(
cat
"
$PP_TMP_DIR
/winetricks"
|
grep
-i
'WINETRICKS_VERSION='
|
sed
's/WINETRICKS_VERSION=//'
)
"
print_info
"Winetricks version in has been updated (
${
W_TRX_INT_VER
}
)"
chmod
u+x
"
$PP_TMP_DIR
/winetricks"
fi
fi
if
[
-f
"
$PP_TMP_DIR
/winetricks"
]
;
then
sed
-i
's/w_metadata vcrun2015 dlls \\/w_metadata !dont_use_2015! dlls \\/'
"
$PP_TMP_DIR
/winetricks"
sed
-i
's/w_metadata vcrun2017 dlls \\/w_metadata !dont_use_2017! dlls \\/'
"
$PP_TMP_DIR
/winetricks"
sed
-i
's/w_metadata vcrun2019 dlls \\/w_metadata !dont_use_2019! dlls \\/'
"
$PP_TMP_DIR
/winetricks"
return
0
else
return
1
fi
}
use_winetricks
()
{
if
[[
-n
"
$PP_MUST_HAVE_DLL
"
]]
then
PP_DLL_INSTALL
=
"
$(
echo
"
$PP_MUST_HAVE_DLL
$PP_DLL_INSTALL
"
|
awk
'{ for(i=1;i<=NF;i++){a[$i]++} }END{ for(i in a){printf("%s ",i)} }'
)
"
fi
if
[[
-n
"
$PP_DLL_INSTALL
"
]]
;
then
PP_DLL_NEED_INSTALL
=
""
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
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
"
]]
then
PP_DLL_NEED_INSTALL
=
"
$need_install_dll_to_pfx
"
else
PP_DLL_NEED_INSTALL
=
"
$need_install_dll_to_pfx
$PP_DLL_NEED_INSTALL
"
fi
USE_WT_FROM_DB
=
1
fi
done
if
[[
"
$USE_WT_FROM_DB
"
==
"1"
]]
;
then
if
update_winetricks
;
then
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
}
wait_wineserver
fi
fi
fi
}
}
##### CHECK WINDOWS FILE #####
##### CHECK WINDOWS FILE #####
...
@@ -484,6 +555,7 @@ check_win_file "$1"
...
@@ -484,6 +555,7 @@ check_win_file "$1"
# TODO: проверка на автоустановку
# TODO: проверка на автоустановку
init_wine_ver
init_wine_ver
init_wineprefix
init_wineprefix
use_winetricks
if
!
init_opengl
;
then
if
!
init_opengl
;
then
init_d8vk
init_d8vk
init_dxvk
init_dxvk
...
...
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