From 7c2e448fa7e1339da2937ef0b41a45ba1d01f87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Fri, 20 Mar 2015 12:32:51 +0000 Subject: MirOTR: added DEPENDENCIES.txt with information about MirOTR's dependencies incl. how to build/update them. - removed seemingly unneeded libotr/inc directory - removed _CRT_SECURE_NO_WARNINGS define from MirOTR stdafx.h as it's not needed there. git-svn-id: http://svn.miranda-ng.org/main/trunk@12450 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirOTR/DEPENDENCIES.txt | 99 +++++++++++++++++ plugins/MirOTR/libotr/inc/sys/errno.h | 0 plugins/MirOTR/libotr/inc/sys/ipc.h | 0 plugins/MirOTR/libotr/inc/sys/socket.h | 0 plugins/MirOTR/libotr/inc/sys/time.h | 2 - plugins/MirOTR/libotr/inc/sys/types.h | 49 --------- plugins/MirOTR/libotr/inc/sys/un.h | 0 plugins/MirOTR/libotr/inc/unistd.h | 61 ----------- plugins/MirOTR/libotr/libotr_10.vcxproj | 8 +- plugins/MirOTR/libotr/libotr_12.vcxproj | 8 +- plugins/MirOTR/src/stdafx.h | 187 ++++++++++++++++---------------- 11 files changed, 200 insertions(+), 214 deletions(-) create mode 100644 plugins/MirOTR/DEPENDENCIES.txt delete mode 100644 plugins/MirOTR/libotr/inc/sys/errno.h delete mode 100644 plugins/MirOTR/libotr/inc/sys/ipc.h delete mode 100644 plugins/MirOTR/libotr/inc/sys/socket.h delete mode 100644 plugins/MirOTR/libotr/inc/sys/time.h delete mode 100644 plugins/MirOTR/libotr/inc/sys/types.h delete mode 100644 plugins/MirOTR/libotr/inc/sys/un.h delete mode 100644 plugins/MirOTR/libotr/inc/unistd.h (limited to 'plugins/MirOTR') diff --git a/plugins/MirOTR/DEPENDENCIES.txt b/plugins/MirOTR/DEPENDENCIES.txt new file mode 100644 index 0000000000..855d7eb456 --- /dev/null +++ b/plugins/MirOTR/DEPENDENCIES.txt @@ -0,0 +1,99 @@ +ekhtml ( http://ekhtml.sourceforge.net/ || Github mirror: https://github.com/hilbix/ekhtml ) + 0.3.3-pre 2004-06-12 (from Github mirror, hash 0092d9d) +Libgpg-error ( https://gnupg.org/download/ ) + 1.18 +Libgcrypt ( https://gnupg.org/download/ ) + 1.6.3 +libotr ( https://otr.cypherpunks.ca/ ) + 3.2.0 + + + + +HOW TO UPDATE DEPENDENCIES + in theory, it's possible to use MSYS + MSVC to do the following, but I've used GCC for convenience as my MSVC didn't want to :P + I've used MSYS2 and its own GCC (used 32bit as reference in hope that it will work for 64bit as well) + + + - ekhtml (clean checkout from Git repo mentioned above) + - run MSYS and navigate to ekhtml root + ./autogen.sh + make + - make failed on me, so I had to do ekhtml_mktables myself (make somehow failed to setup include dirs) + cd src + gcc -g -O2 -I../include ekhtml_mktables.c -o ekhtml_mktables + ./ekhtml_mktables > ../include/ekhtml_tables.h + - copy .c and .h files from include/ and src/ to our ekhtml + - ekhtml_config.h: see CONVERT_CONFIG_H_FROM_GCC_TO_MSVC + + - Libgpg-error (from tarball) + - run MSYS + tar xvf libgpg-error-1.18.tar.bz2 + cd libgpg-error-1.18 + ./configure + make + - copy .c,.h,.def,.rc files from src/ to our Libgpg-error + - copy src/gpg-error-config to our Libgpg-error + since we don't build Libgpg-error but include it directly into Libgcrypt, config.h isn't really needed + + - Libgcrypt (from tarball) + - run MSYS + tar xvf libgcrypt-1.6.3.tar.bz2 + cd libgcrypt-1.6.3 + export GPG_ERROR_CONFIG=$(pwd)/../Libgpg-error/gpg-error-config + ./configure + - copy .c and .h files from cipher/ to our Libgcrypt + - copy .c and .h files from compat/ to our Libgcrypt + - copy mpi/ and random/ to our Libgcrypt + - copy .c,.h,.def files from src/ to our Libgcrypt + - copy config.h to our Libgcrypt custom/ + - cipher/cipher-ccm.c: replace "tmp[blocksize];" with "tmp[16];" as MSVC is quite dumb + - cipher/stribog.c: replace "u64 Z[8] = {};" with "u64 Z[8] = {0};" + - config.h: see CONVERT_CONFIG_H_FROM_GCC_TO_MSVC + + - libotr (from Git) + - tbd + +CONVERT_CONFIG_H_FROM_GCC_TO_MSVC + convert from GCC configured config to MSVC settings + - define disabling ( simply comment them out or replace with /* #undef */ ) + // generic + HAVE_INTTYPES_H + HAVE_STRINGS_H + HAVE_UNISTD_H + // needed for Libgcrypt + HAVE_BUILTIN_BSWAP32 + HAVE_BUILTIN_BSWAP64 + HAVE_CLOCK_GETTIME + HAVE_GCC_ASM_VOLATILE_MEMORY + HAVE_GCC_ATTRIBUTE_ALIGNED + HAVE_GCC_INLINE_ASM_AVX + HAVE_GCC_INLINE_ASM_AVX2 + HAVE_GCC_INLINE_ASM_BMI2 + HAVE_GCC_INLINE_ASM_PCLMUL + HAVE_GCC_INLINE_ASM_SSSE3 + HAVE_GETPAGESIZE + HAVE_GETTIMEOFDAY + HAVE_VLA + + - replacing (first line is "find", indented line is "replace by") + /* #undef inline */ + #define inline __inline + + - see CUSTOM_CONFIG_H_MODIFICATIONS + +CUSTOM_CONFIG_H_MODIFICATIONS + we do some Miranda NG / MSVC related modifications to *config.h files + simply append: +/* Miranda NG modifications */ +#define GPGRT_ENABLE_ES_MACROS 1 +#include +#define strdup _strdup +#define stricmp _stricmp +#define snprintf _snprintf +#ifdef _WIN64 +# define __x86_64__ 1 +#else +# define __i386__ 1 +#endif + diff --git a/plugins/MirOTR/libotr/inc/sys/errno.h b/plugins/MirOTR/libotr/inc/sys/errno.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/MirOTR/libotr/inc/sys/ipc.h b/plugins/MirOTR/libotr/inc/sys/ipc.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/MirOTR/libotr/inc/sys/socket.h b/plugins/MirOTR/libotr/inc/sys/socket.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/MirOTR/libotr/inc/sys/time.h b/plugins/MirOTR/libotr/inc/sys/time.h deleted file mode 100644 index 038cf1f387..0000000000 --- a/plugins/MirOTR/libotr/inc/sys/time.h +++ /dev/null @@ -1,2 +0,0 @@ - -#include \ No newline at end of file diff --git a/plugins/MirOTR/libotr/inc/sys/types.h b/plugins/MirOTR/libotr/inc/sys/types.h deleted file mode 100644 index 5a3e51c4a9..0000000000 --- a/plugins/MirOTR/libotr/inc/sys/types.h +++ /dev/null @@ -1,49 +0,0 @@ - -#pragma once - -#include "..\unistd.h" - - -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - - -#ifndef _INO_T_DEFINED - -typedef unsigned short _ino_t; /* i-node number (not used on DOS) */ - -#if !__STDC__ -/* Non-ANSI name for compatibility */ -typedef unsigned short ino_t; -#endif - -#define _INO_T_DEFINED -#endif - - -#ifndef _DEV_T_DEFINED - -typedef unsigned int _dev_t; /* device code */ - -#if !__STDC__ -/* Non-ANSI name for compatibility */ -typedef unsigned int dev_t; -#endif - -#define _DEV_T_DEFINED -#endif - - -#ifndef _OFF_T_DEFINED - -typedef long _off_t; /* file offset value */ - -#if !__STDC__ -/* Non-ANSI name for compatibility */ -typedef long off_t; -#endif - -#define _OFF_T_DEFINED -#endif diff --git a/plugins/MirOTR/libotr/inc/sys/un.h b/plugins/MirOTR/libotr/inc/sys/un.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/plugins/MirOTR/libotr/inc/unistd.h b/plugins/MirOTR/libotr/inc/unistd.h deleted file mode 100644 index 6fe3882660..0000000000 --- a/plugins/MirOTR/libotr/inc/unistd.h +++ /dev/null @@ -1,61 +0,0 @@ - -#pragma once - -#include -#include -#include -#include - -#ifndef S_IWUSR -#define S_IWUSR _S_IWRITE -#endif - -#ifndef S_IRUSR -#define S_IRUSR _S_IREAD -#endif - -#ifndef S_ISREG -#define S_ISREG(A) (1) -#endif - -#ifndef _SIZE_T_DEFINED -typedef unsigned int size_t; -#define _SIZE_T_DEFINED -#endif - -#ifndef _SSIZE_T_DEFINED -typedef signed int ssize_t; -#define _SSIZE_T_DEFINED -#endif - -#ifndef _PID_T_DEFINED -typedef int pid_t; -#define _PID_T_DEFINED -#endif - -#ifndef offsetof -#define offsetof(type, member) ((size_t) &((type *)0)->member) -#endif - -/* Define to `int' if unavailable. */ -#ifndef socklen_t -#define socklen_t int -#endif - -#ifndef strcasecmp -#define strcasecmp stricmp -#endif - -#ifndef strncasecmp -#define strncasecmp strnicmp -#endif - -// !s0rr0w! -#define SIZEOF_UINT64_T 8 -#define UINT64_C(C) (C) -typedef unsigned __int64 uint64_t; - -#define _WIN32_WINNT 0x500 -#include - -#pragma warning(disable : 4786) diff --git a/plugins/MirOTR/libotr/libotr_10.vcxproj b/plugins/MirOTR/libotr/libotr_10.vcxproj index 1a8511e061..ed769ffd25 100644 --- a/plugins/MirOTR/libotr/libotr_10.vcxproj +++ b/plugins/MirOTR/libotr/libotr_10.vcxproj @@ -71,7 +71,7 @@ Disabled - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) _DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -88,7 +88,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Disabled - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) _DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -103,7 +103,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Full - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) Level3 Fast @@ -118,7 +118,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Full - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) Level3 Fast diff --git a/plugins/MirOTR/libotr/libotr_12.vcxproj b/plugins/MirOTR/libotr/libotr_12.vcxproj index c928fa9811..8698501aca 100644 --- a/plugins/MirOTR/libotr/libotr_12.vcxproj +++ b/plugins/MirOTR/libotr/libotr_12.vcxproj @@ -75,7 +75,7 @@ Disabled - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) _DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -88,7 +88,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Disabled - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) _DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -99,7 +99,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Full - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) Level3 Fast @@ -110,7 +110,7 @@ /D "WIN32_LEAN_AND_MEAN" %(AdditionalOptions) Full - custom;inc;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) + custom;src;..\Libgcrypt\src;..\Libgpg-error;%(AdditionalIncludeDirectories) NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) Level3 Fast diff --git a/plugins/MirOTR/src/stdafx.h b/plugins/MirOTR/src/stdafx.h index d5e557c907..24037f8eee 100644 --- a/plugins/MirOTR/src/stdafx.h +++ b/plugins/MirOTR/src/stdafx.h @@ -1,96 +1,95 @@ -// stdafx.h : Includedatei für Standardsystem-Includedateien -// oder häufig verwendete projektspezifische Includedateien, -// die nur in unregelmäßigen Abständen geändert werden. -// - -#pragma once - -#define _CRT_NON_CONFORMING_SWPRINTFS -#define _CRT_SECURE_NO_WARNINGS -#define WIN32_LEAN_AND_MEAN // Selten verwendete Teile der Windows-Header nicht einbinden. - -#ifndef WINVER // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist. -#define WINVER 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen. -#endif - -#ifndef _WIN32_WINNT // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist. -#define _WIN32_WINNT 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen. -#endif - -#ifndef _WIN32_IE // Gibt an, dass Internet Explorer 7.0 die mindestens erforderliche Plattform ist. -#define _WIN32_IE 0x0700 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von IE abzuzielen. -#endif - -#include -#include -#include -#include -#include -extern "C" { - #include - #include - #include - #include - #include -} +// stdafx.h : Includedatei für Standardsystem-Includedateien +// oder häufig verwendete projektspezifische Includedateien, +// die nur in unregelmäßigen Abständen geändert werden. +// + +#pragma once + +#define _CRT_NON_CONFORMING_SWPRINTFS +#define WIN32_LEAN_AND_MEAN // Selten verwendete Teile der Windows-Header nicht einbinden. + +#ifndef WINVER // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist. +#define WINVER 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen. +#endif + +#ifndef _WIN32_WINNT // Gibt an, dass Windows 2000 die mindestens erforderliche Plattform ist. +#define _WIN32_WINNT 0x0500 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von Windows abzuzielen. +#endif + +#ifndef _WIN32_IE // Gibt an, dass Internet Explorer 7.0 die mindestens erforderliche Plattform ist. +#define _WIN32_IE 0x0700 // Ändern Sie den entsprechenden Wert, um auf andere Versionen von IE abzuzielen. +#endif + +#include +#include +#include +#include +#include +extern "C" { + #include + #include + #include + #include + #include +} using namespace std; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//ExternalAPI -#include -#include -#include - -#include "otr.h" -#include "dbfilter.h" -#include "language.h" -#include "options.h" -#include "utils.h" -#include "svcs_menu.h" -#include "svcs_proto.h" -#include "svcs_srmm.h" -#include "resource.h" -#include "otr.h" -#include "icons.h" -#include "dialogs.h" -#include "version.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//ExternalAPI +#include +#include +#include + +#include "otr.h" +#include "dbfilter.h" +#include "language.h" +#include "options.h" +#include "utils.h" +#include "svcs_menu.h" +#include "svcs_proto.h" +#include "svcs_srmm.h" +#include "resource.h" +#include "otr.h" +#include "icons.h" +#include "dialogs.h" +#include "version.h" #include "entities.h" -#include "icons.h" -#include "mirotrmenu.h" -#include "striphtml.h" -#include "ekhtml.h" -#include "svcs_proto.h" - -#ifdef _DEBUG - #define DEBUGOUTA(x) OutputDebugStringA(x); - #define DEBUGOUT(x) OutputDebugString(x); - #define DEBUGOUT_T(x) OutputDebugString(__T(x)); -#else - #define DEBUGOUTA(x); - #define DEBUGOUT(x) - #define DEBUGOUT_T(x) -#endif - -// modified manual policy - so that users set to 'opportunistic' will automatically start OTR with users set to 'manual' -#define OTRL_POLICY_MANUAL_MOD (OTRL_POLICY_MANUAL | OTRL_POLICY_WHITESPACE_START_AKE | OTRL_POLICY_ERROR_START_AKE) - -#define MODULENAME "MirOTR" - -#define PREF_BYPASS_OTR 0x8000 -#define PREF_NO_HISTORY 0x10000 - -extern HINSTANCE hInst; - -// TODO: Hier auf zusätzliche Header, die das Programm erfordert, verweisen. +#include "icons.h" +#include "mirotrmenu.h" +#include "striphtml.h" +#include "ekhtml.h" +#include "svcs_proto.h" + +#ifdef _DEBUG + #define DEBUGOUTA(x) OutputDebugStringA(x); + #define DEBUGOUT(x) OutputDebugString(x); + #define DEBUGOUT_T(x) OutputDebugString(__T(x)); +#else + #define DEBUGOUTA(x); + #define DEBUGOUT(x) + #define DEBUGOUT_T(x) +#endif + +// modified manual policy - so that users set to 'opportunistic' will automatically start OTR with users set to 'manual' +#define OTRL_POLICY_MANUAL_MOD (OTRL_POLICY_MANUAL | OTRL_POLICY_WHITESPACE_START_AKE | OTRL_POLICY_ERROR_START_AKE) + +#define MODULENAME "MirOTR" + +#define PREF_BYPASS_OTR 0x8000 +#define PREF_NO_HISTORY 0x10000 + +extern HINSTANCE hInst; + +// TODO: Hier auf zusätzliche Header, die das Programm erfordert, verweisen. -- cgit v1.2.3