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
bd2f9fb1
Commit
bd2f9fb1
authored
Oct 23, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates
parent
5c6b863e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
70 deletions
+70
-70
functions_helper
data_from_portwine/scripts/functions_helper
+69
-6
start.sh
data_from_portwine/scripts/start.sh
+1
-64
No files found.
data_from_portwine/scripts/functions_helper
View file @
bd2f9fb1
...
@@ -873,6 +873,73 @@ search_desktop_file () {
...
@@ -873,6 +873,73 @@ search_desktop_file () {
fi
fi
}
}
create_pw_comment () {
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
[[
$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 ((
${#
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
unset PORTWINE_DB_PROXY PORTWINE_DB_NEW
PORTWINE_DB="
${
PORTWINE_DB
//_/
}
"
if [[
${
PORTWINE_DB
:0:1
}
=~ [a-z] ]] ; then
PORTWINE_DB_UPPER="
${
PORTWINE_DB
^^
}
"
PORTWINE_DB="
${
PORTWINE_DB_UPPER
:0:1
}${
PORTWINE_DB
:1
}
"
fi
if ((
${#
PORTWINE_DB
}
> 3 )) ; then
for ((i=0 ; i<
${#
PORTWINE_DB
}
; i++)) ; do
if [[
${
PORTWINE_DB
:i:2
}
=~ ([a-z][A-Z]|[a-z][0-9]) ]]
\
&& [[ !
${
PORTWINE_DB
:i:3
}
=~ ([a-z][A-Z]"
"|[a-z][0-9]"
") ]] ; then
PORTWINE_DB_PROXY+="
${
PORTWINE_DB
:i:1
}
"
elif [[
${
PORTWINE_DB
:i:3
}
=~ [0-9][0-9][a-zA-Z] ]] ; then
PORTWINE_DB_PROXY+="
${
PORTWINE_DB
:i:2
}
"
((i++))
else
PORTWINE_DB_PROXY+="
${
PORTWINE_DB
:i:1
}
"
fi
done
for ((i=0 ; i<
${#
PORTWINE_DB_PROXY
}
; i++)) ; do
if [[
${
PORTWINE_DB_PROXY
:i:2
}
=~ "
"[a-z] ]] ; then
PORTWINE_DB_UPPER="
${
PORTWINE_DB_PROXY
:i:2
}
"
PORTWINE_DB_NEW+="
${
PORTWINE_DB_UPPER
^^
}
"
((i++))
else
PORTWINE_DB_NEW+="
${
PORTWINE_DB_PROXY
:i:1
}
"
fi
done
else
PORTWINE_DB_NEW="
$PORTWINE_DB
"
fi
PW_COMMENT_DB="
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$PORTWINE_DB_NEW
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY="
$PORTWINE_DB_NEW
"
fi
else
PW_COMMENT_DB="
$PW_COMMENT_DB
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY="
$DESKTOP_NAME_FILE
"
fi
}
# Конвертация секунд в дни, часы, минуты
# Конвертация секунд в дни, часы, минуты
seconds_to_time () {
seconds_to_time () {
[[ !
$DESKTOP_WITH_TIME
== enabled ]] && return 0
[[ !
$DESKTOP_WITH_TIME
== enabled ]] && return 0
...
@@ -5435,11 +5502,7 @@ portwine_create_shortcut () {
...
@@ -5435,11 +5502,7 @@ portwine_create_shortcut () {
[[ -z "${PW_SHORTCUT_DESKTOP}" ]] && PW_SHORTCUT_DESKTOP="TRUE"
[[ -z "${PW_SHORTCUT_DESKTOP}" ]] && PW_SHORTCUT_DESKTOP="TRUE"
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
if [[ -n $PW_SHORTCUT_PROXY ]]
[[ -z $PW_SHORTCUT_PROXY ]] && create_pw_comment && export name_desktop="$PW_SHORTCUT_PROXY"
then name_desktop="$PW_SHORTCUT_PROXY"
else name_desktop="$PORTWINE_DB"
fi
export name_desktop
[[ -z "${name_desktop_png}" ]] && name_desktop_png="${PORTPROTON_NAME// /_}"
[[ -z "${name_desktop_png}" ]] && name_desktop_png="${PORTPROTON_NAME// /_}"
...
@@ -5492,7 +5555,7 @@ portwine_create_shortcut () {
...
@@ -5492,7 +5555,7 @@ portwine_create_shortcut () {
for
rm
in
"
${
DESKTOP_FILES_ARRAY
[@]
}
"
;
do
for
rm
in
"
${
DESKTOP_FILES_ARRAY
[@]
}
"
;
do
rm
-f
"
$rm
"
rm
-f
"
$rm
"
done
done
name_desktop
=
"
$PW_SHORTCUT_PROXY
"
[[
$name_desktop
==
""
]]
&&
create_pw_comment
&&
export
name_desktop
=
"
$PW_SHORTCUT_PROXY
"
fi
fi
else
else
try_remove_file
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
try_remove_file
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
...
...
data_from_portwine/scripts/start.sh
View file @
bd2f9fb1
...
@@ -500,70 +500,7 @@ if [[ -f "${portwine_exe}" ]] ; then
...
@@ -500,70 +500,7 @@ if [[ -f "${portwine_exe}" ]] ; then
PW_SHORTCUT
=
"
${
translations
[DELETE SHORTCUT]
}
!
$PW_GUI_ICON_PATH
/
$BUTTON_SIZE
.png!
${
translations
[Delete shortcut for select file...]
}
:98"
PW_SHORTCUT
=
"
${
translations
[DELETE SHORTCUT]
}
!
$PW_GUI_ICON_PATH
/
$BUTTON_SIZE
.png!
${
translations
[Delete shortcut for select file...]
}
:98"
fi
fi
search_desktop_file
create_pw_comment
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
[[
$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
((
${#
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
unset
PORTWINE_DB_PROXY PORTWINE_DB_NEW
PORTWINE_DB
=
"
${
PORTWINE_DB
//_/
}
"
if
[[
${
PORTWINE_DB
:0:1
}
=
~
[
a-z]
]]
;
then
PORTWINE_DB_UPPER
=
"
${
PORTWINE_DB
^^
}
"
PORTWINE_DB
=
"
${
PORTWINE_DB_UPPER
:0:1
}${
PORTWINE_DB
:1
}
"
fi
if
((
${#
PORTWINE_DB
}
>
3
))
;
then
for
((
i
=
0
;
i<
${#
PORTWINE_DB
}
;
i++
))
;
do
if
[[
${
PORTWINE_DB
:i:2
}
=
~
([
a-z][A-Z]|[a-z][0-9]
)
]]
\
&&
[[
!
${
PORTWINE_DB
:i:3
}
=
~
([
a-z][A-Z]
" "
|[a-z][0-9]
" "
)
]]
;
then
PORTWINE_DB_PROXY+
=
"
${
PORTWINE_DB
:i:1
}
"
elif
[[
${
PORTWINE_DB
:i:3
}
=
~
[
0-9][0-9][a-zA-Z]
]]
;
then
PORTWINE_DB_PROXY+
=
"
${
PORTWINE_DB
:i:2
}
"
((
i++
))
else
PORTWINE_DB_PROXY+
=
"
${
PORTWINE_DB
:i:1
}
"
fi
done
for
((
i
=
0
;
i<
${#
PORTWINE_DB_PROXY
}
;
i++
))
;
do
if
[[
${
PORTWINE_DB_PROXY
:i:2
}
=
~
" "
[
a-z]
]]
;
then
PORTWINE_DB_UPPER
=
"
${
PORTWINE_DB_PROXY
:i:2
}
"
PORTWINE_DB_NEW+
=
"
${
PORTWINE_DB_UPPER
^^
}
"
((
i++
))
else
PORTWINE_DB_NEW+
=
"
${
PORTWINE_DB_PROXY
:i:1
}
"
fi
done
else
PORTWINE_DB_NEW
=
"
$PORTWINE_DB
"
fi
PW_COMMENT_DB
=
"
${
translations
[Launching]
}
<b>
$(
print_wrapped
"
$PORTWINE_DB_NEW
"
"50"
)
</b>
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$PORTWINE_DB_NEW
"
fi
else
PW_COMMENT_DB
=
"
$PW_COMMENT_DB
$(
seconds_to_time
"
$TIME_CURRENT
"
)
"
PW_SHORTCUT_PROXY
=
"
$DESKTOP_NAME_FILE
"
fi
export
KEY_START
=
"
$RANDOM
"
export
KEY_START
=
"
$RANDOM
"
if
[[
"
${
PW_GUI_START
}
"
==
"NOTEBOOK"
]]
;
then
if
[[
"
${
PW_GUI_START
}
"
==
"NOTEBOOK"
]]
;
then
...
...
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