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
a84b860c
Unverified
Commit
a84b860c
authored
Jul 24, 2023
by
Mikhail Tergoev
Committed by
GitHub
Jul 24, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #49 from Maks1mS/feat/rename-shortcut
feat: Add ability to set shortcut name
parents
7997f88f
ffb52f13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
29 deletions
+45
-29
lang
data_from_portwine/scripts/lang
+7
-2
zen_yad_gui
data_from_portwine/scripts/zen_yad_gui
+38
-27
No files found.
data_from_portwine/scripts/lang
View file @
a84b860c
...
...
@@ -46,7 +46,9 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export
inst_set
=
"Выбор"
export
inst_set_top
=
"Установка
${
portname
}
"
export
ss_done
=
"Ярлык создан в каталоге
${
portname
}
.
\n
Добавить его в МЕНЮ -> Игры и на Рабочий стол?"
export
sc_info
=
"Ярлык будет создан в каталоге
${
portname
}
."
export
sc_name
=
"Название"
export
sc_menu_desktop
=
"Добавить ярлык в МЕНЮ -> Игры и на Рабочий стол"
export
inst_succ
=
"Установка завершена успешно!"
...
...
@@ -291,7 +293,10 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export
inst_set
=
"Choices"
export
inst_set_top
=
"Instaling
${
portname
}
"
export
ss_done
=
"The shortcut was created in the
${
portname
}
directory.
\n
Add it to MENU -> GAMES and Desktop?"
export
sc_info
=
"The shortcut will be created in the
${
portname
}
directory."
export
sc_name
=
"Name"
export
sc_menu_desktop
=
"Add shortcut to MENU -> GAMES and Desktop"
export
inst_succ
=
"The installation was successful."
export
port_upd1
=
"New update for
${
portname
}
"
...
...
data_from_portwine/scripts/zen_yad_gui
View file @
a84b860c
...
...
@@ -463,38 +463,49 @@ gui_vkBasalt () {
portwine_create_shortcut
()
{
pw_create_gui_png
name_desktop
=
"
${
PORTPROTON_NAME
}
"
try_remove_file
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"[Desktop Entry]"
>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Name=
${
PORTPROTON_NAME
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
if
[
-z
"
${
PW_CHECK_AUTOINSTAL
}
"
]
then
echo
"Exec=env "
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
\"
${
portwine_exe
}
\"
""
\
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
else
echo
"Exec=env "
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
\"
${
portwine_exe
}
\"
""
\
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
fi
echo
"Type=Application"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Categories=Game"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"StartupNotify=true"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Path="
${
PORT_SCRIPTS_PATH
}
/
""
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Icon="
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png
""
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
chmod
u+x
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
pw_yad
}
"
--title
=
"
${
inst_set
}
."
--form
--borders
=
3
\
OUTPUT
=
$(
"
${
pw_yad
}
"
--title
=
"
${
inst_set
}
."
--form
--borders
=
3
\
--window-icon
"
$PW_GUI_ICON_PATH
/port_proton.png"
\
--image
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
\
--field
=
"
\n
<b>
${
name_desktop
}
.desktop</b>:LBL"
""
\
--field
=
"
\n
${
ss_done
}
:LBL"
"
"
\
--
button
=
"
$loc_gui_no
"
:1
\
--button
=
"
$loc_gui_
yes
"
:0
--field
=
"
${
sc_info
}
"
:LBL
""
\
--field
=
"
${
sc_name
}
:"
"
${
name_desktop
}
"
\
--
field
=
"
${
sc_menu_desktop
}
"
:CHK
"TRUE"
\
--button
=
"
$loc_gui_
create_shortcut
"
:0
)
if
[
$?
-eq
"0"
]
;
then
try_remove_file
"
${
HOME
}
/.local/share/applications/
${
name_desktop
}
.desktop"
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/.local/share/applications/"
if
[[
-d
"
${
HOME
}
/Desktop"
]]
;
then
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/Desktop/"
elif
[[
-d
"
${
HOME
}
/Рабочий стол"
]]
;
then
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/Рабочий стол/"
name_desktop
=
$(
echo
"
$OUTPUT
"
|
awk
-F
'|'
'{ print $2 }'
)
create_menu_desktop_shortcut
=
$(
echo
"
$OUTPUT
"
|
awk
-F
'|'
'{ print $3 }'
)
try_remove_file
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
mv
-f
"
${
PORT_WINE_PATH
}
/data/img/
${
PORTPROTON_NAME
}
.png"
"
${
PORT_WINE_PATH
}
/data/img/
${
name_desktop
}
.png"
echo
"[Desktop Entry]"
>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Name=
${
name_desktop
}
"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
if
[
-z
"
${
PW_CHECK_AUTOINSTAL
}
"
]
then
echo
"Exec=env "
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
\"
${
portwine_exe
}
\"
""
\
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
else
echo
"Exec=env "
\"
${
PORT_SCRIPTS_PATH
}
/start.sh
\"
\"
${
portwine_exe
}
\"
""
\
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
fi
echo
"Type=Application"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Categories=Game"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"StartupNotify=true"
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Path="
${
PORT_SCRIPTS_PATH
}
/
""
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
echo
"Icon="
${
PORT_WINE_PATH
}
/data/img/
${
name_desktop
}
.png
""
>>
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
chmod
u+x
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
if
[[
"
${
create_menu_desktop_shortcut
}
"
==
"TRUE"
]]
;
then
try_remove_file
"
${
HOME
}
/.local/share/applications/
${
name_desktop
}
.desktop"
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/.local/share/applications/"
if
[[
-d
"
${
HOME
}
/Desktop"
]]
;
then
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/Desktop/"
elif
[[
-d
"
${
HOME
}
/Рабочий стол"
]]
;
then
cp
-f
"
${
PORT_WINE_PATH
}
/
${
name_desktop
}
.desktop"
"
${
HOME
}
/Рабочий стол/"
fi
fi
[[
"
$1
"
!=
silent
]]
&&
xdg-open
"
${
PORT_WINE_PATH
}
"
2>1
>
/dev/null &
fi
[[
"
$1
"
!=
silent
]]
&&
xdg-open
"
${
PORT_WINE_PATH
}
"
2>1
>
/dev/null &
}
portwine_delete_shortcut
()
{
...
...
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