mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 13:15:41 +01:00
general: Fix Linux shortcuts
Makes them function even if it's missing the icon.
This commit is contained in:
parent
810ef5fb25
commit
825e9cc1c3
@ -333,8 +333,8 @@ mod natives {
|
||||
};
|
||||
path.push(format!("{}.desktop", slugify(name))); // file name
|
||||
let desktop_file = format!(
|
||||
"[Desktop Entry]\nName={}\nExec=\"{}\" {}\nComment={}\nPath={}\n",
|
||||
name, target, args, description, working_dir
|
||||
"[Desktop Entry]\nType=Application\nName={}\nExec=\"{}\" {}\nComment={}\nPath={}\nIcon=yuzu\n",
|
||||
name, target, args, description, working_dir
|
||||
);
|
||||
let desktop_f = File::create(path);
|
||||
let mut desktop_f = match desktop_f {
|
||||
|
@ -13,6 +13,8 @@ use logging::LoggingErrors;
|
||||
|
||||
#[cfg(windows)]
|
||||
use native::create_desktop_shortcut;
|
||||
#[cfg(target_os = "linux")]
|
||||
use native::create_shortcut;
|
||||
|
||||
pub struct InstallDesktopShortcutTask {
|
||||
pub name: String,
|
||||
@ -71,7 +73,6 @@ impl Task for InstallDesktopShortcutTask {
|
||||
"maintenancetool"
|
||||
};
|
||||
|
||||
#[cfg(windows)]
|
||||
for shortcut in package.shortcuts {
|
||||
let tool_path = path.join(platform_extension);
|
||||
let tool_path = tool_path
|
||||
@ -83,6 +84,7 @@ impl Task for InstallDesktopShortcutTask {
|
||||
.to_str()
|
||||
.log_expect("Unable to build shortcut metadata (exe)");
|
||||
|
||||
#[cfg(windows)]
|
||||
installed_files.push(create_desktop_shortcut(
|
||||
&shortcut.name,
|
||||
&shortcut.description,
|
||||
@ -92,6 +94,17 @@ impl Task for InstallDesktopShortcutTask {
|
||||
&starting_dir,
|
||||
exe_path,
|
||||
)?);
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
installed_files.push(create_shortcut(
|
||||
&shortcut.name,
|
||||
&shortcut.description,
|
||||
tool_path,
|
||||
// TODO: Send by list
|
||||
&format!("--launcher \"{}\"", exe_path),
|
||||
&starting_dir,
|
||||
exe_path,
|
||||
)?);
|
||||
}
|
||||
|
||||
// Update the installed packages shortcuts information in the database
|
||||
|
Loading…
Reference in New Issue
Block a user