Fix some warnings, fix installation scripts (macOS)
This commit is contained in:
parent
0b8c8835c4
commit
dd46d8cf99
8 changed files with 97 additions and 81 deletions
|
|
@ -134,6 +134,7 @@ OpenVpnConfigurator::ConnectionData OpenVpnConfigurator::createCertRequest()
|
|||
initPKI(path);
|
||||
ErrorCode errorCode = genReq(path, connData.clientId);
|
||||
|
||||
Q_UNUSED(errorCode)
|
||||
|
||||
QFile req(path + "/pki/reqs/" + connData.clientId + ".req");
|
||||
req.open(QIODevice::ReadOnly);
|
||||
|
|
|
|||
|
|
@ -11,13 +11,12 @@ Router &Router::Instance()
|
|||
|
||||
bool Router::routeAdd(const QString &ip, const QString &gw, QString mask)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
qDebug().noquote() << QString("ROUTE ADD: IP:%1 %2 GW %3")
|
||||
.arg(ip)
|
||||
.arg(mask)
|
||||
.arg(gw);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (mask == "") {
|
||||
mask = "255.255.255.255";
|
||||
if (ip.endsWith(".0")) mask = "255.255.255.0";
|
||||
|
|
@ -108,7 +107,9 @@ bool Router::routeAdd(const QString &ip, const QString &gw, QString mask)
|
|||
free(pIpForwardTable);
|
||||
|
||||
return (dwStatus == NO_ERROR);
|
||||
|
||||
#else
|
||||
// Not implemented yet
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -229,7 +230,9 @@ int Router::routeAddList(const QString &gw, const QStringList &ips)
|
|||
|
||||
qDebug() << "Router::routeAddList finished, success: " << success_count << "/" << ips.size();
|
||||
return success_count;
|
||||
|
||||
#else
|
||||
// Not implemented yet
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -283,12 +286,16 @@ bool Router::clearSavedRoutes()
|
|||
ipForwardRows.clear();
|
||||
|
||||
return true;
|
||||
|
||||
#else
|
||||
// Not implemented yet
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Router::routeDelete(const QString &ip)
|
||||
{
|
||||
qDebug().noquote() << QString("ROUTE DELETE, IP: %1").arg(ip);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QProcess p;
|
||||
p.setProcessChannelMode(QProcess::MergedChannels);
|
||||
|
|
@ -300,6 +307,9 @@ bool Router::routeDelete(const QString &ip)
|
|||
qDebug().noquote() << "OUTPUT route delete: " + p.readAll();
|
||||
|
||||
return true;
|
||||
#else
|
||||
// Not implemented yet
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,6 +290,8 @@ ErrorCode ServerController::setupOpenVpnServer(const ServerCredentials &credenti
|
|||
|
||||
ErrorCode ServerController::setupShadowSocksServer(const ServerCredentials &credentials)
|
||||
{
|
||||
Q_UNUSED(credentials)
|
||||
|
||||
return ErrorCode::NotImplementedError;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
QMainWindow(parent),
|
||||
#endif
|
||||
ui(new Ui::MainWindow),
|
||||
m_settings(new Settings),
|
||||
m_vpnConnection(nullptr)
|
||||
m_vpnConnection(nullptr),
|
||||
m_settings(new Settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->widget_tittlebar->installEventFilter(this);
|
||||
|
|
|
|||
0
deploy/data/macos/openvpn
Normal file → Executable file
0
deploy/data/macos/openvpn
Normal file → Executable file
0
deploy/data/macos/post_install.sh
Normal file → Executable file
0
deploy/data/macos/post_install.sh
Normal file → Executable file
0
deploy/data/macos/post_uninstall.sh
Normal file → Executable file
0
deploy/data/macos/post_uninstall.sh
Normal file → Executable file
|
|
@ -44,6 +44,9 @@ cp -av $DEPLOY_DATA_DIR/post_install.sh $INSTALLER_DATA_DIR/post_install.
|
|||
cp -av $DEPLOY_DATA_DIR/post_uninstall.sh $INSTALLER_DATA_DIR/post_uninstall.sh
|
||||
cp -av $DEPLOY_DATA_DIR/$PLIST_NAME $INSTALLER_DATA_DIR/$PLIST_NAME
|
||||
|
||||
rm -f $BUNDLE_DIR/Contents/macOS/post_install.sh $BUNDLE_DIR/Contents/macOS/post_uninstall.sh
|
||||
chmod a+x $INSTALLER_DATA_DIR/post_install.sh $INSTALLER_DATA_DIR/post_uninstall.sh
|
||||
|
||||
cd $BUNDLE_DIR
|
||||
tar czf $INSTALLER_DATA_DIR/$APP_NAME.tar.gz ./
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue