Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE-old
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
Vladislav
PortWINE-old
Commits
72698322
Commit
72698322
authored
Jul 15, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added try_copy_file_with_checksums, this better working on ext4 on same files
parent
7a83c442
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
16 deletions
+60
-16
functions_helper
data_from_portwine/scripts/functions_helper
+56
-15
start.sh
data_from_portwine/scripts/start.sh
+4
-1
No files found.
data_from_portwine/scripts/functions_helper
View file @
72698322
...
...
@@ -132,6 +132,43 @@ try_copy_file () {
}
export
-f
try_copy_file
try_copy_file_with_checksums
()
{
if
[[
!
-f
"
$1
"
]]
;
then
print_info
"file
$1
not found for copy"
&&
return
1
elif
[[
-z
"
$2
"
]]
;
then
print_error
"no way to copy file
$1
"
&&
return
1
else
if
[[
"
${
PW_FILESYSTEM
}
"
==
"ext2/ext3"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
==
"f2fs"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
!=
"btrfs"
]]
then
checksum1
=(
$(
sha256sum
"
$1
"
)
)
if
[[
!
-f
"
$2
"
]]
;
then
cp
-f
"
$1
"
"
$2
"
\
&&
echo
$checksum1
>
"
$2
.sha256sum"
\
&&
return
0
||
return
1
else
if
[[
!
-f
"
$2
.sha256sum"
]]
;
then
checksum2
=(
$(
sha256sum
"
$2
"
)
)
echo
$checksum2
>
"
$2
.sha256sum"
else
checksum2
=
$(
<
"
$2
.sha256sum"
)
fi
fi
if
[[
"
$checksum1
"
==
"
$checksum2
"
]]
;
then
return
0
else
try_remove_file
"
$2
"
\
&&
cp
-f
"
$1
"
"
$2
"
\
&&
echo
$checksum1
>
"
$2
.sha256sum"
\
&&
return
0
||
return
1
fi
else
[[
-e
"
$2
/
$(
basename
"
$1
"
)
"
]]
&&
rm
-f
"
$2
/
$(
basename
"
$1
"
)
"
cp
-f
"
$1
"
"
$2
"
&&
return
0
||
return
1
fi
fi
}
export
-f
try_copy_file_with_checksums
try_copy_dir
()
{
if
[
!
-d
"
$1
"
]
;
then
print_info
"directory
$1
not found for copy"
elif
[
-z
"
$2
"
]
;
then
print_error
"no way to copy directory
$1
"
...
...
@@ -1850,35 +1887,39 @@ start_portwine () {
fi
}
for
rm_dll
in
"nvml.dll"
"nvngx.ini"
"nvngx.dll"
"_nvngx.dll"
;
do
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/
$rm_dll
"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/system32/
$rm_dll
"
done
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/nvml.dll"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvml.dll"
export
DXVK_ENABLE_NVAPI
=
"1"
if
[[
"
${
PW_USE_FAKE_DLSS
}
"
==
"1"
]]
\
&&
[[
-d
"
${
PW_PLUGINS_PATH
}
/fake_dlss/
${
PW_FAKE_DLSS_VER
}
/"
]]
then
try_copy_file
"
${
PW_PLUGINS_PATH
}
/fake_dlss/
${
PW_FAKE_DLSS_VER
}
/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file
"
${
PW_PLUGINS_PATH
}
/fake_dlss/
${
PW_FAKE_DLSS_VER
}
/nvngx.ini"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.ini"
DXVK_ENABLE_NVAPI
=
"1"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/_nvngx.dll"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/system32/_nvngx.dll"
try_copy_file_with_checksums
"
${
PW_PLUGINS_PATH
}
/fake_dlss/
${
PW_FAKE_DLSS_VER
}
/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file_with_checksums
"
${
PW_PLUGINS_PATH
}
/fake_dlss/
${
PW_FAKE_DLSS_VER
}
/nvngx.ini"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.ini"
enabled_fake_nvidia_videocard old
var_winedlloverride_update
"nvapi,nvapi64,nvngx=n;_nvngx=;nvcuda=b"
elif
[[
"
${
PW_USE_NVAPI_AND_DLSS
}
"
==
1
]]
;
then
DXVK_ENABLE_NVAPI
=
"1"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/syswow64/nvngx.ini"
try_remove_file
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.ini"
FIND_NVNGX
=
"
$(
dirname
$(
find /usr/
*
-type
f
-name
"nvngx.dll"
2>/dev/null |
head
-n
1 |
awk
'{print $1}'
))
"
if
[[
!
-z
"
$FIND_NVNGX
"
]]
;
then
try_copy_file
"
${
FIND_NVNGX
}
/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file
"
${
FIND_NVNGX
}
/_nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/_nvngx.dll"
try_copy_file
_with_checksums
"
${
FIND_NVNGX
}
/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file
_with_checksums
"
${
FIND_NVNGX
}
/_nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/_nvngx.dll"
else
try_copy_file
"
${
PW_PLUGINS_PATH
}
/nvngx/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file
"
${
PW_PLUGINS_PATH
}
/nvngx/_nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/_nvngx.dll"
try_copy_file
_with_checksums
"
${
PW_PLUGINS_PATH
}
/nvngx/nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/nvngx.dll"
try_copy_file
_with_checksums
"
${
PW_PLUGINS_PATH
}
/nvngx/_nvngx.dll"
"
${
WINEPREFIX
}
/drive_c/windows/system32/_nvngx.dll"
fi
enabled_fake_nvidia_videocard 0
var_winedlloverride_update
"nvngx,_nvngx,nvapi,nvapi64=n;nvcuda=b"
else
DXVK_ENABLE_NVAPI
=
"0"
enabled_fake_nvidia_videocard 0
export
DXVK_ENABLE_NVAPI
=
0
var_winedlloverride_update
"nvngx,_nvngx="
fi
export
DXVK_ENABLE_NVAPI
if
[[
"
${
PW_HEAP_DELAY_FREE
}
"
==
1
]]
then
export
WINE_HEAP_DELAY_FREE
=
"1"
...
...
@@ -4763,9 +4804,9 @@ portwine_start_debug () {
echo
"RAM:"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
free
-m
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"--------------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
${
PATH_TO_GAME
}
$(
stat
-f
-c
%T
"
${
PATH_TO_GAME
}
"
)
:
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
${
PORT_WINE_PATH
}
$(
stat
-f
-c
%T
"
${
PORT_WINE_PATH
}
"
)
:
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
${
PW_TMPFS_PATH
}
$(
stat
-f
-c
%T
"
${
PW_TMPFS_PATH
}
"
)
:
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
"
${
PATH_TO_GAME
}
" -
$(
stat
-f
-c
%T
"
${
PATH_TO_GAME
}
"
)
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
"
${
PORT_WINE_PATH
}
" -
$(
stat
-f
-c
%T
"
${
PORT_WINE_PATH
}
"
)
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Filesystem
"
${
PW_TMPFS_PATH
}
" -
$(
stat
-f
-c
%T
"
${
PW_TMPFS_PATH
}
"
)
"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"-----------------------------------------------"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
"Graphic cards and drivers:"
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
echo
'lspci -k | grep -EA3 VGA|3D|Display :'
>>
"
${
PORT_WINE_PATH
}
/PortProton.log"
...
...
data_from_portwine/scripts/start.sh
View file @
72698322
...
...
@@ -302,6 +302,9 @@ if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then
yad_error
"locale - broken!"
fi
fi
PW_FILESYSTEM
=
$(
stat
-f
-c
%T
"
${
PORT_WINE_PATH
}
"
)
export
PW_FILESYSTEM
else
scripts_install_ver
=
$(
head
-n
1
"
${
PORT_WINE_TMP_PATH
}
/scripts_ver"
)
export
scripts_install_ver
...
...
@@ -561,7 +564,7 @@ if [[ -f "${portwine_exe}" ]] ; then
PW_YAD_SET
=
"
$?
"
if
[[
"
$PW_YAD_SET
"
==
"1"
||
"
$PW_YAD_SET
"
==
"252"
]]
;
then
exit
0
;
fi
if
[[
$(
<
"
${
PW_TMPFS_PATH
}
/tmp_yad_form"
)
!=
""
]]
;
then
if
[[
$(
<
"
${
PW_TMPFS_PATH
}
/tmp_yad_form"
)
!=
""
]]
;
then
PW_YAD_SET
=
$(
head
-n
1
"
${
PW_TMPFS_PATH
}
/tmp_yad_form"
|
awk
'{print $1}'
)
export
PW_YAD_SET
export
PW_YAD_FORM_TAB
=
"1"
...
...
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