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, target: &str,
args: &str, args: &str,
working_dir: &str, working_dir: &str,
exe_path: &str,
) -> Result<String, String> { ) -> Result<String, String> {
// FIXME: no icon will be shown since no icon is provided // FIXME: no icon will be shown since no icon is provided
let data_local_dir = dirs::data_local_dir(); let data_local_dir = dirs::data_local_dir();

View File

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