Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
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
PortWINE
Commits
e623b31d
Commit
e623b31d
authored
Nov 14, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes name_block and eval for systemd-inhibit
parent
2e8c8308
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
functions_helper
data_from_portwine/scripts/functions_helper
+8
-11
No files found.
data_from_portwine/scripts/functions_helper
View file @
e623b31d
...
...
@@ -1337,26 +1337,23 @@ get_and_set_reg_file () {
case
$name_type_reg
in
REG_DWORD
)
name_for_find
=
'"'
"
$name_for_find
"
'"'
"=dword:"
name_for_find
=
"
\"
$name_for_find
\
"
=dword:"
name_for_set
=
$(
convert_dec_and_hex
--dec
"
$name_for_set
"
)
;;
REG_SZ
)
name_for_find
=
'"'
"
$name_for_find
"
'"'
"="
name_for_set
=
'"'
"
$name_for_set
"
'"'
;;
name_for_find
=
"
\"
$name_for_find
\
"
="
name_for_set
=
"
\"
$name_for_set
\"
"
;;
*
)
if
[[
$name_add_or_del
==
--delete
]]
;
then
name_for_find
=
'"'
"
$name_for_find
"
'"'
name_for_find
=
"
\"
$name_for_find
\"
"
else
print_error
"Name type reg not set for
$name_fatal
"
return
1
fi
;;
esac
name_block
=
${
name_block
//\\/\\\\\\\\\\\\\\
}
name_block
=
${
name_block
//*/\\[
$name_block
}
name_block
=
"
${
name_block
//*/
${
name_block
//\\/\\\\
}
\\]
}
"
if
[[
-n
$name_for_new_block
]]
;
then
find_block
=
$(
grep
-n
"
$
name_block
"
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/
$name_for_new_block
.reg"
)
find_block
=
$(
grep
-n
"
$
{
name_block
//\\/\\\\\\\\
}
"
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/
$name_for_new_block
.reg"
)
else
find_block
=
$(
grep
-n
"
$
name_block
"
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/"
*
.reg
)
find_block
=
$(
grep
-n
"
$
{
name_block
//\\/\\\\\\\\
}
"
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/"
*
.reg
)
fi
if
[[
-n
$find_block
]]
;
then
if
[[
-n
$name_for_new_block
]]
;
then
...
...
@@ -1385,7 +1382,7 @@ get_and_set_reg_file () {
if
[[
$name_add_or_del
==
--add
]]
;
then
if
[[
-z
$find_block
]]
;
then
if
[[
-n
$name_for_new_block
]]
;
then
sed
-i
'$a\\n'
"
$name_block
"
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/
$name_for_new_block
.reg"
sed
-i
'$a\\n'
\[
"
${
name_block
//\\/\\\\\\\\
}
"
\]
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/
$name_for_new_block
.reg"
find_file
=
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/
$name_for_new_block
.reg"
find_line
=
$(
wc
-l
"
$find_file
"
|
awk
-F
" "
'{print $1}'
)
find_line
=
$((
find_line
-
1
))
...
...
@@ -3318,7 +3315,7 @@ start_portwine () {
if
command
-v
systemd-inhibit &>/dev/null
\
&&
[[
"
$GAMEMODERUN
"
!=
"1"
]]
then
PW_INHIBIT_SLR
=
"
eval systemd-inhibit --mode=block --who=ru.linux_gaming.PortProton --why=
\"
${
translations
[Launched]
}
$PW_NAME_DESKTOP_PROXY
\"
"
PW_INHIBIT_SLR
=
"
systemd-inhibit --mode=block --who=ru.linux_gaming.PortProton --why=
${
translations
[Launched]
}
"
print_info
"Screensaver will be inhibit"
fi
pw_other_fixes
...
...
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