MatN work for versatile appimage creation for all types of os
[goodguy/cinelerra.git] / cinelerra-5.1 / tools / makeappimagetool / includes / appdir_root_setup.h
1 #pragma once
2
3 // system headers
4 #include <memory>
5
6 // local headers
7 #include "appdir.h"
8
9 namespace linuxdeploy {
10     namespace core {
11         /**
12          * Wrapper for an AppDir that encapsulates all functionality to set up the AppDir root directory.
13          */
14         class AppDirRootSetup {
15         private:
16             // PImpl
17             class Private;
18             std::shared_ptr<Private> d;
19
20         public:
21             explicit AppDirRootSetup(const appdir::AppDir& appdir);
22
23             /**
24              * Deploy files to the AppDir root directory using the provided desktop file and the information within it.
25              * Optionally, a custom AppRun path can be provided which is deployed instead of following the internal
26              * default mechanism, which usually just places a symlink to the main binary as AppRun.
27              *
28              * @param desktopFile
29              * @param customAppRunPath
30              * @return
31              */
32             bool run(const desktopfile::DesktopFile& desktopFile, const boost::filesystem::path& customAppRunPath = "") const;
33         };
34
35     }
36 }