diff --git a/src/linuxdeploy.cpp b/src/linuxdeploy.cpp index d868159..bbf603c 100644 --- a/src/linuxdeploy.cpp +++ b/src/linuxdeploy.cpp @@ -11,29 +11,6 @@ using namespace linuxdeploy::core::log; namespace bf = boost::filesystem; namespace linuxdeploy { - desktopfile::DesktopFile getMainDesktopFile(const std::vector& desktopFilePaths, - const std::vector& deployedDesktopFiles); - - bool deployAppDirRootFiles(std::vector 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& desktopFilePaths, const std::vector& deployedDesktopFiles) { desktopfile::DesktopFile desktopFile; @@ -73,4 +50,24 @@ namespace linuxdeploy { } return desktopFile; } + + bool deployAppDirRootFiles(std::vector 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; + } }