From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- HACKING.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 HACKING.txt (limited to 'HACKING.txt') diff --git a/HACKING.txt b/HACKING.txt new file mode 100644 index 0000000..dac1c5b --- /dev/null +++ b/HACKING.txt @@ -0,0 +1,42 @@ +Programs are (a bit ugly) written in a mix of C and C++. First it was going to +be only C, but it turned out libspopc is not good enough for the task (it does +not parse messages), so I replaced it with vmime, which is a C++ lib. + +I compiled the programs using Mingw-w64 under Devuan (a derivative of Debian). +There's currently no facility to build it uder something else, sorry. + +Everything is linked statically (so that the programs ca be just copy-pasted +to some system and run there). Again, I haven't bothered making it possible +to build differently. + +To build, You need to first `apt install g++-mingw-w64-i686 gcc-mingw-w64-i686`. +Some other deps are also required for building libraries (at least for OpenSSL) +- You'll see what's missing once You get an error. + +* OpenSSL + Procedures are described in openssl-1.1.0h/INSTALL. Basically, You need to + cd into openssl-1.10h/ and run + `./Configure --cross-compile-prefix=i686-w64-mingw32- mingw` and `make`. + At the and You should have libcrypto.a and libssl.a inside openssl-1.1.0h/. + I haven't made any modification to OpenSSL lib. + +* Vmime + I made a very ugly modification to certificate import code - I changed it to + treat provided certs as DER instead of PEM format. Remember about that, if + You decide to update the library to a newer version. I also added + a mingw_cross_toolchain.cmake file in vmime-master/ to facilitate + cross-compiling. Unfortunately, there weren't any instructions on how to do + that, so I had to fight cmake for a while. Finally, I added + build_for_losedows.sh script in vmime-master/. To build - just enter + the library's directory and run the script. You should be left with + libvmime.a in vmime-master/. + +* Iniparser + I modified both the library sources and its Makefile. It should suffice to + anter iniparser-4.1/ and run `make` there. You'll be left with + a libiniparser.a. + +* The actual programs + Make is used. If You've already prepared the libraries, just run `make` and + hope it doesn't crash ;) + pop.exe and push.exe shall be produced. -- cgit v1.2.3