mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-24 14:23:36 -05:00
Fix MSys 32b depends and Add a specific MSys2 Makefile to compile
missing libs.
This commit is contained in:
parent
3c9774d3de
commit
340e78f064
41
msys2_build_libs/Makefile
Executable file
41
msys2_build_libs/Makefile
Executable file
@ -0,0 +1,41 @@
|
||||
TCL_VERSION=8.6.2
|
||||
SQLCIPHER_VERSION=2.2.1
|
||||
|
||||
all: dirs sqlcipher copylibs
|
||||
|
||||
dirs:
|
||||
mkdir -p libs/include
|
||||
mkdir -p libs/lib
|
||||
mkdir -p libs/bin
|
||||
|
||||
tcl$(TCL_VERSION)-src.tar.gz:
|
||||
curl.exe -L http://prdownloads.sourceforge.net/tcl/tcl$(TCL_VERSION)-src.tar.gz -o tcl$(TCL_VERSION)-src.tar.gz
|
||||
|
||||
sqlcipher-$(SQLCIPHER_VERSION).tar.gz:
|
||||
curl.exe -L -k https://github.com/sqlcipher/sqlcipher/archive/v$(SQLCIPHER_VERSION).tar.gz -o sqlcipher-$(SQLCIPHER_VERSION).tar.gz
|
||||
|
||||
sqlcipher: tcl$(TCL_VERSION)-src.tar.gz sqlcipher-$(SQLCIPHER_VERSION).tar.gz
|
||||
# tcl
|
||||
tar xvf tcl$(TCL_VERSION)-src.tar.gz
|
||||
mkdir -p tcl$(TCL_VERSION)/build
|
||||
cd tcl$(TCL_VERSION)/build && ../win/configure
|
||||
cd tcl$(TCL_VERSION)/build && make
|
||||
#sqlcipher
|
||||
tar xvf sqlcipher-$(SQLCIPHER_VERSION).tar.gz
|
||||
cd sqlcipher-$(SQLCIPHER_VERSION) && ln -s ../tcl$(TCL_VERSION)/build/tclsh86.exe tclsh
|
||||
mkdir -p tcl$(TCL_VERSION)/lib
|
||||
ln -s `pwd`/tcl$(TCL_VERSION)/library `pwd`/tcl$(TCL_VERSION)/lib/tcl8.6
|
||||
cd sqlcipher-$(SQLCIPHER_VERSION) && PATH=$$PATH:`pwd`/../tcl$(TCL_VERSION)/build && LIBS="-L`pwd`/../libs/lib -lgdi32 $$LIBS" && export LIBS && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I`pwd`/../libs/include -I`pwd`/../tcl$(TCL_VERSION)/generic" LDFLAGS="-L`pwd`/../libs/lib -lcrypto -lgdi32" --with-tcl="`pwd`/../tcl$(TCL_VERSION)/build" && make install prefix="`pwd`/install"
|
||||
cp -r sqlcipher-$(SQLCIPHER_VERSION)/install/include/* libs/include/
|
||||
cp sqlcipher-$(SQLCIPHER_VERSION)/install/lib/libsqlcipher.a libs/lib/
|
||||
cp sqlcipher-$(SQLCIPHER_VERSION)/install/bin/sqlcipher.exe libs/bin/
|
||||
rm -r -f sqlcipher-$(SQLCIPHER_VERSION)
|
||||
rm -r -f tcl$(TCL_VERSION)
|
||||
touch sqlcipher
|
||||
|
||||
copylibs:
|
||||
read -p "Do you want to copy libs to retroshare? (yes|no)" answer; \
|
||||
if [ "$$answer" = "yes" ] ; then \
|
||||
cp -r libs ../../ ; \
|
||||
fi
|
||||
|
@ -91,6 +91,10 @@ win32 {
|
||||
|
||||
#Have to reorder libs, else got /libs/lib/libcrypto.a(bio_lib.o):bio_lib.c:(.text+0x0): multiple definition of `BIO_new'
|
||||
LIBS = -lcurl -lxml2 -lz -lxslt -lws2_32 -lwldap32 -lssl -lcrypto -lgdi32 $${LIBS}
|
||||
exists(C:/msys32/mingw32/include) {
|
||||
message(msys2 xml2 is installed.)
|
||||
INC_DIR += "C:/msys32/mingw32/include/libxml2"
|
||||
}
|
||||
exists(C:/msys64/mingw32/include) {
|
||||
message(msys2 xml2 is installed.)
|
||||
INC_DIR += "C:/msys64/mingw32/include/libxml2"
|
||||
|
@ -13,14 +13,21 @@ unix {
|
||||
win32 {
|
||||
message(***retroshare.pri:Win32)
|
||||
exists($$PWD/../libs) {
|
||||
message(Get pre-compiled libraries.)
|
||||
message(Get pre-compiled libraries.)
|
||||
isEmpty(PREFIX) { PREFIX = "$$PWD/../libs" }
|
||||
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
|
||||
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include" }
|
||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||
}
|
||||
exists(C:/msys32/mingw32/include) {
|
||||
message(msys2 32b is installed.)
|
||||
PREFIX_MSYS2 = "C:/msys32/mingw32"
|
||||
BIN_DIR += "$${PREFIX_MSYS2}/bin"
|
||||
INC_DIR += "$${PREFIX_MSYS2}/include"
|
||||
LIB_DIR += "$${PREFIX_MSYS2}/lib"
|
||||
}
|
||||
exists(C:/msys64/mingw32/include) {
|
||||
message(msys2 is installed.)
|
||||
message(msys2 64b is installed.)
|
||||
PREFIX_MSYS2 = "C:/msys64/mingw32"
|
||||
BIN_DIR += "$${PREFIX_MSYS2}/bin"
|
||||
INC_DIR += "$${PREFIX_MSYS2}/include"
|
||||
|
Loading…
Reference in New Issue
Block a user