diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4931a709..00000000 --- a/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:latest - -MAINTAINER Mikal Villa - -ENV GIT_BRANCH="master" -ENV I2PD_PREFIX="/opt/i2pd-${GIT_BRANCH}" -ENV PATH=${I2PD_PREFIX}/bin:$PATH - -ENV GOSU_VERSION=1.7 -ENV GOSU_SHASUM="34049cfc713e8b74b90d6de49690fa601dc040021980812b2f1f691534be8a50 /usr/local/bin/gosu" - -RUN mkdir /user && adduser -S -h /user i2pd && chown -R i2pd:nobody /user - - -# -# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the -# image under 20mb we need to remove all the build dependencies in the same "RUN" / layer. -# - -# 1. install deps, clone and build. -# 2. strip binaries. -# 3. Purge all dependencies and other unrelated packages, including build directory. -RUN apk --no-cache --virtual build-dependendencies add make gcc g++ libtool boost-dev build-base openssl-dev openssl git \ - && mkdir -p /tmp/build \ - && cd /tmp/build && git clone -b ${GIT_BRANCH} https://github.com/PurpleI2P/i2pd.git \ - && cd i2pd \ - && make -j4 \ - && mkdir -p ${I2PD_PREFIX}/bin \ - && mv i2pd ${I2PD_PREFIX}/bin/ \ - && cd ${I2PD_PREFIX}/bin \ - && strip i2pd \ - && rm -fr /tmp/build && apk --purge del build-dependendencies build-base fortify-headers boost-dev zlib-dev openssl-dev \ - boost-python3 python3 gdbm boost-unit_test_framework boost-python linux-headers boost-prg_exec_monitor \ - boost-serialization boost-signals boost-wave boost-wserialization boost-math boost-graph boost-regex git pcre \ - libtool g++ gcc pkgconfig - -# 2. Adding required libraries to run i2pd to ensure it will run. -RUN apk --no-cache add boost-filesystem boost-system boost-program_options boost-date_time boost-thread boost-iostreams openssl musl-utils libstdc++ - -# Gosu is a replacement for su/sudo in docker and not a backdoor :) See https://github.com/tianon/gosu -RUN wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 \ - && echo "${GOSU_SHASUM}" | sha256sum -c && chmod +x /usr/local/bin/gosu - -COPY entrypoint.sh /entrypoint.sh - -RUN chmod a+x /entrypoint.sh -RUN echo "export PATH=${PATH}" >> /etc/profile - -VOLUME [ "/var/lib/i2pd" ] - -EXPOSE 7070 4444 4447 7656 2827 7654 7650 - -ENTRYPOINT [ "/entrypoint.sh" ] - diff --git a/Makefile b/Makefile index 460b16e4..6d56ec7d 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,12 @@ ifneq (, $(findstring darwin, $(SYS))) else include Makefile.osx endif +else ifneq (, $(findstring linux, $(SYS))$(findstring gnu, $(SYS))) + DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp + include Makefile.linux else ifneq (, $(findstring freebsd, $(SYS))$(findstring openbsd, $(SYS))) DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp include Makefile.bsd -else ifneq (, $(findstring linux, $(SYS))) - DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp - include Makefile.linux else ifneq (, $(findstring mingw, $(SYS))$(findstring cygwin, $(SYS))) DAEMON_SRC += Win32/DaemonWin32.cpp Win32/Win32Service.cpp Win32/Win32App.cpp include Makefile.mingw diff --git a/Makefile.homebrew b/Makefile.homebrew index b3105c56..a6e645ee 100644 --- a/Makefile.homebrew +++ b/Makefile.homebrew @@ -33,10 +33,13 @@ endif # http://www.hutsby.net/2011/08/macs-with-aes-ni.html # Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2 # Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic -# note from psi: 2009 macbook does not have aesni -#ifeq ($(USE_AESNI),yes) -# CXXFLAGS += -maes -DAESNI -#endif +ifeq ($(USE_AESNI),yes) + CXXFLAGS += -maes -DAESNI +endif +ifeq ($(USE_AVX),1) + CXXFLAGS += -mavx +endif + # Disabled, since it will be the default make rule. I think its better # to define the default rule in Makefile and not Makefile. - torkel diff --git a/README.md b/README.md index 40948b34..8fc8393a 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Build instructions: * GNU/Linux x86/x64 - [![Build Status](https://travis-ci.org/PurpleI2P/i2pd.svg?branch=openssl)](https://travis-ci.org/PurpleI2P/i2pd) * Windows - [![Build status](https://ci.appveyor.com/api/projects/status/1908qe4p48ff1x23?svg=true)](https://ci.appveyor.com/project/PurpleI2P/i2pd) * Mac OS X - [![Build Status](https://travis-ci.org/PurpleI2P/i2pd.svg?branch=openssl)](https://travis-ci.org/PurpleI2P/i2pd) +* CentOS / Fedora - [![Build Status](https://copr.fedorainfracloud.org/coprs/supervillain/i2pd/package/i2pd-git/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/supervillain/i2pd/package/i2pd-git/) +* Docker image - [![Build Status](https://dockerbuildbadges.quelltext.eu/status.svg?organization=meeh&repository=i2pd)](https://hub.docker.com/r/meeh/i2pd/builds/) * FreeBSD * Android * iOS diff --git a/Win32/DaemonWin32.cpp b/Win32/DaemonWin32.cpp index 3f9226d1..822af30c 100644 --- a/Win32/DaemonWin32.cpp +++ b/Win32/DaemonWin32.cpp @@ -21,6 +21,7 @@ namespace util SetConsoleCP(1251); SetConsoleOutputCP(1251); setlocale(LC_ALL, "Russian"); + setlocale(LC_TIME, "C"); if (!Daemon_Singleton::init(argc, argv)) return false; @@ -68,6 +69,7 @@ namespace util SetConsoleCP(1251); SetConsoleOutputCP(1251); setlocale(LC_ALL, "Russian"); + setlocale(LC_TIME, "C"); #ifdef WIN32_APP if (!i2p::win32::StartWin32App ()) return false; diff --git a/android/.gitignore b/android/.gitignore index d9fa5a57..90cd315e 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -5,4 +5,11 @@ ant.properties local.properties build.sh bin -log* \ No newline at end of file +log* +.gradle +android.iml +build +gradle +gradlew +gradlew.bat + diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 3ae952b3..cfc9d55b 100755 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,26 +1,56 @@ - - - - - - - - - - - + package="org.purplei2p.i2pd" + android:installLocation="auto" + android:versionCode="1" + android:versionName="2.18.0"> + + + + + + + + + + + + + + + + + - + + + + + + + - + + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index a88403fd..4fe17d88 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,33 +1,44 @@ buildscript { - repositories { - mavenCentral() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.1.2' - } + repositories { + mavenCentral() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.3' + } } apply plugin: 'com.android.application' +repositories { + jcenter() + maven { + url 'https://maven.google.com' + } +} + android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" - defaultConfig { - applicationId "org.purplei2p.i2pd" - targetSdkVersion 25 - minSdkVersion 14 - versionCode 1 - versionName "2.17.1" + compileSdkVersion 25 + buildToolsVersion "25.0.2" + defaultConfig { + applicationId "org.purplei2p.i2pd" + targetSdkVersion 25 + minSdkVersion 14 + versionCode 1 + versionName "2.18.0" + ndk { + abiFilters 'armeabi-v7a' + //abiFilters 'x86' } + } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] - res.srcDirs = ['res'] - jniLibs.srcDirs = ['libs'] - } + res.srcDirs = ['res'] + jniLibs.srcDirs = ['libs'] } + } signingConfigs { orignal { storeFile file("i2pdapk.jks") @@ -37,11 +48,17 @@ android { } } buildTypes { - release { - minifyEnabled false - signingConfig signingConfigs.orignal - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' - } + release { + minifyEnabled false + signingConfig signingConfigs.orignal + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' + } + } + externalNativeBuild { + ndkBuild { + path './jni/Android.mk' + } } } + diff --git a/android/res/layout/activity_perms_asker.xml b/android/res/layout/activity_perms_asker.xml new file mode 100644 index 00000000..d2d12cb6 --- /dev/null +++ b/android/res/layout/activity_perms_asker.xml @@ -0,0 +1,27 @@ + + + + +