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
006f5645
Commit
006f5645
authored
Oct 05, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sort with time for desktop file in menu
parent
477bc807
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
functions_helper
data_from_portwine/scripts/functions_helper
+2
-1
start.sh
data_from_portwine/scripts/start.sh
+16
-3
No files found.
data_from_portwine/scripts/functions_helper
View file @
006f5645
...
...
@@ -1321,7 +1321,8 @@ stop_portwine () {
add_in_stop_portwine
debug_timer
--end
-s
"PW_TIME_IN_GAME"
PW_TIME_IN_GAME
=
$((
(
PW_TIME_IN_GAME
/
60000
)
%
60
))
#PW_TIME_IN_GAME=$(( (PW_TIME_IN_GAME / 60000) % 60 )) так в минутах
PW_TIME_IN_GAME
=
$((
PW_TIME_IN_GAME
/
1000
))
while
IFS
=
read
-r
line
;
do
if
[[
$line
=
~ ^Time
=
]]
;
then
export
SKIP_GAME_TIME
=
"1"
...
...
data_from_portwine/scripts/start.sh
View file @
006f5645
...
...
@@ -610,14 +610,14 @@ else
debug_timer
--start
AMOUNT_GENERATE_BUTTONS
=
"0"
for
desktop_file
in
"
${
PORT_WINE_PATH
}
"
/
*
;
do
if
[[
$desktop_file
=
~ .desktop
]]
;
then
if
[[
!
$desktop_file
=
~
(
/PortProton|/readme
)
]]
;
then
while
IFS
=
read
-r
line
;
do
[[
$line
=
~ ^Exec
=
]]
&&
PW_NAME_D_ICON[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"
${
line
//Exec=/
}
"
[[
$line
=
~ ^Icon
=
]]
&&
PW_ICON_PATH[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"
${
line
//Icon=/
}
"
if
[[
$line
=
~ ^Time
=
]]
;
then
PW_GAME_TIME[
"
${
line
//Time=/
}
"
]=
"
${
desktop_file
//
"
${
PORT_WINE_PATH
}
"
\//
}
"
PW_ALL_DF_WITH_TIME[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"
${
desktop_file
//
"
${
PORT_WINE_PATH
}
"
\//
}
"
PW_GAME_TIME[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"
${
line
//Time=/
}
"
WITH_TIME
=
"1"
fi
done
<
"
$desktop_file
"
...
...
@@ -630,9 +630,22 @@ else
fi
done
for
i
in
"
${
!PW_GAME_TIME[@]
}
"
;
do
for
j
in
"
${
!PW_GAME_TIME[@]
}
"
;
do
if
[[
${
PW_GAME_TIME
[
$i
]
}
-gt
${
PW_GAME_TIME
[
$j
]
}
]]
;
then
tmp
=
${
PW_GAME_TIME
[
$i
]
}
tmp_new
=
${
PW_ALL_DF_WITH_TIME
[
$i
]
}
PW_GAME_TIME[
$i
]=
${
PW_GAME_TIME
[
$j
]
}
PW_ALL_DF_WITH_TIME[
$i
]=
${
PW_ALL_DF_WITH_TIME
[
$j
]
}
PW_GAME_TIME[
$j
]=
$tmp
PW_ALL_DF_WITH_TIME[
$j
]=
$tmp_new
fi
done
done
IFS
=
$'
\n
'
PW_GENERATE_BUTTONS
=
"--field=
${
translations
[Create shortcut...]
}
!
${
PW_GUI_ICON_PATH
}
/find_48.svg!:FBTNR%@bash -c
\"
button_click --normal pw_find_exe
\"
%"
for
PW_DESKTOP_FILES
in
"
${
PW_
GAME
_TIME
[@]
}
"
"
${
PW_ALL_DF
[@]
}
"
;
do
for
PW_DESKTOP_FILES
in
"
${
PW_
ALL_DF_WITH
_TIME
[@]
}
"
"
${
PW_ALL_DF
[@]
}
"
;
do
if
[[
-n
${
PW_NAME_D_ICON
}
]]
;
then
PW_NAME_D_ICON_48
=
"
${
PW_ICON_PATH
%.png
}
_48"
PW_NAME_D_ICON_128
=
"
${
PW_ICON_PATH
%.png
}
"
...
...
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