src: Fix Linux build

Syncs the parameters between the Windows and Linux create_shortcut
functions. Makes the install_desktop_shortcut only work on Windows where
it has create_desktop_shortcut implemented.
This commit is contained in:
lat9nq 2021-07-12 10:11:01 -04:00
parent ef71b707cb
commit 810ef5fb25
2 changed files with 3 additions and 0 deletions

View file

@ -314,6 +314,7 @@ mod natives {
target: &str,
args: &str,
working_dir: &str,
exe_path: &str,
) -> Result<String, String> {
// FIXME: no icon will be shown since no icon is provided
let data_local_dir = dirs::data_local_dir();

View file

@ -11,6 +11,7 @@ use config::PackageDescription;
use logging::LoggingErrors;
#[cfg(windows)]
use native::create_desktop_shortcut;
pub struct InstallDesktopShortcutTask {
@ -70,6 +71,7 @@ impl Task for InstallDesktopShortcutTask {
"maintenancetool"
};
#[cfg(windows)]
for shortcut in package.shortcuts {
let tool_path = path.join(platform_extension);
let tool_path = tool_path