aboutsummaryrefslogtreecommitdiff
path: root/HACKING.txt
diff options
context:
space:
mode:
Diffstat (limited to 'HACKING.txt')
-rw-r--r--HACKING.txt42
1 files changed, 42 insertions, 0 deletions
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.