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
2703dd1e
Commit
2703dd1e
authored
Oct 20, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
parent
369860af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
functions_helper
data_from_portwine/scripts/functions_helper
+15
-19
start.sh
data_from_portwine/scripts/start.sh
+9
-7
No files found.
data_from_portwine/scripts/functions_helper
View file @
2703dd1e
...
...
@@ -786,7 +786,7 @@ debug_timer () {
# Поиск нужного .desktop файла по $portwine_exe
search_desktop_file
()
{
local
count desktop_file desktop_file_new EXEC_DESKTOP TIME_CURRENT_PROXY EXEC_DESKTOP_NEW TIME_TOTAL i j
local
count desktop_file desktop_file_new EXEC_DESKTOP TIME_CURRENT_PROXY EXEC_DESKTOP_NEW TIME_TOTAL i j
df
unset
TIME_CURRENT_ARRAY DESKTOP_FILES_ARRAY
count
=
0
for
desktop_file
in
"
$PORT_WINE_PATH
"
/
*
;
do
...
...
@@ -5427,25 +5427,21 @@ portwine_create_shortcut () {
[[ -z "${PW_SHORTCUT_DESKTOP}" ]] && PW_SHORTCUT_DESKTOP="TRUE"
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
name_desktop_basename="$(basename "${portwine_exe//.exe/}")"
unset name_desktop
search_desktop_file
if [[ -n $df ]] ; then
name_desktop_df="${df//"$PORT_WINE_PATH/"/}"
name_desktop_df="${name_desktop_df//.desktop/}"
if [[ $(echo "$name_desktop_basename" | tr '
[
:lower:]
' '
[
:upper:]
') =~ $(echo "$name_desktop_df" | tr '
[
:lower:]
' '
[
:upper:]
') ]]
then
name_desktop="$name_desktop_df"
elif [[ -n $PORTPROTON_NAME ]] && [[ ${DESKTOP_FILES_ARRAY[*]} =~ $PORTPROTON_NAME ]]
then
name_desktop="$PORTPROTON_NAME"
else
name_desktop="$name_desktop_df"
fi
else
if [[ -z $PORTPROTON_NAME ]] ; then
name_desktop="$name_desktop_basename"
else
name_desktop="$PORTPROTON_NAME"
if [[ -n ${DESKTOP_FILES_ARRAY[0]} ]] ; then
for df in "${DESKTOP_FILES_ARRAY[@]}" ; do
df="${df//"$PORT_WINE_PATH/"/}"
df="${df//.desktop/}"
if [[ ${PORTWINE_DB^^} =~ ${df^^} ]]
then name_desktop="$df"
fi
done
fi
if [[ -z $name_desktop ]] ; then
if [[ -n $PORTPROTON_NAME ]]
then name_desktop="$PORTPROTON_NAME"
else name_desktop="$PORTWINE_DB"
fi
fi
export name_desktop
...
...
data_from_portwine/scripts/start.sh
View file @
2703dd1e
...
...
@@ -96,9 +96,7 @@ unset CHK_SYMLINK_FILE PW_MESA_GL_VERSION_OVERRIDE PW_VKD3D_FEATURE_LEVEL PATH_T
unset
PW_PREFIX_NAME WINEPREFIX VULKAN_MOD PW_WINE_VER PW_ADD_TO_ARGS_IN_RUNTIME PW_GAMEMODERUN_SLR AMD_VULKAN_ICD PW_WINE_CPU_TOPOLOGY
unset
MANGOHUD_CONFIG FPS_LIMIT PW_WINE_USE WINEDLLPATH WINE WINEDIR WINELOADER WINESERVER PW_USE_RUNTIME PORTWINE_CREATE_SHORTCUT_NAME MIRROR
unset
PW_LOCALE_SELECT PW_SETTINGS_INDICATION PW_GUI_START PW_AUTOINSTALL_EXE NOSTSTDIR RADV_DEBUG PW_NO_AUTO_CREATE_SHORTCUT
unset
PW_NAME_D_ICON PW_ICON_PATH PW_GAME_TIME PW_ALL_DF PW_AMOUNT_NEW_DESKTOP PW_AMOUNT_OLD_DESKTOP PW_DESKTOP_FILES
unset
AI_TYPE AI_NAME AI_IMAGE AI_INFO AI_FILE_ARRAY AI_TRUE_FILE AI_FILE_UNSORTED AI_FILE_SORTED PW_GENERATE_BUTTONS
unset
PW_DESKTOP_FILES_REGEX PW_TERM PW_EXEC_FROM_DESKTOP
unset
PW_TERM PW_EXEC_FROM_DESKTOP
export
PORT_WINE_TMP_PATH
=
"
${
PORT_WINE_PATH
}
/data/tmp"
rm
-f
"
$PORT_WINE_TMP_PATH
"
/
*
{
exe,msi,tar
}
*
...
...
@@ -617,6 +615,8 @@ else
gui_userconf
fi
unset
PW_NAME_D_ICON PW_ICON_PATH PW_GAME_TIME PW_ALL_DF PW_AMOUNT_NEW_DESKTOP PW_AMOUNT_OLD_DESKTOP PW_DESKTOP_FILES
unset
AI_TYPE AI_NAME AI_IMAGE AI_INFO AI_FILE_ARRAY AI_TRUE_FILE AI_FILE_UNSORTED AI_FILE_SORTED PW_DESKTOP_FILES_REGEX
# Поиск .desktop файлов
AMOUNT_GENERATE_BUTTONS
=
"0"
for
desktop_file
in
"
$PORT_WINE_PATH
"
/
*
;
do
...
...
@@ -646,17 +646,19 @@ else
# Для конвертация .desktop файлов flatpak в натив и наоборот
if [[
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
=~ ^"
Exec
=flatpak run ru.linux_gaming.PortProton
" ]] ; then
PW_NAME_D_ICON["
$AMOUNT_GENERATE_BUTTONS
"]=
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]//Exec=flatpak run ru.linux_gaming.PortProton /
}
search_desktop_file
NEED_FIXES_DESKTOP=1
elif [[
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
=~ ^"
Exec
=env \
"
$PORT_SCRIPTS_PATH
/start.sh
\"
"
]] ; then
PW_NAME_D_ICON[
"
$AMOUNT_GENERATE_BUTTONS
"
]=
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]//Exec=env \
"
$PORT_SCRIPTS_PATH
\/
start.sh
\"
/}
search_desktop_file
NEED_FIXES_DESKTOP=1
fi
# Для фикса битых #Time=
if [[ !
${
PW_GAME_TIME
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
=~ [0-9]+ ]]
\
|| ((
${
PW_GAME_TIME
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
>= 999999999 )) ; then
|| ((
${
PW_GAME_TIME
[
"
$AMOUNT_GENERATE_BUTTONS
"
]
}
>= 999999999 ))
\
|| [[
$NEED_FIXES_DESKTOP
== 1 ]]
then
portwine_exe=
${
PW_NAME_D_ICON
[
"
$AMOUNT_GENERATE_BUTTONS
"
]//\
"/}
search_desktop_file
unset portwine_exe
unset portwine_exe
NEED_FIXES_DESKTOP
PW_GAME_TIME["
$AMOUNT_GENERATE_BUTTONS
"]=
$TIME_CURRENT
fi
(( AMOUNT_GENERATE_BUTTONS++ ))
...
...
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