Browse Source

Merge pull request #1161 from mewmew-i2p/openssl

qt now statically compiles for win32
pull/1168/head
orignal 7 years ago committed by GitHub
parent
commit
2c67d2055c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      qt/i2pd_qt/ServerTunnelPane.cpp
  2. 13
      qt/i2pd_qt/ServerTunnelPane.h
  3. 3
      qt/i2pd_qt/TunnelConfig.cpp
  4. 6
      qt/i2pd_qt/TunnelConfig.h
  5. 23
      qt/i2pd_qt/i2pd_qt.pro
  6. 4
      qt/i2pd_qt/mainwindow.h

18
qt/i2pd_qt/ServerTunnelPane.cpp

@ -204,24 +204,6 @@ int ServerTunnelPane::appendServerTunnelForm(
horizontalLayout_2->addItem(horizontalSpacer); horizontalLayout_2->addItem(horizontalSpacer);
tunnelGridLayout->addLayout(horizontalLayout_2); tunnelGridLayout->addLayout(horizontalLayout_2);
} }
{
uint32_t maxConns = tunnelConfig->getmaxConns();
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
ui.maxConnsLabel = new QLabel(gridLayoutWidget_2);
maxConnsLabel->setObjectName(QStringLiteral("maxConnsLabel"));
horizontalLayout_2->addWidget(maxConnsLabel);
ui.maxConnsLineEdit = new QLineEdit(gridLayoutWidget_2);
maxConnsLineEdit->setObjectName(QStringLiteral("maxConnsLineEdit"));
maxConnsLineEdit->setText(QString::number(maxConns));
maxConnsLineEdit->setMaximumWidth(80);
QObject::connect(maxConnsLineEdit, SIGNAL(textChanged(const QString &)),
this, SLOT(updated()));
horizontalLayout_2->addWidget(maxConnsLineEdit);
QSpacerItem * horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_2->addItem(horizontalSpacer);
tunnelGridLayout->addLayout(horizontalLayout_2);
}
{ {
std::string address = tunnelConfig->getaddress(); std::string address = tunnelConfig->getaddress();
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout(); QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();

13
qt/i2pd_qt/ServerTunnelPane.h

@ -81,10 +81,6 @@ private:
QLabel * addressLabel; QLabel * addressLabel;
QLineEdit * addressLineEdit; QLineEdit * addressLineEdit;
//maxConns
QLabel * maxConnsLabel;
QLineEdit * maxConnsLineEdit;
//gzip //gzip
QCheckBox * gzipCheckBox; QCheckBox * gzipCheckBox;
@ -109,7 +105,6 @@ private:
hostOverrideLabel->setText(QApplication::translate("srvTunForm", "Host override:", 0)); hostOverrideLabel->setText(QApplication::translate("srvTunForm", "Host override:", 0));
webIRCPassLabel->setText(QApplication::translate("srvTunForm", "WebIRC password:", 0)); webIRCPassLabel->setText(QApplication::translate("srvTunForm", "WebIRC password:", 0));
addressLabel->setText(QApplication::translate("srvTunForm", "Address:", 0)); addressLabel->setText(QApplication::translate("srvTunForm", "Address:", 0));
maxConnsLabel->setText(QApplication::translate("srvTunForm", "Max connections:", 0));
gzipCheckBox->setText(QApplication::translate("srvTunForm", "GZip", 0)); gzipCheckBox->setText(QApplication::translate("srvTunForm", "GZip", 0));
isUniqueLocalCheckBox->setText(QApplication::translate("srvTunForm", "Is unique local", 0)); isUniqueLocalCheckBox->setText(QApplication::translate("srvTunForm", "Is unique local", 0));
@ -152,14 +147,6 @@ protected:
stc->setaddress(addressLineEdit->text().toStdString()); stc->setaddress(addressLineEdit->text().toStdString());
auto mcStr=maxConnsLineEdit->text();
uint32_t mcInt=(uint32_t)mcStr.toInt(&ok);
if(!ok){
highlightWrongInput(QApplication::tr("Bad maxConns, must be int.")+" "+cannotSaveSettings,maxConnsLineEdit);
return false;
}
stc->setmaxConns(mcInt);
stc->setgzip(gzipCheckBox->isChecked()); stc->setgzip(gzipCheckBox->isChecked());
stc->setisUniqueLocal(isUniqueLocalCheckBox->isChecked()); stc->setisUniqueLocal(isUniqueLocalCheckBox->isChecked());

3
qt/i2pd_qt/TunnelConfig.cpp

@ -48,7 +48,6 @@ void ServerTunnelConfig::saveToStringStream(std::stringstream& out) {
<< "enableuniquelocal=" << (isUniqueLocal?"true":"false") << "\n" << "enableuniquelocal=" << (isUniqueLocal?"true":"false") << "\n"
<< "address=" << address << "\n" << "address=" << address << "\n"
<< "hostoverride=" << hostOverride << "\n" << "hostoverride=" << hostOverride << "\n"
<< "webircpassword=" << webircpass << "\n" << "webircpassword=" << webircpass << "\n";
<< "maxconns=" << maxConns << "\n";
} }

6
qt/i2pd_qt/TunnelConfig.h

@ -148,7 +148,6 @@ public:
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, ""); std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true); bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256); i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
uint32_t maxConns = section.second.get(i2p::stream::I2CP_PARAM_STREAMING_MAX_CONNS_PER_MIN, i2p::stream::DEFAULT_MAX_CONNS_PER_MIN);
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1"); std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true); bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
# * inport -- optional, i2p service port, if unset - the same as 'port' # * inport -- optional, i2p service port, if unset - the same as 'port'
@ -170,7 +169,6 @@ class ServerTunnelConfig : public TunnelConfig {
std::string webircpass; std::string webircpass;
bool gzip; bool gzip;
i2p::data::SigningKeyType sigType; i2p::data::SigningKeyType sigType;
uint32_t maxConns;
std::string address; std::string address;
bool isUniqueLocal; bool isUniqueLocal;
public: public:
@ -184,7 +182,6 @@ public:
std::string webircpass_, std::string webircpass_,
bool gzip_, bool gzip_,
i2p::data::SigningKeyType sigType_, i2p::data::SigningKeyType sigType_,
uint32_t maxConns_,
std::string address_, std::string address_,
bool isUniqueLocal_): TunnelConfig(name_, type_, i2cpParameters_), bool isUniqueLocal_): TunnelConfig(name_, type_, i2cpParameters_),
host(host_), host(host_),
@ -196,7 +193,6 @@ public:
webircpass(webircpass_), webircpass(webircpass_),
gzip(gzip_), gzip(gzip_),
sigType(sigType_), sigType(sigType_),
maxConns(maxConns_),
address(address_), address(address_),
isUniqueLocal(isUniqueLocal_) {} isUniqueLocal(isUniqueLocal_) {}
std::string& gethost(){return host;} std::string& gethost(){return host;}
@ -208,7 +204,6 @@ public:
std::string& getwebircpass(){return webircpass;} std::string& getwebircpass(){return webircpass;}
bool getgzip(){return gzip;} bool getgzip(){return gzip;}
i2p::data::SigningKeyType getsigType(){return sigType;} i2p::data::SigningKeyType getsigType(){return sigType;}
uint32_t getmaxConns(){return maxConns;}
std::string& getaddress(){return address;} std::string& getaddress(){return address;}
bool getisUniqueLocal(){return isUniqueLocal;} bool getisUniqueLocal(){return isUniqueLocal;}
void sethost(const std::string& host_){host=host_;} void sethost(const std::string& host_){host=host_;}
@ -220,7 +215,6 @@ public:
void setwebircpass(const std::string& webircpass_){webircpass=webircpass_;} void setwebircpass(const std::string& webircpass_){webircpass=webircpass_;}
void setgzip(bool gzip_){gzip=gzip_;} void setgzip(bool gzip_){gzip=gzip_;}
void setsigType(i2p::data::SigningKeyType sigType_){sigType=sigType_;} void setsigType(i2p::data::SigningKeyType sigType_){sigType=sigType_;}
void setmaxConns(uint32_t maxConns_){maxConns=maxConns_;}
void setaddress(const std::string& address_){address=address_;} void setaddress(const std::string& address_){address=address_;}
void setisUniqueLocal(bool isUniqueLocal_){isUniqueLocal=isUniqueLocal_;} void setisUniqueLocal(bool isUniqueLocal_){isUniqueLocal=isUniqueLocal_;}
virtual void saveToStringStream(std::stringstream& out); virtual void saveToStringStream(std::stringstream& out);

23
qt/i2pd_qt/i2pd_qt.pro

@ -272,10 +272,27 @@ linux:!android {
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc
} }
windows:!android { windows {
message("Using Windows settings") message("Using Windows settings")
DEFINES += BOOST_USE_WINDOWS_H WINDOWS DEFINES += BOOST_USE_WINDOWS_H WINDOWS _WINDOWS WIN32_LEAN_AND_MEAN MINIUPNP_STATICLIB
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc DEFINES -= UNICODE _UNICODE
BOOST_SUFFIX = -mt
QMAKE_LDFLAGS = -s -Wl,-rpath,/usr/local/lib -Wl,-Bstatic -static-libgcc -static-libstdc++ -mwindows
LIBS = -lminiupnpc \
-lboost_system$$BOOST_SUFFIX \
-lboost_date_time$$BOOST_SUFFIX \
-lboost_filesystem$$BOOST_SUFFIX \
-lboost_program_options$$BOOST_SUFFIX \
-lssl \
-lcrypto \
-lz \
-lwsock32 \
-lws2_32 \
-lgdi32 \
-liphlpapi \
-lstdc++ \
-lpthread
} }
!android:!symbian:!maemo5:!simulator { !android:!symbian:!maemo5:!simulator {

4
qt/i2pd_qt/mainwindow.h

@ -628,7 +628,6 @@ private:
std::string webircpass = ""; std::string webircpass = "";
bool gzip = true; bool gzip = true;
i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256; i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256;
uint32_t maxConns = i2p::stream::DEFAULT_MAX_CONNS_PER_MIN;
std::string address = "127.0.0.1"; std::string address = "127.0.0.1";
bool isUniqueLocal = true; bool isUniqueLocal = true;
@ -646,7 +645,6 @@ private:
webircpass, webircpass,
gzip, gzip,
sigType, sigType,
maxConns,
address, address,
isUniqueLocal); isUniqueLocal);
@ -734,7 +732,6 @@ private:
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, ""); std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true); bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256); i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
uint32_t maxConns = section.second.get(i2p::stream::I2CP_PARAM_STREAMING_MAX_CONNS_PER_MIN, i2p::stream::DEFAULT_MAX_CONNS_PER_MIN);
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1"); std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true); bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
@ -769,7 +766,6 @@ private:
webircpass, webircpass,
gzip, gzip,
sigType, sigType,
maxConns,
address, address,
isUniqueLocal); isUniqueLocal);
} }

Loading…
Cancel
Save