Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE-old
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
Vladislav
PortWINE-old
Commits
4bfc71dd
Unverified
Commit
4bfc71dd
authored
Jul 10, 2024
by
Boris Yumankulov
Committed by
Boris Yumankulov
Jul 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use exe-thumbnailer instead convert
parent
7384b310
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
23 deletions
+26
-23
functions_helper
data_from_portwine/scripts/functions_helper
+6
-16
start.sh
data_from_portwine/scripts/start.sh
+20
-7
No files found.
data_from_portwine/scripts/functions_helper
View file @
4bfc71dd
...
...
@@ -1646,18 +1646,13 @@ pw_create_gui_png () {
try_remove_file
"
${
PORT_WINE_PATH
}
/data/img/launcher.png"
try_remove_file
"
${
PORT_WINE_PATH
}
/data/img/Launcher.png"
if
[[
!
-f
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
]]
;
then
if
command
-v
sestatus &>/dev/null
&&
sestatus |
grep
"Current mode: *enforcing"
;
then
SESTATUS
=
"1"
else
SESTATUS
=
"0"
fi
if
command
-v
exe-thumbnailer &>/dev/null
&&
[[
"
${
SESTATUS
}
"
==
"0"
]]
;
then
exe-thumbnailer
-s
"
${
PW_RESIZE_TO
}
"
"
$(
readlink
-f
"
${
portwine_exe
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
if
check_flatpak
;
then
exe-thumbnailer
--force-resize
-s
"
${
PW_RESIZE_TO
}
"
"
$(
readlink
-f
"
${
portwine_exe
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
else
env
PYTHONPATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/python3.9/site-packages/"
\
LD_LIBRARY_PATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/lib64"
\
"
${
PW_WINELIB
}
/runtime/files/bin/python3.9"
\
"
${
PW_PLUGINS_PATH
}
/portable/bin/exe-thumbnailer"
-s
"
${
PW_RESIZE_TO
}
"
\
"
${
PW_PLUGINS_PATH
}
/portable/bin/exe-thumbnailer"
-
-force-resize
-
s
"
${
PW_RESIZE_TO
}
"
\
"
$(
readlink
-f
"
${
portwine_exe
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
fi
fi
...
...
@@ -4668,18 +4663,13 @@ create_shortcut_from_link () {
try_remove_file
"
${
PORT_WINE_PATH
}
/data/img/Launcher.png"
if
[[
!
-f
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
]]
;
then
if
command
-v
sestatus &>/dev/null
&&
sestatus |
grep
"Current mode: *enforcing"
;
then
SESTATUS
=
"1"
else
SESTATUS
=
"0"
fi
if
command
-v
exe-thumbnailer &>/dev/null
&&
[[
"
${
SESTATUS
}
"
==
"0"
]]
;
then
exe-thumbnailer
-s
128
"
$(
readlink
-f
"
${
exe_path
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
if
check_flatpak
;
then
exe-thumbnailer
--force-resize
-s
128
"
$(
readlink
-f
"
${
exe_path
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
else
env
PYTHONPATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/python3.9/site-packages/"
\
LD_LIBRARY_PATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/lib64"
\
"
${
PW_WINELIB
}
/runtime/files/bin/python3.9"
\
"
${
PW_PLUGINS_PATH
}
/portable/bin/exe-thumbnailer"
-s
128
"
$(
readlink
-f
"
${
exe_path
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
"
${
PW_PLUGINS_PATH
}
/portable/bin/exe-thumbnailer"
-
-force-resize
-
s
128
"
$(
readlink
-f
"
${
exe_path
}
"
)
"
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
fi
fi
...
...
data_from_portwine/scripts/start.sh
View file @
4bfc71dd
...
...
@@ -639,13 +639,26 @@ else
PW_GENERATE_BUTTONS
=
"--field=
$(
gettext
"Create shortcut..."
)
!
${
PW_GUI_ICON_PATH
}
/find_48.svg!:FBTN%@bash -c
\"
button_click pw_find_exe
\"
%"
for
PW_DESKTOP_FILES
in
${
PW_ALL_DF
}
;
do
PW_NAME_D_ICON
=
"
$(
grep
Icon
"
${
PORT_WINE_PATH
}
/
${
PW_DESKTOP_FILES
}
"
|
awk
-F
=
'{print $2}'
)
"
PW_NAME_D_ICON_48
=
"
${
PW_NAME_D_ICON
//
".png"
/
"_48.png"
}
"
if
[[
!
-f
"
${
PW_NAME_D_ICON_48
}
"
]]
\
&&
[[
-f
"
${
PW_NAME_D_ICON
}
"
]]
\
&&
command
-v
"convert"
&>/dev/null
then
convert
"
${
PW_NAME_D_ICON
}
"
-resize
48x48
"
${
PW_NAME_D_ICON_48
}
"
&>/dev/null
if
check_flatpak
;
then
PW_NAME_D_ICON
=
"
$(
grep
Exec
"
${
PORT_WINE_PATH
}
/
${
PW_DESKTOP_FILES
}
"
|
awk
-F
'='
'{print $2}'
|
sed
-e
's|flatpak run ru.linux_gaming.PortProton||'
-e
's|"||g'
-e
's|^[ \t]*||'
)
"
else
PW_NAME_D_ICON
=
"
$(
grep
Exec
"
${
PORT_WINE_PATH
}
/
${
PW_DESKTOP_FILES
}
"
|
awk
-F
"=env "
'{print $2}'
|
sed
-e
"s|
${
PORT_SCRIPTS_PATH
}
/start.sh||"
-e
's|"||g'
-e
's|^[ \t]*||'
)
"
fi
PW_ICON_PATH
=
"
$(
grep
Icon
"
${
PORT_WINE_PATH
}
/
${
PW_DESKTOP_FILES
}
"
|
awk
-F
=
'{print $2}'
)
"
PW_NAME_D_ICON_48
=
"
${
PW_ICON_PATH
%.png
}
_48.png"
if
[[
!
-f
"
${
PW_NAME_D_ICON_48
}
"
]]
\
&&
[[
-f
"
${
PW_NAME_D_ICON
}
"
]]
;
then
if
check_flatpak
;
then
exe-thumbnailer
--force-resize
-s
"48"
"
${
PW_NAME_D_ICON
}
"
"
${
PW_NAME_D_ICON_48
}
"
else
env
PYTHONPATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/python3.9/site-packages/"
\
LD_LIBRARY_PATH
=
"
${
PW_PLUGINS_PATH
}
/portable/lib/lib64"
\
"
${
PW_WINELIB
}
/runtime/files/bin/python3.9"
\
"
${
PW_PLUGINS_PATH
}
/portable/bin/exe-thumbnailer"
\
--force-resize
-s
"48"
"
${
PW_NAME_D_ICON
}
"
"
${
PW_NAME_D_ICON_48
}
"
fi
fi
PW_DESKTOP_HELPER
=
"
${
PW_DESKTOP_FILES
// /@_@
}
"
PW_GENERATE_BUTTONS+
=
"--field=
${
PW_DESKTOP_FILES
//
".desktop"
/
""
}
!
${
PW_NAME_D_ICON_48
}
!:FBTN%@bash -c
\"
run_desktop_b_click "
${
PW_DESKTOP_HELPER
}
"
\"
%"
...
...
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