Remove declaration of getMainDesktopFile

This commit is contained in:
Alexis Lopez Zubieta
2018-11-05 15:54:59 -06:00
parent 012e621ec5
commit 700f6fe15f
+20 -23
View File
@@ -11,29 +11,6 @@ using namespace linuxdeploy::core::log;
namespace bf = boost::filesystem;
namespace linuxdeploy {
desktopfile::DesktopFile getMainDesktopFile(const std::vector<std::string>& desktopFilePaths,
const std::vector<desktopfile::DesktopFile>& deployedDesktopFiles);
bool deployAppDirRootFiles(std::vector<std::string> desktopFilePaths,
std::string customAppRunPath, appdir::AppDir& appDir) {
// search for desktop file and deploy it to AppDir root
ldLog() << std::endl << "-- Deploying files into AppDir root directory --" << std::endl;
auto deployedDesktopFiles = appDir.deployedDesktopFiles();
try {
desktopfile::DesktopFile desktopFile = getMainDesktopFile(desktopFilePaths, deployedDesktopFiles);
ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl;
if (!appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath))
return false;
} catch (const std::runtime_error& er) {
return false;
}
return true;
}
desktopfile::DesktopFile getMainDesktopFile(const std::vector<std::string>& desktopFilePaths,
const std::vector<desktopfile::DesktopFile>& deployedDesktopFiles) {
desktopfile::DesktopFile desktopFile;
@@ -73,4 +50,24 @@ namespace linuxdeploy {
}
return desktopFile;
}
bool deployAppDirRootFiles(std::vector<std::string> desktopFilePaths,
std::string customAppRunPath, appdir::AppDir& appDir) {
// search for desktop file and deploy it to AppDir root
ldLog() << std::endl << "-- Deploying files into AppDir root directory --" << std::endl;
auto deployedDesktopFiles = appDir.deployedDesktopFiles();
try {
desktopfile::DesktopFile desktopFile = getMainDesktopFile(desktopFilePaths, deployedDesktopFiles);
ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl;
if (!appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath))
return false;
} catch (const std::runtime_error& er) {
return false;
}
return true;
}
}