feat: linux <-> conan features

This commit is contained in:
Yaroslav Gurov
2026-04-02 12:12:51 +02:00
parent ea71e9b87d
commit f456db5392
6 changed files with 115 additions and 34 deletions
+11 -3
View File
@@ -231,12 +231,20 @@ else()
qt_finalize_target(${PROJECT})
endif()
install(TARGETS ${PROJECT} DESTINATION ".")
install(FILES $<TARGET_RUNTIME_DLLS:${PROJECT}> DESTINATION ".")
install(TARGETS ${PROJECT}
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT client
)
install(FILES $<TARGET_RUNTIME_DLLS:${PROJECT}>
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT client
)
qt_generate_deploy_qml_app_script(
TARGET ${PROJECT}
OUTPUT_SCRIPT QT_DEPLOY_SCRIPT
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${QT_DEPLOY_SCRIPT})
install(SCRIPT ${QT_DEPLOY_SCRIPT}
COMPONENT client
)
@@ -80,7 +80,7 @@ bool WireguardUtilsLinux::addInterface(const InterfaceConfig& config) {
QDir appPath(QCoreApplication::applicationDirPath());
QStringList wgArgs = {"-f", "amn0"};
m_tunnel.start(appPath.filePath("../../client/bin/amneziawg-go"), wgArgs);
m_tunnel.start(appPath.filePath("amneziawg-go"), wgArgs);
if (!m_tunnel.waitForStarted(WG_TUN_PROC_TIMEOUT)) {
logger.error() << "Unable to start tunnel process due to timeout";
m_tunnel.kill();
+1 -17
View File
@@ -259,15 +259,7 @@ bool Utils::killProcessByName(const QString &name)
QString Utils::openVpnExecPath()
{
#ifdef Q_OS_WIN
return Utils::executable("openvpn/openvpn", true);
#elif defined Q_OS_LINUX
// We have service that runs OpenVPN on Linux. We need to make same
// path for client and service.
return Utils::executable("../../client/bin/openvpn", true);
#else
return Utils::executable("/openvpn", true);
#endif
return Utils::executable("openvpn", true);
}
QString Utils::wireguardExecPath()
@@ -295,15 +287,7 @@ QString Utils::certUtilPath()
QString Utils::tun2socksPath()
{
#ifdef Q_OS_WIN
return Utils::executable("tun2socks", true);
#elif defined Q_OS_LINUX
// We have service that runs OpenVPN on Linux. We need to make same
// path for client and service.
return Utils::executable("../../client/bin/tun2socks", true);
#else
return Utils::executable("/tun2socks", true);
#endif
}
#ifdef Q_OS_WIN