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
5c6b863e
Commit
5c6b863e
authored
Oct 23, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates
parent
9fadcbc8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
functions_helper
data_from_portwine/scripts/functions_helper
+3
-14
start.sh
data_from_portwine/scripts/start.sh
+22
-8
No files found.
data_from_portwine/scripts/functions_helper
View file @
5c6b863e
...
...
@@ -875,6 +875,7 @@ search_desktop_file () {
# Конвертация секунд в дни, часы, минуты
seconds_to_time () {
[[ !
$DESKTOP_WITH_TIME
== enabled ]] && return 0
[[ -z
$1
]] && return 0
local seconds days hours minutes
seconds=
$1
...
...
@@ -5434,23 +5435,10 @@ portwine_create_shortcut () {
[[ -z "${PW_SHORTCUT_DESKTOP}" ]] && PW_SHORTCUT_DESKTOP="TRUE"
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
unset name_desktop
search_desktop_file
if [[ -n ${DESKTOP_FILES_ARRAY[0]} ]] ; then
for df in "${DESKTOP_FILES_ARRAY[@]}" ; do
df="${df//"$PORT_WINE_PATH/"/}"
df="${df//.desktop/}"
if [[ ${PORTWINE_DB^^} =~ ${df^^} ]] && [[ ${PORTWINE_DB^^} != ${df^^} ]]
then name_desktop="$df"
fi
done
fi
if [[ -z $name_desktop ]] ; then
if [[ -n $PW_SHORTCUT_PROXY ]]
then name_desktop="$PW_SHORTCUT_PROXY"
else name_desktop="$PORTWINE_DB"
fi
fi
export name_desktop
[[ -z "${name_desktop_png}" ]] && name_desktop_png="${PORTPROTON_NAME// /_}"
...
...
@@ -5499,11 +5487,12 @@ portwine_create_shortcut () {
edit_user_conf_from_gui PW_SHORTCUT_MENU PW_SHORTCUT_DESKTOP PW_SHORTCUT_STEAM
if
[[
-n
${
DESKTOP_FILES_ARRAY
[0]
}
]]
&&
[[
$name_desktop
!=
$
df
]]
||
[[
-n
${
DESKTOP_FILES_ARRAY
[1]
}
]]
;
then
if
[[
-n
${
DESKTOP_FILES_ARRAY
[0]
}
]]
&&
[[
$name_desktop
!=
$
DESKTOP_NAME_FILE
]]
||
[[
-n
${
DESKTOP_FILES_ARRAY
[1]
}
]]
;
then
if
yad_question
"
${
translations
[A higher number of duplicate desktop files were found for this file.\\nShould I delete the extra ones or not?]
}
"
;
then
for
rm
in
"
${
DESKTOP_FILES_ARRAY
[@]
}
"
;
do
rm
-f
"
$rm
"
done
name_desktop
=
"
$PW_SHORTCUT_PROXY
"
fi
else
try_remove_file
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
...
...
data_from_portwine/scripts/start.sh
View file @
5c6b863e
...
...
@@ -500,17 +500,30 @@ if [[ -f "${portwine_exe}" ]] ; then
PW_SHORTCUT
=
"
${
translations
[DELETE SHORTCUT]
}
!
$PW_GUI_ICON_PATH
/
$BUTTON_SIZE
.png!
${
translations
[Delete shortcut for select file...]
}
:98"
fi
[[
$DESKTOP_WITH_TIME
==
enabled
]]
&&
search_desktop_file
search_desktop_file
unset
DESKTOP_NAME_FILE PW_SHORTCUT_PROXY
if
[[
-n
${
DESKTOP_FILES_ARRAY
[0]
}
]]
;
then
for
df
in
"
${
DESKTOP_FILES_ARRAY
[@]
}
"
;
do
df
=
"
${
df
//
"
$PORT_WINE_PATH
/"
/
}
"
DESKTOP_NAME_FILE
=
"
${
df
//.desktop/
}
"
done
fi
if
[[
-z
"
${
PW_COMMENT_DB
}
"
]]
;
then
unset
PW_SHORTCUT_PROXY
FILE_DESCRIPTION_ABBR
=
$(
make_abbreviation
"
$FILE_DESCRIPTION
"
)
PORTPROTON_NAME_ABBR
=
$(
make_abbreviation
"
$PORTPROTON_NAME
"
)
if
[[
${
PORTPROTON_NAME
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
&&
[[
${
PORTPROTON_NAME
^^
}
!=
"
${
PORTWINE_DB
^^
}
"
]]
\
||
((
${#
PORTPROTON_NAME_ABBR
}
>
2
))
&&
[[
${
PORTPROTON_NAME_ABBR
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
;
then
[[
$FILE_DESCRIPTION
!=
""
]]
&&
FILE_DESCRIPTION_ABBR
=
$(
make_abbreviation
"
$FILE_DESCRIPTION
"
)
[[
$PORTPROTON_NAME
!=
""
]]
&&
PORTPROTON_NAME_ABBR
=
$(
make_abbreviation
"
$PORTPROTON_NAME
"
)
if
[[
-n
$DESKTOP_NAME_FILE
]]
&&
[[
$DESKTOP_NAME_FILE
!=
""
]]
;
then
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$DESKTOP_NAME_FILE
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$DESKTOP_NAME_FILE
"
elif
[[
${
PORTPROTON_NAME
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
&&
[[
${
PORTPROTON_NAME
^^
}
!=
"
${
PORTWINE_DB
^^
}
"
]]
;
then
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$PORTPROTON_NAME
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$PORTPROTON_NAME
"
elif
[[
${
FILE_DESCRIPTION
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
&&
[[
${
FILE_DESCRIPTION
^^
}
!=
"
${
PORTWINE_DB
^^
}
"
]]
\
||
((
${#
FILE_DESCRIPTION_ABBR
}
>
2
))
&&
[[
${
FILE_DESCRIPTION_ABBR
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
;
then
elif
((
${#
PORTPROTON_NAME_ABBR
}
>
2
))
&&
[[
${
PORTPROTON_NAME_ABBR
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
;
then
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$PORTPROTON_NAME
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$PORTPROTON_NAME
"
elif
[[
${
FILE_DESCRIPTION
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
&&
[[
${
FILE_DESCRIPTION
^^
}
!=
"
${
PORTWINE_DB
^^
}
"
]]
;
then
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$FILE_DESCRIPTION
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$FILE_DESCRIPTION
"
elif
((
${#
FILE_DESCRIPTION_ABBR
}
>
2
))
&&
[[
${
FILE_DESCRIPTION_ABBR
^^
}
=
~
${
PORTWINE_DB
^^
}
]]
;
then
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$FILE_DESCRIPTION
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$FILE_DESCRIPTION
"
else
...
...
@@ -549,6 +562,7 @@ if [[ -f "${portwine_exe}" ]] ; then
fi
else
PW_COMMENT_DB
=
"
$PW_COMMENT_DB
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$DESKTOP_NAME_FILE
"
fi
export
KEY_START
=
"
$RANDOM
"
...
...
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