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
fbc00002
Commit
fbc00002
authored
Sep 25, 2023
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added init_database function
parent
8270098a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
11 deletions
+46
-11
portproton-cmd
portproton-cmd
+46
-11
No files found.
portproton-cmd
View file @
fbc00002
...
...
@@ -29,7 +29,7 @@ check_variables WINE_HEAP_DELAY_FREE "0"
check_variables WINE_ALLOW_XIM
"0"
check_variables DEBUG 0
check_variables PP_WINE_USE
"PROTON_LG_8-1
4
"
check_variables PP_WINE_USE
"PROTON_LG_8-1
5-1
"
check_variables PP_WINDOWS_VER
"10"
check_variables PP_USE_GSTREAMER
"1"
check_variables PP_USE_D3D_EXTRAS
"1"
...
...
@@ -52,8 +52,8 @@ check_variables D8VK_VER "1.0"
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
"1.1-2602"
check_variables VKD3D_GIT_VER
"1.1-3556"
check_variables VKD3D_LIMIT_TESS_FACTORS 32
...
...
@@ -188,8 +188,8 @@ upper_in_dir () {
}
try_copy_other_dll_to_pfx_64
()
{
# добавить условие сравнение файла (копирование только при различии)
if
[[
"
$WINEARCH
"
==
"win64"
]]
;
then
cmp
-s
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/
$(
basename
$1
)
"
&&
return
0
try_copy_file
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/"
&&
return
0
||
return
1
else
print_info
"WINEARCH != win64, skip copying a 64 bit file:
$1
.dll"
...
...
@@ -197,21 +197,22 @@ try_copy_other_dll_to_pfx_64 () {
}
try_copy_other_dll_to_pfx_32
()
{
# добавить условие сравнение файла (копирование только при различии)
if
[[
"
$WINEARCH
"
==
"win64"
]]
;
then
cmp
-s
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/
$(
basename
$1
)
"
&&
return
0
try_copy_file
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/"
&&
return
0
||
return
1
else
cmp
-s
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/
$(
basename
$1
)
"
&&
return
0
try_copy_file
"
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/"
&&
return
0
||
return
1
fi
}
try_copy_wine_dll_to_pfx_64
()
{
# добавить условие сравнение файла (копирование только при различии)
if
[[
"
$WINEARCH
"
==
"win64"
]]
;
then
if
[[
-d
"
${
WINEDIR
}
/lib64/wine/x86_64-windows"
]]
then
WINE_BUILD_DLL_64
=
"
${
WINEDIR
}
/lib64/wine/x86_64-windows"
else
WINE_BUILD_DLL_64
=
"
${
WINEDIR
}
/lib64/wine"
fi
cmp
-s
"
$WINE_BUILD_DLL_64
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/
$(
basename
$1
)
"
&&
return
0
try_copy_file
"
$WINE_BUILD_DLL_64
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/"
&&
return
0
||
return
1
else
print_info
"WINEARCH != win64, skip copying a 64 bit file:
$1
.dll"
...
...
@@ -219,14 +220,15 @@ try_copy_wine_dll_to_pfx_64 () {
}
try_copy_wine_dll_to_pfx_32
()
{
# добавить условие сравнение файла (копирование только при различии)
if
[[
-d
"
${
WINEDIR
}
/lib/wine/i386-windows"
]]
then
WINE_BUILD_DLL_32
=
"
${
WINEDIR
}
/lib/wine/i386-windows"
else
WINE_BUILD_DLL_32
=
"
${
WINEDIR
}
/lib/wine"
fi
if
[[
"
$WINEARCH
"
==
"win64"
]]
;
then
cmp
-s
"
$WINE_BUILD_DLL_32
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/
$1
"
&&
return
0
try_copy_file
"
$WINE_BUILD_DLL_32
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/"
&&
return
0
||
return
1
else
cmp
-s
"
$WINE_BUILD_DLL_32
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/
$1
"
&&
return
0
try_copy_file
"
$WINE_BUILD_DLL_32
/
$1
"
"
${
WINEPREFIX
}
/drive_c/windows/system32/"
&&
return
0
||
return
1
fi
}
...
...
@@ -515,9 +517,9 @@ update_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"
for
year
in
2015 2017 2019
;
do
sed
-i
"s/w_metadata vcrun
$year
dlls
\\
/w_metadata !dont_use_
$year
! dlls
\\
/"
"
$PP_TMP_DIR
/winetricks"
done
return
0
else
return
1
...
...
@@ -557,6 +559,36 @@ use_winetricks () {
fi
}
init_database
()
{
if
[[
-f
"
$WIN_FILE_EXEC
"
]]
;
then
PPDB
=
"
$(
basename
"
$WIN_FILE_EXEC
"
.exe
)
"
if
[[
-f
"
$WIN_FILE_EXEC
"
.ppdb
]]
;
then
PPDB_FILE
=
"
$WIN_FILE_EXEC
"
.ppdb
else
orig_IFS
=
"
$IFS
"
IFS
=
$'
\n
'
PP_FIND_DB_FILE
=
"
$(
grep
-ilw
"#
$PPDB
.exe"
"
$PP_DB_DIR
"
/
*
)
"
if
[[
$(
echo
"
$PW_FIND_DB_FILE
"
|
wc
-l
)
-gt
1
]]
;
then
print_debug
"Found more than one database file for
$PPDB
.exe"
PPDB_FILE
=
"
$(
echo
"
$PP_FIND_DB_FILE
"
|
head
-n1
)
"
else
PPDB_FILE
=
"
$PP_FIND_DB_FILE
"
fi
IFS
=
"
$orig_IFS
"
if
[[
-f
"
$PP_FIND_DB_FILE
"
]]
&&
!
grep
-e
"^export DISABLED_CREATE_DB=1"
"
$PP_FIND_DB_FILE
"
;
then
try_copy_file
"
$PP_FIND_DB_FILE
"
"
$WIN_FILE_EXEC
"
.ppdb
PPDB_FILE
=
"
$WIN_FILE_EXEC
"
.ppdb
fi
fi
if
[[
"
$PPDB_FILE
"
]]
;
then
print_info
"Use
$PPDB_FILE
db file."
.
"
$PPDB_FILE
"
else
print_info
"Database file not found."
fi
fi
}
##### CHECK WINDOWS FILE #####
check_win_file
()
{
if
[[
-f
"
$1
"
]]
;
then
...
...
@@ -602,7 +634,10 @@ PP_VULKAN_LIBDIR="$PORTPROTON_PATH/vulkan"
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
"
PP_DB_DIR
=
"
$PORTPROTON_PATH
/portproton_db"
PP_AUTOINSTALL_DIR
=
"
$PORTPROTON_PATH
/autoinstall"
create_new_dir
"
$PP_VULKAN_LIBDIR
"
"
$PP_TMP_DIR
"
"
$PP_DIST_DIR
"
"
$PP_PREFIXES_DIR
"
"
$PP_DB_DIR
"
"
$PP_AUTOINSTALL_DIR
"
upper_in_dir
"
$PP_DIST_DIR
"
##### CHECK USER CONFIG FILE #####
...
...
@@ -614,7 +649,7 @@ fi
.
"
$PP_USER_CONF
"
check_win_file
"
$1
"
# TODO: проверка ppdb файла рядом c exe, если нет то поиск в database и копирование в каталог с ex
e
init_databas
e
# TODO: GUI
# TODO: проверка на автоустановку
...
...
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