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
bd1d62bd
Commit
bd1d62bd
authored
Oct 05, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hack for new .desktop files
parent
d9d30ddc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
functions_helper
data_from_portwine/scripts/functions_helper
+1
-1
start.sh
data_from_portwine/scripts/start.sh
+6
-4
No files found.
data_from_portwine/scripts/functions_helper
View file @
bd1d62bd
...
...
@@ -1321,7 +1321,7 @@ 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) )) # в минутах
PW_TIME_IN_GAME
=
$((
PW_TIME_IN_GAME
/
1000
))
# в секундах
# Поиск нужного .desktop файла по $portwine_exe, чтобы внести изменения в него.
...
...
data_from_portwine/scripts/start.sh
View file @
bd1d62bd
...
...
@@ -623,12 +623,14 @@ else
fi
done
<
"
$desktop_file
"
PW_ALL_DF[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"
${
desktop_file
//
"
${
PORT_WINE_PATH
}
"
\//
}
"
# Чтобы новый ярлык показало первым при первом запуске, потом уже по времени
if
[[
$WITH_TIME
!=
1
]]
;
then
echo
"Time=0"
>>
"
$desktop_file
"
PW_GAME_TIME[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
"9999999999999999999999"
PW_AMOUNT_NO_TIME+
=(
$AMOUNT_GENERATE_BUTTONS
)
else
PW_AMOUNT_WITH_TIME+
=(
$AMOUNT_GENERATE_BUTTONS
)
fi
unset
WITH_TIME
PW_ALL_DF_ARRAY+
=(
$AMOUNT_GENERATE_BUTTONS
)
((
AMOUNT_GENERATE_BUTTONS++
))
fi
fi
...
...
@@ -637,7 +639,7 @@ else
# Переопределение массивов в зависимости от PW_GAME_TIME, от большего значения к меньшему.
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
if
[[
${
PW_GAME_TIME
[
$i
]
}
-gt
${
PW_GAME_TIME
[
$j
]
}
]]
;
then
tmp_0
=
${
PW_GAME_TIME
[
$i
]
}
tmp_1
=
${
PW_ALL_DF
[
$i
]
}
tmp_2
=
${
PW_NAME_D_ICON
[
$i
]
}
...
...
@@ -659,7 +661,7 @@ else
# Генерация .desktop баттанов для меню
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
dp
in
"
${
PW_A
LL_DF_ARRAY
[@]
}
"
;
do
for
dp
in
"
${
PW_A
MOUNT_NO_TIME
[@]
}
"
"
${
PW_AMOUNT_WITH_TIME
[@]
}
"
;
do
PW_DESKTOP_FILES
=
"
${
PW_ALL_DF
[
$dp
]
}
"
if
[[
-n
${
PW_NAME_D_ICON
[dp]
}
]]
;
then
PW_NAME_D_ICON_48
=
"
${
PW_ICON_PATH
[dp]%.png
}
_48"
...
...
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