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
83e7db8a
Commit
83e7db8a
authored
Nov 12, 2024
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Htylol-mega_bash_func' into devel
parents
994f0350
7033cb8c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
functions_helper
data_from_portwine/scripts/functions_helper
+0
-0
start.sh
data_from_portwine/scripts/start.sh
+14
-13
No files found.
data_from_portwine/scripts/functions_helper
View file @
83e7db8a
This diff is collapsed.
Click to expand it.
data_from_portwine/scripts/start.sh
View file @
83e7db8a
...
...
@@ -40,7 +40,7 @@ source "$PORT_SCRIPTS_PATH/functions_helper"
export
PW_START_PID
=
"
$$
"
export
NO_AT_BRIDGE
=
"1"
export
GDK_BACKEND
=
"x11"
IFS
=
' '
read
-r
-a
pw_full_command_line
<<<
"
$0
$*
"
read
-r
-a
pw_full_command_line
<<<
"
$0
$*
"
export
pw_full_command_line
export
orig_IFS
=
"
$IFS
"
...
...
@@ -358,7 +358,7 @@ EOF
else
try_remove_file
"
${
PORT_WINE_TMP_PATH
}
"
/pp_pfx_unpack.sh
if
[[
-f
"
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
/.create_shortcut"
]]
;
then
while
IFS
=
read
-r
line
while
read
-r
line
do
export
portwine_exe
=
"
$PORT_WINE_PATH
/data/prefixes/
$PW_PREFIX_NAME
/
$line
"
portwine_create_shortcut
...
...
@@ -614,7 +614,7 @@ else
desktop_file_new
=
"
${
desktop_file
//
"
$PORT_WINE_PATH
/"
/
}
"
if
[[
$desktop_file_new
=
~ .desktop
$
]]
;
then
if
[[
!
$desktop_file_new
=
~
(
PortProton|readme
)
]]
;
then
while
IFS
=
read
-r
line1
;
do
while
read
-r
line1
;
do
if
[[
$line1
=
~ ^Exec
=
]]
;
then
if
check_flatpak
;
then
PW_NAME_D_ICON[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
${
line1
//Exec=flatpak run ru.linux_gaming.PortProton /
}
...
...
@@ -633,7 +633,7 @@ else
PW_NAME_D_ICON[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]//Exec=env \
"
$PORT_SCRIPTS_PATH
\/
start.sh
\"
/}
sed -i "
s
|Exec=env \
"
$PORT_SCRIPTS_PATH
/start.sh
\"
|Exec=flatpak run ru.linux_gaming.PortProton|"
"
$desktop_file
"
fi
while
IFS=
' '
read -r -a line2 ; do
while read -r -a line2 ; do
if [[ \
"
${
line2
[0]//#@_@#/
}
\"
== "
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
" ]] ; then
PW_GAME_TIME["
$AMOUNT_GENERATE_BUTTONS
"]=
${
line2
[2]
}
break
...
...
@@ -643,9 +643,9 @@ else
done < "
$PORT_WINE_TMP_PATH
/statistics
"
if [[
$SORT_WITH_TIME
== enabled ]] && [[
${
line2
[3]
}
== NEW_DESKTOP ]] ; then
sed -i "
s
/
${
line2
[1]
}
${
line2
[2]
}
NEW_DESKTOP/
${
line2
[1]
}
${
line2
[2]
}
OLD_DESKTOP/
" "
$PORT_WINE_TMP_PATH
/statistics
"
IFS=' ' read -r -a PW_AMOUNT_NEW_DESKTOP <<< "
${
PW_AMOUNT_NEW_DESKTOP
[*]
}
$AMOUNT_GENERATE_BUTTONS
"
PW_AMOUNT_NEW_DESKTOP+=("
$AMOUNT_GENERATE_BUTTONS
")
else
IFS=' ' read -r -a PW_AMOUNT_OLD_DESKTOP <<< "
${
PW_AMOUNT_OLD_DESKTOP
[*]
}
$AMOUNT_GENERATE_BUTTONS
"
PW_AMOUNT_OLD_DESKTOP+=("
$AMOUNT_GENERATE_BUTTONS
")
fi
(( AMOUNT_GENERATE_BUTTONS++ ))
fi
...
...
@@ -758,7 +758,7 @@ else
# AI_TOP_GAMES используется для сортировки автоинсталлов (работает на эмуляторы тоже)
AI_AMOUNT_GAMES
=
"0"
&&
AI_AMOUNT_EMULS
=
"0"
&&
AI_AMOUNT_ARRAY
=
"0"
for
ai_file
in
"
$PORT_SCRIPTS_PATH
"
/pw_autoinstall/
*
;
do
while
IFS
=
read
-r
line
;
do
while
read
-r
line
;
do
[[
$line
=
~
"##########"
]]
&&
break
[[
$line
=
~
"# type: "
]]
&&
AI_TYPE[
"
$AI_AMOUNT_ARRAY
"
]=
"
${
line
//# type
:
/
}
"
[[
$line
=
~
"# name: "
]]
&&
AI_NAME[
"
$AI_AMOUNT_ARRAY
"
]=
"
${
line
//# name
:
/
}
"
...
...
@@ -771,14 +771,14 @@ else
done
<
"
$ai_file
"
AI_FILE
=
"
${
ai_file
//
"
$PORT_SCRIPTS_PATH
/pw_autoinstall/"
/
}
"
AI_FILE_CHECK
=
"
$AI_FILE
=
$AI_AMOUNT_ARRAY
"
IFS
=
' '
read
-r
-a
AI_FILE_ARRAY
<<<
"
${
AI_FILE_ARRAY
[*]
}
$AI_FILE
"
AI_FILE_ARRAY+
=(
"
$AI_FILE
"
)
if
[[
$AI_TOP_GAMES
=
~
${
AI_FILE_CHECK
//=*/
}
]]
;
then
IFS
=
' '
read
-r
-a
AI_TRUE_FILE
<<<
"
${
AI_TRUE_FILE
[*]
}
$AI_FILE_CHECK
"
AI_TRUE_FILE+
=(
"
$AI_FILE_CHECK
"
)
else
if
[[
${
AI_NAME
[
"
$AI_AMOUNT_ARRAY
"
]
}
=
~
\(
ENG
\)
]]
;
then
IFS
=
' '
read
-r
-a
AI_FILE_ENG
<<<
"
${
AI_FILE_ENG
[*]
}
$AI_AMOUNT_ARRAY
"
AI_FILE_ENG+
=(
"
$AI_AMOUNT_ARRAY
"
)
else
IFS
=
' '
read
-r
-a
AI_FILE_UNSORTED
<<<
"
${
AI_FILE_UNSORTED
[*]
}
$AI_AMOUNT_ARRAY
"
AI_FILE_UNSORTED+
=(
"
$AI_AMOUNT_ARRAY
"
)
fi
fi
((
AI_AMOUNT_ARRAY++
))
...
...
@@ -786,8 +786,9 @@ else
for
ai_sort
in
$AI_TOP_GAMES
;
do
if
[[
${
AI_TRUE_FILE
[*]
}
=
~
$ai_sort
]]
;
then
AI_TRUE_FILE_NEW
=(
${
AI_TRUE_FILE
[@]//
$ai_sort
=/
}
)
AI_FILE_SORTED+
=(
${
AI_TRUE_FILE_NEW
[@]//*=*/
}
)
AI_TRUE_FILE_NEW
=(
"
${
AI_TRUE_FILE
[@]//
$ai_sort
=/
}
"
)
AI_TRUE_FILE_NEW
=(
"
${
AI_TRUE_FILE_NEW
[*]//*=*/
}
"
)
AI_FILE_SORTED+
=(
"
${
AI_TRUE_FILE_NEW
[*]// /
}
"
)
fi
done
...
...
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