1
+ // system headers
2
+ #include < filesystem>
3
+
1
4
// library headers
2
5
#include < linuxdeploy/core/log.h>
3
6
#include < linuxdeploy/util/util.h>
4
- #include < boost/filesystem.hpp>
5
7
6
8
// local headers
7
9
#include " PlatformPluginsDeployer.h"
8
10
9
11
using namespace linuxdeploy ::plugin::qt;
10
12
using namespace linuxdeploy ::core::log;
11
13
12
- namespace bf = boost ::filesystem;
14
+ namespace fs = std ::filesystem;
13
15
14
16
bool PlatformPluginsDeployer::deploy () {
15
17
// calling the default code is optional, but it won't hurt for now
@@ -32,34 +34,34 @@ bool PlatformPluginsDeployer::deploy() {
32
34
}
33
35
}
34
36
35
- for (bf ::directory_iterator i (qtPluginsPath / " platforminputcontexts" ); i != bf ::directory_iterator (); ++i) {
37
+ for (fs ::directory_iterator i (qtPluginsPath / " platforminputcontexts" ); i != fs ::directory_iterator (); ++i) {
36
38
if (!appDir.deployLibrary (*i, appDir.path () / " usr/plugins/platforminputcontexts/" ))
37
39
return false ;
38
40
}
39
41
40
- for (bf ::directory_iterator i (qtPluginsPath / " imageformats" ); i != bf ::directory_iterator (); ++i) {
42
+ for (fs ::directory_iterator i (qtPluginsPath / " imageformats" ); i != fs ::directory_iterator (); ++i) {
41
43
if (!appDir.deployLibrary (*i, appDir.path () / " usr/plugins/imageformats/" ))
42
44
return false ;
43
45
}
44
46
45
47
// TODO: platform themes -- https://github.com/probonopd/linuxdeployqt/issues/236
46
48
47
- const bf ::path platformThemesPath = qtPluginsPath / " platformthemes" ;
48
- const bf ::path stylesPath = qtPluginsPath / " styles" ;
49
+ const fs ::path platformThemesPath = qtPluginsPath / " platformthemes" ;
50
+ const fs ::path stylesPath = qtPluginsPath / " styles" ;
49
51
50
- const bf ::path platformThemesDestination = appDir.path () / " usr/plugins/platformthemes/" ;
51
- const bf ::path stylesDestination = appDir.path () / " usr/plugins/styles/" ;
52
+ const fs ::path platformThemesDestination = appDir.path () / " usr/plugins/platformthemes/" ;
53
+ const fs ::path stylesDestination = appDir.path () / " usr/plugins/styles/" ;
52
54
53
55
if (getenv (" DEPLOY_PLATFORM_THEMES" ) != nullptr ) {
54
56
ldLog () << LD_WARNING << " Deploying all platform themes and styles [experimental feature]" << std::endl;
55
57
56
- if (bf ::is_directory (platformThemesPath))
57
- for (bf ::directory_iterator i (platformThemesPath); i != bf ::directory_iterator (); ++i)
58
+ if (fs ::is_directory (platformThemesPath))
59
+ for (fs ::directory_iterator i (platformThemesPath); i != fs ::directory_iterator (); ++i)
58
60
if (!appDir.deployLibrary (*i, platformThemesDestination))
59
61
return false ;
60
62
61
- if (bf ::is_directory (stylesPath))
62
- for (bf ::directory_iterator i (stylesPath); i != bf ::directory_iterator (); ++i)
63
+ if (fs ::is_directory (stylesPath))
64
+ for (fs ::directory_iterator i (stylesPath); i != fs ::directory_iterator (); ++i)
63
65
if (!appDir.deployLibrary (*i, stylesDestination))
64
66
return false ;
65
67
} else {
@@ -69,7 +71,7 @@ bool PlatformPluginsDeployer::deploy() {
69
71
70
72
for (const auto &file : {libqxdgPath}) {
71
73
// we need to check whether the files exist at least, otherwise the deferred deployment operation fails
72
- if (bf ::is_regular_file (file)) {
74
+ if (fs ::is_regular_file (file)) {
73
75
ldLog () << " Attempting to deploy" << file.filename () << " found at path" << file.parent_path () << std::endl;
74
76
appDir.deployFile (file, platformThemesDestination);
75
77
} else {
0 commit comments