From 98a3bc1684873200ee87aab33c32b9ef75596d77 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Sat, 14 Jun 2014 00:44:44 +0200 Subject: [PATCH] Add a patch for p7zip to address build problems triggered by p7zip Stdafx.h defining WIN64 on non-Windows x86_64 systems. Modify compileX11.sh to check for lib7zip folder and try to apply the patch before build. Update documentation in README_7zip.txt. --- compileX11.sh | 9 +++++++++ compressed_archive/README_7zip.txt | 6 ++++-- compressed_archive/libp7zip.patch | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 compressed_archive/libp7zip.patch diff --git a/compileX11.sh b/compileX11.sh index 403f517a..fe10596e 100755 --- a/compileX11.sh +++ b/compileX11.sh @@ -1,5 +1,14 @@ #! /bin/bash +cd ./compressed_archive +if [ ! -d "libp7zip" ]; then +echo "You need p7zip source code to compile YACReader. \ +Please check the compressed_archive folder for further instructions." +exit +fi +patch -p0 -i libp7zip.patch +cd .. + echo "Compiling YACReader" cd ./YACReader qmake "CONFIG+=release" diff --git a/compressed_archive/README_7zip.txt b/compressed_archive/README_7zip.txt index 003e3f39..3e4a5864 100644 --- a/compressed_archive/README_7zip.txt +++ b/compressed_archive/README_7zip.txt @@ -1,5 +1,7 @@ If you are trying to compile YACReader, you need to donwload de source code of 7zip (Windows) or p7zip (Linux/MacOSX). -Please, extract it and rename the folder to lib7zip (Windows) or libp7zip (Linux/MacOSX), then copy it to $YACREADER_SRC/compressed_archive/ (this folder) +Please, extract it and rename the folder to lib7zip (Windows) or libp7zip (Linux/MacOSX), then copy it to $YACREADER_SRC/compressed_archive/ (this +folder). If you are using a 64 bit Linux-System, please apply libp7zip.patch for successfull compilation or use compileX11.sh. + +YACReader is compiled using 7zip/p7zip 9.20.1 -YACReader is compiled using 7zip/p7zip 9.20. \ No newline at end of file diff --git a/compressed_archive/libp7zip.patch b/compressed_archive/libp7zip.patch new file mode 100644 index 00000000..522c1202 --- /dev/null +++ b/compressed_archive/libp7zip.patch @@ -0,0 +1,11 @@ +--- libp7zip/CPP/myWindows/StdAfx.h 2014-06-06 23:52:13.397311952 +0200 ++++ libp7zip/CPP/myWindows/StdAfx.h 2014-06-06 23:53:20.353981756 +0200 +@@ -114,7 +114,7 @@ + + #if defined( __x86_64__ ) + +-#define _WIN64 1 ++//#define _WIN64 1 + + #endif +