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
217a542a
Commit
217a542a
authored
Jan 12, 2026
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added portproton:// handler
parent
1d7cfc98
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
27 deletions
+47
-27
functions_helper
data_from_portwine/scripts/functions_helper
+35
-0
setup.sh
data_from_portwine/scripts/setup.sh
+2
-2
start.sh
data_from_portwine/scripts/start.sh
+10
-25
No files found.
data_from_portwine/scripts/functions_helper
View file @
217a542a
...
@@ -7844,3 +7844,38 @@ DGVOODOO2: https://dege.fw.hu/]}" 2>/dev/null &
...
@@ -7844,3 +7844,38 @@ DGVOODOO2: https://dege.fw.hu/]}" 2>/dev/null &
restart_pp
restart_pp
}
}
update_ext_ppdb () {
if [[ -f "$1" ]] ; then
local tmp_ppdb_file tmp_ppdb_exe
if [[ $2 == "url" ]] ; then
tmp_ppdb_file="$1"
else
tmp_ppdb_file="$PW_TMPFS_PATH/tmp_from_site.ppdb"
try_copy_file "$1" "$tmp_ppdb_file"
fi
tmp_ppdb_exe=("$(grep "^#.*\.exe$" "$tmp_ppdb_file" | sed '
s/#//
')")
for exe_name in "${tmp_ppdb_exe[@]}" ; do
[[ -z $exe_name ]] && fatal "Name for exe file not found in $1"
if check_flatpak ; then
PW_EXEC_FROM_DESKTOP="$(grep "$exe_name" "$PORT_WINE_PATH/"*.desktop | head -n 1 | sed '
s|flatpak run ru.linux_gaming.PortProton|
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
|
' | awk -F'
=
' '
{
print
$2
}
')"
else
PW_EXEC_FROM_DESKTOP="$(grep "$exe_name" "$PORT_WINE_PATH/"*.desktop | head -n 1 | awk -F"=env " '
{
print
$2
}
')"
fi
[[ -n $PW_EXEC_FROM_DESKTOP ]] && break
done
portwine_exe="$(echo "$PW_EXEC_FROM_DESKTOP" | awk -F'
"' '{print
$4
}')"
if
[[
-f
"
$portwine_exe
"
]]
;
then
print_info
"Moved new
$tmp_ppdb_file
to
${
portwine_exe
}
.ppdb"
mv
-f
"
$tmp_ppdb_file
"
"
${
portwine_exe
}
.ppdb"
print_info
"Restarting PP after copy new ppdb file..."
/usr/bin/env bash
-c
"
${
PW_EXEC_FROM_DESKTOP
}
"
&
exit
0
else
yad_error
"Not found desktop file for:
\n
<b>
\n
${
tmp_ppdb_exe
[@]
}
\n
</b>"
exit
1
fi
else
fatal
"ppdb file
\"
$1
\"
not found!"
fi
}
data_from_portwine/scripts/setup.sh
View file @
217a542a
...
@@ -7,7 +7,7 @@ source "$(dirname "$(readlink -f "$0")")/start.sh"
...
@@ -7,7 +7,7 @@ source "$(dirname "$(readlink -f "$0")")/start.sh"
if
check_flatpak
if
check_flatpak
then
PW_EXEC
=
"flatpak run ru.linux_gaming.PortProton"
then
PW_EXEC
=
"flatpak run ru.linux_gaming.PortProton"
else
PW_EXEC
=
"env
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
%
F
"
else
PW_EXEC
=
"env
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
%
u
"
fi
fi
cat
<<
EOF
> "
${
PORT_WINE_PATH
}
/PortProton.desktop"
cat
<<
EOF
> "
${
PORT_WINE_PATH
}
/PortProton.desktop"
...
@@ -19,7 +19,7 @@ Type=Application
...
@@ -19,7 +19,7 @@ Type=Application
Terminal=False
Terminal=False
Categories=Game
Categories=Game
StartupNotify=true
StartupNotify=true
MimeType=application/x-ms-dos-executable;application/x-wine-extension-msp;application/x-msi;application/x-msdos-program;application/x-ms-shortcut;text/win-bat;
MimeType=application/x-ms-dos-executable;application/x-wine-extension-msp;application/x-msi;application/x-msdos-program;application/x-ms-shortcut;text/win-bat;
x-scheme-handler/portproton;
Path=
${
PORT_SCRIPTS_PATH
}
Path=
${
PORT_SCRIPTS_PATH
}
Icon=
${
PORT_WINE_PATH
}
/data/img/w.png
Icon=
${
PORT_WINE_PATH
}
/data/img/w.png
EOF
EOF
...
...
data_from_portwine/scripts/start.sh
View file @
217a542a
...
@@ -80,32 +80,17 @@ if [[ "${1,,}" =~ \.ppack$ ]] ; then
...
@@ -80,32 +80,17 @@ if [[ "${1,,}" =~ \.ppack$ ]] ; then
export
PW_DISABLED_CREATE_DB
=
"1"
export
PW_DISABLED_CREATE_DB
=
"1"
portwine_exe
=
"
$1
"
portwine_exe
=
"
$1
"
elif
[[
"
${
1
,,
}
"
=
~
\.
ppdb
$
]]
;
then
elif
[[
"
${
1
,,
}
"
=
~
\.
ppdb
$
]]
;
then
if
[[
-f
"
$1
"
]]
;
then
update_ext_ppdb
"
$1
"
PW_TMP_PPDB_FILE
=
"
$PW_TMPFS_PATH
/tmp_from_site.ppdb"
elif
[[
"
$1
"
==
portproton://
*
]]
;
then
try_copy_file
"
$1
"
"
$PW_TMP_PPDB_FILE
"
PPDB_URL
=
"
${
1
#portproton
://
}
"
PW_TMP_PPDB_EXE
=(
"
$(
grep
"^#.*
\.
exe$"
"
$PW_TMP_PPDB_FILE
"
|
sed
's/#//'
)
"
)
PPDB_URL
=
"
${
PPDB_URL
//https\/\//https
:
\/\/
}
"
for
exe_name
in
"
${
PW_TMP_PPDB_EXE
[@]
}
"
;
do
PW_TMP_PPDB_FILE
=
"
$PW_TMPFS_PATH
/tmp_from_url.ppdb"
[[
-z
$exe_name
]]
&&
fatal
"Name for exe file not found in
$1
"
if
check_flatpak
;
then
print_info
"Downloading PPDB from:
$PPDB_URL
"
PW_EXEC_FROM_DESKTOP
=
"
$(
grep
"
$exe_name
"
"
$PORT_WINE_PATH
/"
*
.desktop |
head
-n
1 |
sed
's|flatpak run ru.linux_gaming.PortProton|\"${PORT_SCRIPTS_PATH}/start.sh\"|'
|
awk
-F
'='
'{print $2}'
)
"
if
curl
-fsSL
"
$PPDB_URL
"
-o
"
$PW_TMP_PPDB_FILE
"
;
then
else
update_ext_ppdb
"
$PW_TMP_PPDB_FILE
"
"url"
PW_EXEC_FROM_DESKTOP
=
"
$(
grep
"
$exe_name
"
"
$PORT_WINE_PATH
/"
*
.desktop |
head
-n
1 |
awk
-F
"=env "
'{print $2}'
)
"
fi
[[
-n
$PW_EXEC_FROM_DESKTOP
]]
&&
break
done
portwine_exe
=
"
$(
echo
"
$PW_EXEC_FROM_DESKTOP
"
|
awk
-F
'"'
'{print $4}'
)
"
if
[[
-f
"
$portwine_exe
"
]]
;
then
print_info
"Moved new
$PW_TMP_PPDB_FILE
to
${
portwine_exe
}
.ppdb"
mv
-f
"
$PW_TMP_PPDB_FILE
"
"
${
portwine_exe
}
.ppdb"
print_info
"Restarting PP after copy new ppdb file..."
/usr/bin/env bash
-c
"
${
PW_EXEC_FROM_DESKTOP
}
"
&
exit
0
else
yad_error
"Not found desktop file for:
\n
<b>
\n
${
PW_TMP_PPDB_EXE
[@]
}
\n
</b>"
exit
1
fi
else
else
fatal
"
ppdb file
\"
$1
\"
not found!
"
fatal
"
Failed to download PPDB from URL:
$PPDB_URL
"
fi
fi
elif
[[
"
${
1
,,
}
"
=
~
\.
(
exe|bat|msi|reg|lnk
)
$
]]
;
then
elif
[[
"
${
1
,,
}
"
=
~
\.
(
exe|bat|msi|reg|lnk
)
$
]]
;
then
if
[[
-f
"
$1
"
]]
;
then
if
[[
-f
"
$1
"
]]
;
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