mirror of https://github.com/PurpleI2P/i2pd.git
anon5
9 years ago
committed by
egp
15 changed files with 314 additions and 10 deletions
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
/build-i2pd_qt-Android_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/ |
||||
/build-i2pd_qt-Desktop_Qt_5_6_0_GCC_64bit-Debug/ |
@ -0,0 +1,153 @@
@@ -0,0 +1,153 @@
|
||||
#------------------------------------------------- |
||||
# |
||||
# Project created by QtCreator 2016-06-14T04:53:04 |
||||
# |
||||
#------------------------------------------------- |
||||
|
||||
QT += core gui |
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
||||
|
||||
TARGET = i2pd_qt |
||||
TEMPLATE = app |
||||
|
||||
|
||||
SOURCES += main.cpp\ |
||||
mainwindow.cpp \ |
||||
../../HTTPServer.cpp ../../I2PControl.cpp ../../UPnP.cpp ../../Daemon.cpp ../../Config.cpp \ |
||||
../../AddressBook.cpp \ |
||||
../../api.cpp \ |
||||
../../Base.cpp \ |
||||
../../BOB.cpp \ |
||||
../../ClientContext.cpp \ |
||||
../../Crypto.cpp \ |
||||
../../DaemonLinux.cpp \ |
||||
../../DaemonWin32.cpp \ |
||||
../../Datagram.cpp \ |
||||
../../Destination.cpp \ |
||||
../../Family.cpp \ |
||||
../../FS.cpp \ |
||||
../../Garlic.cpp \ |
||||
../../HTTP.cpp \ |
||||
../../HTTPProxy.cpp \ |
||||
../../I2CP.cpp \ |
||||
../../I2NPProtocol.cpp \ |
||||
../../I2PEndian.cpp \ |
||||
../../I2PService.cpp \ |
||||
../../I2PTunnel.cpp \ |
||||
../../Identity.cpp \ |
||||
../../LeaseSet.cpp \ |
||||
../../Log.cpp \ |
||||
../../NetDb.cpp \ |
||||
../../NetDbRequests.cpp \ |
||||
../../NTCPSession.cpp \ |
||||
../../Profiling.cpp \ |
||||
../../Reseed.cpp \ |
||||
../../RouterContext.cpp \ |
||||
../../RouterInfo.cpp \ |
||||
../../SAM.cpp \ |
||||
../../Signature.cpp \ |
||||
../../SOCKS.cpp \ |
||||
../../SSU.cpp \ |
||||
../../SSUData.cpp \ |
||||
../../SSUSession.cpp \ |
||||
../../stdafx.cpp \ |
||||
../../Streaming.cpp \ |
||||
../../TransitTunnel.cpp \ |
||||
../../Transports.cpp \ |
||||
../../Tunnel.cpp \ |
||||
../../TunnelEndpoint.cpp \ |
||||
../../TunnelGateway.cpp \ |
||||
../../TunnelPool.cpp \ |
||||
../../util.cpp \ |
||||
../../../android-ifaddrs/ifaddrs.c |
||||
|
||||
HEADERS += mainwindow.h \ |
||||
../../HTTPServer.h ../../I2PControl.h ../../UPnP.h ../../Daemon.h ../../Config.h \ |
||||
to_string.h \ |
||||
../../AddressBook.h \ |
||||
../../api.h \ |
||||
../../Base.h \ |
||||
../../BOB.h \ |
||||
../../ClientContext.h \ |
||||
../../Crypto.h \ |
||||
../../Datagram.h \ |
||||
../../Destination.h \ |
||||
../../Family.h \ |
||||
../../FS.h \ |
||||
../../Garlic.h \ |
||||
../../HTTP.h \ |
||||
../../HTTPProxy.h \ |
||||
../../I2CP.h \ |
||||
../../I2NPProtocol.h \ |
||||
../../I2PEndian.h \ |
||||
../../I2PService.h \ |
||||
../../I2PTunnel.h \ |
||||
../../Identity.h \ |
||||
../../LeaseSet.h \ |
||||
../../LittleBigEndian.h \ |
||||
../../Log.h \ |
||||
../../NetDb.h \ |
||||
../../NetDbRequests.h \ |
||||
../../NTCPSession.h \ |
||||
../../Profiling.h \ |
||||
../../Queue.h \ |
||||
../../Reseed.h \ |
||||
../../RouterContext.h \ |
||||
../../RouterInfo.h \ |
||||
../../SAM.h \ |
||||
../../Signature.h \ |
||||
../../SOCKS.h \ |
||||
../../SSU.h \ |
||||
../../SSUData.h \ |
||||
../../SSUSession.h \ |
||||
../../stdafx.h \ |
||||
../../Streaming.h \ |
||||
../../Timestamp.h \ |
||||
../../TransitTunnel.h \ |
||||
../../Transports.h \ |
||||
../../TransportSession.h \ |
||||
../../Tunnel.h \ |
||||
../../TunnelBase.h \ |
||||
../../TunnelConfig.h \ |
||||
../../TunnelEndpoint.h \ |
||||
../../TunnelGateway.h \ |
||||
../../TunnelPool.h \ |
||||
../../util.h \ |
||||
../../version.h \ |
||||
../../../android-ifaddrs/ifaddrs.h |
||||
|
||||
FORMS += mainwindow.ui |
||||
|
||||
CONFIG += mobility |
||||
|
||||
MOBILITY = |
||||
|
||||
LIBS += -lz |
||||
|
||||
android { |
||||
message("Using Android settings") |
||||
DEFINES += ANDROID=1 |
||||
# git clone https://github.com/emileb/Boost-for-Android-Prebuilt.git |
||||
# git clone https://github.com/anon5/OpenSSL-for-Android-Prebuilt.git |
||||
# git clone https://github.com/anon5/android-ifaddrs.git |
||||
INCLUDEPATH += /home/anon5/git/Boost-for-Android-Prebuilt/boost_1_53_0/include \ |
||||
/home/anon5/git/OpenSSL-for-Android-Prebuilt/openssl-1.0.2/include \ |
||||
../../../android-ifaddrs/ |
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a){ |
||||
LIBS += -L/home/anon5/git/Boost-for-Android-Prebuilt/boost_1_53_0/armeabi-v7a/lib \ |
||||
-L/home/anon5/git/OpenSSL-for-Android-Prebuilt/openssl-1.0.2/armeabi-v7a/lib \ |
||||
-lcrypto \ |
||||
-lssl \ |
||||
-lboost_system-gcc-mt-1_53 \ |
||||
-lboost_date_time-gcc-mt-1_53 \ |
||||
-lboost_filesystem-gcc-mt-1_53 \ |
||||
-lboost_program_options-gcc-mt-1_53 |
||||
} |
||||
} |
||||
|
||||
linux:!android { |
||||
message("Using Linux settings") |
||||
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread |
||||
} |
||||
|
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#include "mainwindow.h" |
||||
#include <QApplication> |
||||
#include <stdlib.h> |
||||
#include "../../Daemon.h" |
||||
|
||||
int main(int argc, char *argv[]) |
||||
{ |
||||
QApplication a(argc, argv); |
||||
MainWindow w; |
||||
|
||||
w.show(); |
||||
|
||||
if (Daemon.init(argc, argv)) |
||||
{ |
||||
if (Daemon.start()) |
||||
Daemon.run (); |
||||
Daemon.stop(); |
||||
} |
||||
|
||||
return a.exec(); |
||||
} |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
#include "mainwindow.h" |
||||
#include "ui_mainwindow.h" |
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : |
||||
QMainWindow(parent), |
||||
ui(new Ui::MainWindow) |
||||
{ |
||||
ui->setupUi(this); |
||||
} |
||||
|
||||
MainWindow::~MainWindow() |
||||
{ |
||||
delete ui; |
||||
} |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H |
||||
#define MAINWINDOW_H |
||||
|
||||
#include <QMainWindow> |
||||
|
||||
namespace Ui { |
||||
class MainWindow; |
||||
} |
||||
|
||||
class MainWindow : public QMainWindow |
||||
{ |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
explicit MainWindow(QWidget *parent = 0); |
||||
~MainWindow(); |
||||
|
||||
private: |
||||
Ui::MainWindow *ui; |
||||
}; |
||||
|
||||
#endif // MAINWINDOW_H
|
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
<ui version="4.0"> |
||||
<class>MainWindow</class> |
||||
<widget class="QMainWindow" name="MainWindow" > |
||||
<property name="geometry" > |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>800</width> |
||||
<height>480</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle" > |
||||
<string>MainWindow</string> |
||||
</property> |
||||
<widget class="QWidget" name="centralWidget" /> |
||||
</widget> |
||||
<layoutDefault spacing="6" margin="11" /> |
||||
<pixmapfunction></pixmapfunction> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#ifndef TO_STRING_H |
||||
#define TO_STRING_H |
||||
|
||||
#include <string> |
||||
#include <sstream> |
||||
|
||||
namespace tostr { |
||||
template <typename T> |
||||
std::string to_string(T value) |
||||
{ |
||||
std::ostringstream os ; |
||||
os << value ; |
||||
return os.str() ; |
||||
} |
||||
} |
||||
|
||||
using namespace tostr; |
||||
|
||||
#endif // TO_STRING_H
|
Loading…
Reference in new issue