Skip to content

Commit

Permalink
removed creation of shortcuts for flatpak / appimage users
Browse files Browse the repository at this point in the history
  • Loading branch information
sshcrack committed Oct 22, 2024
1 parent 8620dfe commit 1727f56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions launcher/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1633,14 +1633,19 @@ void MainWindow::on_actionCreateInstanceShortcut_triggered()
#endif
args.append({ "--launch", m_selectedInstance->id() });

bool userDefinedShortcutPath = !shortcutFilePath.isEmpty();
if (shortcutFilePath.isEmpty())
shortcutFilePath = FS::PathCombine(shortcutDirPath, FS::RemoveInvalidFilenameChars(m_selectedInstance->name()));
if (!FS::createShortcut(shortcutFilePath, appPath, args, m_selectedInstance->name(), iconPath)) {
#if not defined(Q_OS_MACOS)
iconFile.remove();
#endif
QMessageBox::critical(this, tr("Create instance shortcut"), tr("Failed to create instance shortcut!"));
return;
}

if(userDefinedShortcutPath)
break;
}
#if not defined(Q_OS_MACOS)
QMessageBox::information(this, tr("Create instance shortcut"), tr("Created a shortcut to this instance!"));
Expand Down

0 comments on commit 1727f56

Please sign in to comment.