Skip to content

Commit 53a461c

Browse files
committed
Support for deploying Network Information plugins
Issue-Id: #154
1 parent 511d51d commit 53a461c

4 files changed

Lines changed: 44 additions & 6 deletions

File tree

src/deployers/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set(CLASSES
1414
LocationPluginsDeployer
1515
Multimedia5PluginsDeployer
1616
Multimedia6PluginsDeployer
17+
NetworkInformationPluginsDeployer
1718
WebEnginePluginsDeployer
1819
QmlPluginsDeployer
1920
Qt3DPluginsDeployer
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "NetworkInformationPluginsDeployer.h"
2+
3+
namespace linuxdeploy {
4+
namespace plugin {
5+
namespace qt {
6+
bool NetworkInformationPluginsDeployer::doDeploy() {
7+
return deployStandardQtPlugins({"networkinformation"});
8+
}
9+
} // namespace qt
10+
} // namespace plugin
11+
} // namespace linuxdeploy
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
#include "BasicPluginsDeployer.h"
4+
5+
namespace linuxdeploy {
6+
namespace plugin {
7+
namespace qt {
8+
class NetworkInformationPluginsDeployer : public BasicPluginsDeployer {
9+
public:
10+
// we can just use the base class's constructor
11+
using BasicPluginsDeployer::BasicPluginsDeployer;
12+
13+
bool doDeploy() override;
14+
};
15+
} // namespace qt
16+
} // namespace plugin
17+
} // namespace linuxdeploy

src/deployers/PluginsDeployerFactory.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
// local headers
22
#include "PluginsDeployerFactory.h"
33
#include "BasicPluginsDeployer.h"
4-
#include "PlatformPluginsDeployer.h"
54
#include "BearerPluginsDeployer.h"
65
#include "GamepadPluginsDeployer.h"
76
#include "LocationPluginsDeployer.h"
87
#include "Multimedia5PluginsDeployer.h"
98
#include "Multimedia6PluginsDeployer.h"
10-
#include "PrintSupportPluginsDeployer.h"
9+
#include "NetworkInformationPluginsDeployer.h"
10+
#include "PlatformPluginsDeployer.h"
1111
#include "PositioningPluginsDeployer.h"
12+
#include "PrintSupportPluginsDeployer.h"
1213
#include "QmlPluginsDeployer.h"
1314
#include "Qt3DPluginsDeployer.h"
1415
#include "SqlPluginsDeployer.h"
1516
#include "SvgPluginsDeployer.h"
1617
#include "TextToSpeechPluginsDeployer.h"
17-
#include "WebEnginePluginsDeployer.h"
18-
#include "XcbglIntegrationPluginsDeployer.h"
1918
#include "TlsBackendsDeployer.h"
2019
#include "WaylandcompositorPluginsDeployer.h"
20+
#include "WebEnginePluginsDeployer.h"
21+
#include "XcbglIntegrationPluginsDeployer.h"
2122

2223
using namespace linuxdeploy::plugin::qt;
2324
using namespace linuxdeploy::core::appdir;
@@ -51,8 +52,16 @@ std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeploye
5152
if (moduleName == "network") {
5253
if (qtMajorVersion < 6) {
5354
return {getInstance<BearerPluginsDeployer>(moduleName)};
54-
} else if (qtMinorVersion >= 2) {
55-
return {getInstance<TlsBackendsDeployer>(moduleName)};
55+
} else {
56+
std::vector<std::shared_ptr<PluginsDeployer>> deployers;
57+
if (qtMinorVersion >= 1) {
58+
deployers.push_back(
59+
getInstance<NetworkInformationPluginsDeployer>(moduleName));
60+
}
61+
if (qtMinorVersion >= 2) {
62+
deployers.push_back(getInstance<TlsBackendsDeployer>(moduleName));
63+
}
64+
return deployers;
5665
}
5766
}
5867

0 commit comments

Comments
 (0)