Compile-Windows-Authentication
From Freeciv
Steps for compiling a Freeciv server with Authentication support on Windows:
- Install Cygwin and necessary packages for compilation (autoconf, automake)
- Install minimal MinGW (MinGW-5.1.3.exe [1])
- Install MinGW Utils (mingw-utils-0.3.tar.gz [2])
- Configure path to use MinGW for compilation
- Install gettext (gettext-0.14.5.zip [3] and gettext-dev-0.14.5.zip [4])
- Apply gettext-S2_0-S2_1-2007-08-19.diff [5]
- Install libiconv (libiconv-1.9.1.bin.woe32.zip [6])
- Install mysqllib
- Download mysql-noinstall-5.0.45-win32.zip [7]
- Copy contents of /include to MinGW/include/mysql
- Copy contents of /lib/opt to a convenient directory
- Change to convenient directory in Cygwin
- Run reimp -d libmysql.lib
- Edit LIBMYSQL.def to add "mysql_query" just before "mysql_query@8"
- Run dlltool --input-def LIBMYSQL.def --dllname libmysql.dll --output-lib libmysqlclient.a --kill-at
- Copy libmysqlclient.a to MinGW/lib
- Edit server/auth.c to add "#include <winsock.h>" just before "#include <mysql/mysql.h>"
- Install zlib (zlib-1.2.3-lib.zip [8])
- Run ./autogen.sh --enable-client=no --host=mingw32 CPPFLAGS=-mno-cygwin --enable-auth --enable-debug=no --without-readline
- Run make
- Take newly created server/civserver.exe and replace the one in the official distrubtion
