From 058a9080f6045b516d083fce547f5e7c5185806d Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Thu, 3 Dec 2015 19:30:00 +1100 Subject: [PATCH] Exclude the Qt version from patch files (#60) This should allow for both Qt 5.1.1 (for OSX) and Qt 5.5.1 (for Windows) simultaneously. --- build.cmd | 4 ++-- build.sh | 2 +- qnetworkaccessmanager.patch | 4 ++-- winmakefile.patch | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.cmd b/build.cmd index b8ad0830..663db666 100644 --- a/build.cmd +++ b/build.cmd @@ -62,9 +62,9 @@ if not exist "%SRC_DIR%\qtbase\qmake\generators\win32\winmakefile.ori" ( copy "%SRC_DIR%\qtbase\qmake\generators\win32\winmakefile.cpp"^ "%SRC_DIR%\qtbase\qmake\generators\win32\winmakefile.ori" ) -"%PATCH%" -N -p0 -i qnetworkaccessmanager.patch +"%PATCH%" -d "%SRC_DIR%" -N -p0 -i qnetworkaccessmanager.patch if errorlevel 1 pause -"%PATCH%" -N -p0 -i winmakefile.patch +"%PATCH%" -d "%SRC_DIR%" -N -p0 -i winmakefile.patch if errorlevel 1 pause :: Create the build directory, if not already. diff --git a/build.sh b/build.sh index 21a08d87..0b04faa5 100755 --- a/build.sh +++ b/build.sh @@ -48,7 +48,7 @@ function patchSource { fi echo "Applying qnetworkaccessmanager.patch" "$SED" -e '1,2 s/\\/\//g' "$SELF_DIR/qnetworkaccessmanager.patch" | \ - "$PATCH" --forward --strip 0 + "$PATCH" --directory "$SELF_DIR/$QT_NAME" --forward --strip 0 if [ $? -eq 1 ]; then echo 'Assuming patch is already applied and continuing.' fi diff --git a/qnetworkaccessmanager.patch b/qnetworkaccessmanager.patch index 09333268..3ee2bdbf 100644 --- a/qnetworkaccessmanager.patch +++ b/qnetworkaccessmanager.patch @@ -1,5 +1,5 @@ ---- qt-everywhere-opensource-src-5.1.1\qtbase\src\network\access\qnetworkaccessmanager.cpp Mon Aug 26 04:03:34 2013 -+++ qt-everywhere-opensource-src-5.1.1\qtbase\src\network\access\qnetworkaccessmanager.new Wed Oct 8 19:36:54 2014 +--- qtbase\src\network\access\qnetworkaccessmanager.cpp Mon Aug 26 04:03:34 2013 ++++ qtbase\src\network\access\qnetworkaccessmanager.new Wed Oct 8 19:36:54 2014 @@ -71,6 +71,8 @@ #include "qthread.h" diff --git a/winmakefile.patch b/winmakefile.patch index dbf32a80..4fe6b6d1 100644 --- a/winmakefile.patch +++ b/winmakefile.patch @@ -1,5 +1,5 @@ ---- qt-everywhere-opensource-src-5.1.1\qtbase\qmake\generators\win32\winmakefile.cpp Mon Aug 26 04:04:06 2013 -+++ qt-everywhere-opensource-src-5.1.1\qtbase\qmake\generators\win32\winmakefile.new Wed Oct 8 17:41:01 2014 +--- qtbase\qmake\generators\win32\winmakefile.cpp Mon Aug 26 04:04:06 2013 ++++ qtbase\qmake\generators\win32\winmakefile.new Wed Oct 8 17:41:01 2014 @@ -465,6 +465,7 @@ ts << "\t\t\t\tVALUE \"CompanyName\", \"" << companyName << "\\0\"\n"; ts << "\t\t\t\tVALUE \"FileDescription\", \"" << description << "\\0\"\n";