Merge branch 'dev' into ss/impl
This commit is contained in:
commit
ba686556d2
11 changed files with 126 additions and 96 deletions
|
@ -72,9 +72,9 @@ ErrorCode OpenVpnConfigurator::initPKI(const QString &path)
|
||||||
|
|
||||||
p.setWorkingDirectory(path);
|
p.setWorkingDirectory(path);
|
||||||
|
|
||||||
// QObject::connect(&p, &QProcess::channelReadyRead, [&](){
|
// QObject::connect(&p, &QProcess::channelReadyRead, [&](){
|
||||||
// qDebug().noquote() << p.readAll();
|
// qDebug().noquote() << p.readAll();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
p.start();
|
p.start();
|
||||||
p.waitForFinished();
|
p.waitForFinished();
|
||||||
|
@ -125,15 +125,16 @@ OpenVpnConfigurator::ConnectionData OpenVpnConfigurator::createCertRequest()
|
||||||
connData.clientId = getRandomString(32);
|
connData.clientId = getRandomString(32);
|
||||||
|
|
||||||
QTemporaryDir dir;
|
QTemporaryDir dir;
|
||||||
// if (dir.isValid()) {
|
// if (dir.isValid()) {
|
||||||
// // dir.path() returns the unique directory path
|
// // dir.path() returns the unique directory path
|
||||||
// }
|
// }
|
||||||
|
|
||||||
QString path = dir.path();
|
QString path = dir.path();
|
||||||
|
|
||||||
initPKI(path);
|
initPKI(path);
|
||||||
ErrorCode errorCode = genReq(path, connData.clientId);
|
ErrorCode errorCode = genReq(path, connData.clientId);
|
||||||
|
|
||||||
|
Q_UNUSED(errorCode)
|
||||||
|
|
||||||
QFile req(path + "/pki/reqs/" + connData.clientId + ".req");
|
QFile req(path + "/pki/reqs/" + connData.clientId + ".req");
|
||||||
req.open(QIODevice::ReadOnly);
|
req.open(QIODevice::ReadOnly);
|
||||||
|
@ -143,8 +144,8 @@ OpenVpnConfigurator::ConnectionData OpenVpnConfigurator::createCertRequest()
|
||||||
key.open(QIODevice::ReadOnly);
|
key.open(QIODevice::ReadOnly);
|
||||||
connData.privKey = key.readAll();
|
connData.privKey = key.readAll();
|
||||||
|
|
||||||
// qDebug().noquote() << connData.request;
|
// qDebug().noquote() << connData.request;
|
||||||
// qDebug().noquote() << connData.privKey;
|
// qDebug().noquote() << connData.privKey;
|
||||||
|
|
||||||
return connData;
|
return connData;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +156,7 @@ OpenVpnConfigurator::ConnectionData OpenVpnConfigurator::prepareOpenVpnConfig(co
|
||||||
connData.host = credentials.hostName;
|
connData.host = credentials.hostName;
|
||||||
|
|
||||||
if (connData.privKey.isEmpty() || connData.request.isEmpty()) {
|
if (connData.privKey.isEmpty() || connData.request.isEmpty()) {
|
||||||
*errorCode = ErrorCode::EasyRsaExecutableMissing;
|
*errorCode = ErrorCode::EasyRsaExecutableMissing;
|
||||||
return connData;
|
return connData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,12 @@ Router &Router::Instance()
|
||||||
|
|
||||||
bool Router::routeAdd(const QString &ip, const QString &gw, QString mask)
|
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")
|
qDebug().noquote() << QString("ROUTE ADD: IP:%1 %2 GW %3")
|
||||||
.arg(ip)
|
.arg(ip)
|
||||||
.arg(mask)
|
.arg(mask)
|
||||||
.arg(gw);
|
.arg(gw);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
if (mask == "") {
|
if (mask == "") {
|
||||||
mask = "255.255.255.255";
|
mask = "255.255.255.255";
|
||||||
if (ip.endsWith(".0")) mask = "255.255.255.0";
|
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);
|
free(pIpForwardTable);
|
||||||
|
|
||||||
return (dwStatus == NO_ERROR);
|
return (dwStatus == NO_ERROR);
|
||||||
|
#else
|
||||||
|
// Not implemented yet
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,9 +228,11 @@ int Router::routeAddList(const QString &gw, const QStringList &ips)
|
||||||
if (pIpForwardTable)
|
if (pIpForwardTable)
|
||||||
free(pIpForwardTable);
|
free(pIpForwardTable);
|
||||||
|
|
||||||
qDebug() << "Router::routeAddList finished, success: " << success_count << "/" << ips.size();
|
qDebug() << "Router::routeAddList finished, success: " << success_count << "/" << ips.size();
|
||||||
return success_count;
|
return success_count;
|
||||||
|
#else
|
||||||
|
// Not implemented yet
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +263,7 @@ bool Router::clearSavedRoutes()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwStatus != ERROR_SUCCESS) {
|
if (dwStatus != ERROR_SUCCESS) {
|
||||||
qDebug() << "Router::clearSavedRoutes : getIpForwardTable failed";
|
qDebug() << "Router::clearSavedRoutes : getIpForwardTable failed";
|
||||||
if (pIpForwardTable)
|
if (pIpForwardTable)
|
||||||
free(pIpForwardTable);
|
free(pIpForwardTable);
|
||||||
return false;
|
return false;
|
||||||
|
@ -283,23 +286,30 @@ bool Router::clearSavedRoutes()
|
||||||
ipForwardRows.clear();
|
ipForwardRows.clear();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
// Not implemented yet
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Router::routeDelete(const QString &ip)
|
bool Router::routeDelete(const QString &ip)
|
||||||
{
|
{
|
||||||
|
qDebug().noquote() << QString("ROUTE DELETE, IP: %1").arg(ip);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QProcess p;
|
QProcess p;
|
||||||
p.setProcessChannelMode(QProcess::MergedChannels);
|
p.setProcessChannelMode(QProcess::MergedChannels);
|
||||||
QString command = QString("route delete %1")
|
QString command = QString("route delete %1")
|
||||||
.arg(ip);
|
.arg(ip);
|
||||||
|
|
||||||
p.start(command);
|
p.start(command);
|
||||||
p.waitForFinished();
|
p.waitForFinished();
|
||||||
qDebug().noquote() << "OUTPUT route delete: " + p.readAll();
|
qDebug().noquote() << "OUTPUT route delete: " + p.readAll();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
// Not implemented yet
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ ErrorCode ServerController::runScript(const SshConnectionParameters &sshParams,
|
||||||
QEventLoop wait;
|
QEventLoop wait;
|
||||||
int exitStatus;
|
int exitStatus;
|
||||||
|
|
||||||
// QObject::connect(proc.data(), &SshRemoteProcess::started, &wait, [](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::started, &wait, [](){
|
||||||
// qDebug() << "Command started";
|
// qDebug() << "Command started";
|
||||||
// });
|
// });
|
||||||
|
|
||||||
QObject::connect(proc.data(), &SshRemoteProcess::closed, &wait, [&](int status){
|
QObject::connect(proc.data(), &SshRemoteProcess::closed, &wait, [&](int status){
|
||||||
exitStatus = status;
|
exitStatus = status;
|
||||||
|
@ -52,19 +52,19 @@ ErrorCode ServerController::runScript(const SshConnectionParameters &sshParams,
|
||||||
wait.quit();
|
wait.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardOutput, [proc](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardOutput, [proc](){
|
||||||
QString s = proc->readAllStandardOutput();
|
// QString s = proc->readAllStandardOutput();
|
||||||
if (s != "." && !s.isEmpty()) {
|
// if (s != "." && !s.isEmpty()) {
|
||||||
qDebug().noquote() << s;
|
// qDebug().noquote() << s;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardError, [proc](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardError, [proc](){
|
||||||
QString s = proc->readAllStandardError();
|
// QString s = proc->readAllStandardError();
|
||||||
if (s != "." && !s.isEmpty()) {
|
// if (s != "." && !s.isEmpty()) {
|
||||||
qDebug().noquote() << s;
|
// qDebug().noquote() << s;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
proc->start();
|
proc->start();
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ ErrorCode ServerController::runScript(const SshConnectionParameters &sshParams,
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorCode ServerController::uploadTextFileToContainer(const ServerCredentials &credentials,
|
ErrorCode ServerController::uploadTextFileToContainer(const ServerCredentials &credentials,
|
||||||
QString &file, const QString &path)
|
QString &file, const QString &path)
|
||||||
{
|
{
|
||||||
QLoggingCategory::setFilterRules(QStringLiteral("qtc.ssh=false"));
|
QLoggingCategory::setFilterRules(QStringLiteral("qtc.ssh=false"));
|
||||||
|
|
||||||
|
@ -106,9 +106,9 @@ ErrorCode ServerController::uploadTextFileToContainer(const ServerCredentials &c
|
||||||
QEventLoop wait;
|
QEventLoop wait;
|
||||||
int exitStatus = 0;
|
int exitStatus = 0;
|
||||||
|
|
||||||
// QObject::connect(proc.data(), &SshRemoteProcess::started, &wait, [](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::started, &wait, [](){
|
||||||
// qDebug() << "Command started";
|
// qDebug() << "Command started";
|
||||||
// });
|
// });
|
||||||
|
|
||||||
QObject::connect(proc.data(), &SshRemoteProcess::closed, &wait, [&](int status){
|
QObject::connect(proc.data(), &SshRemoteProcess::closed, &wait, [&](int status){
|
||||||
//qDebug() << "Remote process exited with status" << status;
|
//qDebug() << "Remote process exited with status" << status;
|
||||||
|
@ -116,13 +116,13 @@ ErrorCode ServerController::uploadTextFileToContainer(const ServerCredentials &c
|
||||||
wait.quit();
|
wait.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardOutput, [proc](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardOutput, [proc](){
|
||||||
// qDebug().noquote() << proc->readAllStandardOutput();
|
// qDebug().noquote() << proc->readAllStandardOutput();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardError, [proc](){
|
// QObject::connect(proc.data(), &SshRemoteProcess::readyReadStandardError, [proc](){
|
||||||
// qDebug().noquote() << proc->readAllStandardError();
|
// qDebug().noquote() << proc->readAllStandardError();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
proc->start();
|
proc->start();
|
||||||
wait.exec();
|
wait.exec();
|
||||||
|
@ -284,24 +284,15 @@ ErrorCode ServerController::setupOpenVpnServer(const ServerCredentials &credenti
|
||||||
ErrorCode e = runScript(sshParams(credentials), scriptData);
|
ErrorCode e = runScript(sshParams(credentials), scriptData);
|
||||||
if (e) return e;
|
if (e) return e;
|
||||||
|
|
||||||
|
//return ok;
|
||||||
return checkOpenVpnServer(credentials);
|
return checkOpenVpnServer(credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorCode ServerController::setupShadowSocksServer(const ServerCredentials &credentials)
|
ErrorCode ServerController::setupShadowSocksServer(const ServerCredentials &credentials)
|
||||||
{
|
{
|
||||||
QString scriptData;
|
Q_UNUSED(credentials)
|
||||||
QString scriptFileName = ":/server_scripts/setup_shadowsocks_server.sh";
|
|
||||||
QFile file(scriptFileName);
|
|
||||||
if (! file.open(QIODevice::ReadOnly)) return ErrorCode::InternalError;
|
|
||||||
|
|
||||||
scriptData = file.readAll();
|
return ErrorCode::NotImplementedError;
|
||||||
if (scriptData.isEmpty()) return ErrorCode::InternalError;
|
|
||||||
|
|
||||||
ErrorCode e = runScript(sshParams(credentials), scriptData);
|
|
||||||
if (e) return e;
|
|
||||||
|
|
||||||
return ErrorCode::NoError;
|
|
||||||
//return checkShadowSocksServer(credentials);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SshConnection *ServerController::connectToHost(const SshConnectionParameters &sshParams)
|
SshConnection *ServerController::connectToHost(const SshConnectionParameters &sshParams)
|
||||||
|
@ -325,9 +316,9 @@ SshConnection *ServerController::connectToHost(const SshConnectionParameters &ss
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// QObject::connect(client, &SshConnection::dataAvailable, [&](const QString &message) {
|
// QObject::connect(client, &SshConnection::dataAvailable, [&](const QString &message) {
|
||||||
// qCritical() << "Ssh message:" << message;
|
// qCritical() << "Ssh message:" << message;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
//qDebug() << "Connection state" << client->state();
|
//qDebug() << "Connection state" << client->state();
|
||||||
|
|
||||||
|
@ -337,22 +328,22 @@ SshConnection *ServerController::connectToHost(const SshConnectionParameters &ss
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// QObject::connect(&client, &SshClient::sshDataReceived, [&](){
|
// QObject::connect(&client, &SshClient::sshDataReceived, [&](){
|
||||||
// qDebug().noquote() << "Data received";
|
// qDebug().noquote() << "Data received";
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
// if(client.sshState() != SshClient::SshState::Ready) {
|
// if(client.sshState() != SshClient::SshState::Ready) {
|
||||||
// qCritical() << "Can't connect to server";
|
// qCritical() << "Can't connect to server";
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
// qDebug() << "SSh connection established";
|
// qDebug() << "SSh connection established";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// QObject::connect(proc, &SshProcess::finished, &wait, &QEventLoop::quit);
|
// QObject::connect(proc, &SshProcess::finished, &wait, &QEventLoop::quit);
|
||||||
// QObject::connect(proc, &SshProcess::failed, &wait, &QEventLoop::quit);
|
// QObject::connect(proc, &SshProcess::failed, &wait, &QEventLoop::quit);
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,7 @@ void OpenVpnProtocol::onReadyReadDataFromManagementServer()
|
||||||
else {
|
else {
|
||||||
emit protocolError(ErrorCode::OpenVpnUnknownError);
|
emit protocolError(ErrorCode::OpenVpnUnknownError);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray data(line.toStdString().c_str());
|
QByteArray data(line.toStdString().c_str());
|
||||||
|
|
|
@ -27,16 +27,17 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
CFramelessWindow(parent),
|
CFramelessWindow(parent),
|
||||||
#else
|
#else
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
#endif
|
#endif
|
||||||
ui(new Ui::MainWindow),
|
ui(new Ui::MainWindow),
|
||||||
m_settings(new Settings),
|
m_vpnConnection(nullptr),
|
||||||
m_vpnConnection(nullptr)
|
m_settings(new Settings)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->label_error_text->clear();
|
||||||
ui->widget_tittlebar->installEventFilter(this);
|
ui->widget_tittlebar->installEventFilter(this);
|
||||||
|
|
||||||
ui->stackedWidget_main->setSpeed(200);
|
ui->stackedWidget_main->setSpeed(200);
|
||||||
|
@ -209,10 +210,10 @@ void MainWindow::onPushButtonNewServerConnectWithNewData(bool)
|
||||||
serverCredentials.password = ui->lineEdit_new_server_password->text();
|
serverCredentials.password = ui->lineEdit_new_server_password->text();
|
||||||
|
|
||||||
bool ok = installServer(serverCredentials,
|
bool ok = installServer(serverCredentials,
|
||||||
ui->page_new_server,
|
ui->page_new_server,
|
||||||
ui->progressBar_new_server_connection,
|
ui->progressBar_new_server_connection,
|
||||||
ui->pushButton_new_server_connect_with_new_data,
|
ui->pushButton_new_server_connect_with_new_data,
|
||||||
ui->label_new_server_wait_info);
|
ui->label_new_server_wait_info);
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
m_settings->setServerCredentials(serverCredentials);
|
m_settings->setServerCredentials(serverCredentials);
|
||||||
|
@ -375,8 +376,7 @@ void MainWindow::onConnectionStateChanged(VpnProtocol::ConnectionState state)
|
||||||
|
|
||||||
void MainWindow::onVpnProtocolError(ErrorCode errorCode)
|
void MainWindow::onVpnProtocolError(ErrorCode errorCode)
|
||||||
{
|
{
|
||||||
// TODO fix crash on Windows when starting vpn and another vpn already connected
|
ui->label_error_text->setText(errorString(errorCode));
|
||||||
//QMessageBox::critical(this, APPLICATION_NAME, errorString(errorCode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onPushButtonConnectClicked(bool checked)
|
void MainWindow::onPushButtonConnectClicked(bool checked)
|
||||||
|
@ -507,13 +507,13 @@ void MainWindow::setTrayState(VpnProtocol::ConnectionState state)
|
||||||
setTrayIcon(QString(resourcesPath).arg(DisconnectedTrayIconName));
|
setTrayIcon(QString(resourcesPath).arg(DisconnectedTrayIconName));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef Q_OS_MAC
|
//#ifdef Q_OS_MAC
|
||||||
// // Get theme from current user (note, this app can be launched as root application and in this case this theme can be different from theme of real current user )
|
// // Get theme from current user (note, this app can be launched as root application and in this case this theme can be different from theme of real current user )
|
||||||
// bool darkTaskBar = MacOSFunctions::instance().isMenuBarUseDarkTheme();
|
// bool darkTaskBar = MacOSFunctions::instance().isMenuBarUseDarkTheme();
|
||||||
// darkTaskBar = forceUseBrightIcons ? true : darkTaskBar;
|
// darkTaskBar = forceUseBrightIcons ? true : darkTaskBar;
|
||||||
// resourcesPath = ":/images_mac/tray_icon/%1";
|
// resourcesPath = ":/images_mac/tray_icon/%1";
|
||||||
// useIconName = useIconName.replace(".png", darkTaskBar ? "@2x.png" : " dark@2x.png");
|
// useIconName = useIconName.replace(".png", darkTaskBar ? "@2x.png" : " dark@2x.png");
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,6 +528,7 @@ void MainWindow::onTrayActivated(QSystemTrayIcon::ActivationReason reason)
|
||||||
|
|
||||||
void MainWindow::onConnect()
|
void MainWindow::onConnect()
|
||||||
{
|
{
|
||||||
|
ui->label_error_text->clear();
|
||||||
ui->pushButton_connect->setChecked(true);
|
ui->pushButton_connect->setChecked(true);
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ QStackedWidget QWidget {
|
||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_start">
|
<widget class="QWidget" name="page_start">
|
||||||
<widget class="QLabel" name="label_23">
|
<widget class="QLabel" name="label_23">
|
||||||
|
@ -1140,6 +1140,28 @@ color: #181922;
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_error_text">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>300</y>
|
||||||
|
<width>381</width>
|
||||||
|
<height>51</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Error text</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page_sites">
|
<widget class="QWidget" name="page_sites">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
|
|
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/post_uninstall.sh $INSTALLER_DATA_DIR/post_uninstall.sh
|
||||||
cp -av $DEPLOY_DATA_DIR/$PLIST_NAME $INSTALLER_DATA_DIR/$PLIST_NAME
|
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
|
cd $BUNDLE_DIR
|
||||||
tar czf $INSTALLER_DATA_DIR/$APP_NAME.tar.gz ./
|
tar czf $INSTALLER_DATA_DIR/$APP_NAME.tar.gz ./
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ del "%OUT_APP_DIR:"=%\*.cpp"
|
||||||
del "%OUT_APP_DIR:"=%\*.h"
|
del "%OUT_APP_DIR:"=%\*.h"
|
||||||
del "%OUT_APP_DIR:"=%\*.res"
|
del "%OUT_APP_DIR:"=%\*.res"
|
||||||
del "%OUT_APP_DIR:"=%\*.o"
|
del "%OUT_APP_DIR:"=%\*.o"
|
||||||
|
del "%OUT_APP_DIR:"=%\*.moc"
|
||||||
del "%OUT_APP_DIR:"=%\*.lib"
|
del "%OUT_APP_DIR:"=%\*.lib"
|
||||||
del "%OUT_APP_DIR:"=%\*.exp"
|
del "%OUT_APP_DIR:"=%\*.exp"
|
||||||
echo "Deploying..."
|
echo "Deploying..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue