From 6b52abb0c7cafe152a928d9220511f5be445a7b2 Mon Sep 17 00:00:00 2001 From: martell Date: Tue, 18 Nov 2014 18:57:26 +0000 Subject: [PATCH] conemu: new package --- ...ded-support-for-a-PREFIX-in-makefile.patch | 268 ++++++++ ...0002-Dialog-Flags-added-to-Mingw-w64.patch | 25 + ...-support-already-exists-in-Mingw-w64.patch | 25 + ...-support-already-exists-in-mingw-w64.patch | 68 ++ ...ncrement-when-compiling-under-mingw-.patch | 39 ++ ...elper2-is-already-defined-in-mingw-w.patch | 25 + ...wmemmove_s-is-available-in-mingw-w64.patch | 25 + ...use-printf-can-be-undefined-in-this-.patch | 26 + ...-and-defines-are-already-defined-in-.patch | 26 + ...line-is-already-defined-in-mingw-w64.patch | 25 + ...011-fixed-interlocked2-for-mingw-w64.patch | 81 +++ ...ageBox-is-not-supported-in-mingw-w64.patch | 28 + ...tureinfo-as-it-is-defined-in-mingw-w.patch | 39 ++ ...0014-msxml-is-supported-in-mingw-w64.patch | 85 +++ ...015-fix-writeprocessd-export-for-gcc.patch | 31 + .../0016-fix-ConEmuHK-linking-under-gcc.patch | 40 ++ ...-to-vista-transparency-for-mingw-w64.patch | 33 + ...ross-initialization-errors-under-gcc.patch | 103 +++ mingw-w64-cross-conemu-git/ConEmu.xml | 618 ++++++++++++++++++ mingw-w64-cross-conemu-git/PKGBUILD | 137 ++++ 20 files changed, 1747 insertions(+) create mode 100644 mingw-w64-cross-conemu-git/0001-added-support-for-a-PREFIX-in-makefile.patch create mode 100644 mingw-w64-cross-conemu-git/0002-Dialog-Flags-added-to-Mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0004-ShObjIdl-support-already-exists-in-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch create mode 100644 mingw-w64-cross-conemu-git/0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch create mode 100644 mingw-w64-cross-conemu-git/0007-wmemmove_s-is-available-in-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0008-use-_printf-because-printf-can-be-undefined-in-this-.patch create mode 100644 mingw-w64-cross-conemu-git/0009-Internet-structs-and-defines-are-already-defined-in-.patch create mode 100644 mingw-w64-cross-conemu-git/0010-__forceinline-is-already-defined-in-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0011-fixed-interlocked2-for-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch create mode 100644 mingw-w64-cross-conemu-git/0014-msxml-is-supported-in-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0015-fix-writeprocessd-export-for-gcc.patch create mode 100644 mingw-w64-cross-conemu-git/0016-fix-ConEmuHK-linking-under-gcc.patch create mode 100644 mingw-w64-cross-conemu-git/0017-Add-guard-to-vista-transparency-for-mingw-w64.patch create mode 100644 mingw-w64-cross-conemu-git/0018-Fix-various-cross-initialization-errors-under-gcc.patch create mode 100644 mingw-w64-cross-conemu-git/ConEmu.xml create mode 100644 mingw-w64-cross-conemu-git/PKGBUILD diff --git a/mingw-w64-cross-conemu-git/0001-added-support-for-a-PREFIX-in-makefile.patch b/mingw-w64-cross-conemu-git/0001-added-support-for-a-PREFIX-in-makefile.patch new file mode 100644 index 00000000..0b0a1901 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0001-added-support-for-a-PREFIX-in-makefile.patch @@ -0,0 +1,268 @@ +From 6805b6cd96914dff2fcda7385b7f71f35e70fc3c Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:19:14 +0000 +Subject: [PATCH 01/18] added support for a PREFIX in makefile + +--- + src/ConEmu/makefile_gcc | 10 +++++----- + src/ConEmuBg/makefile_gcc | 12 ++++++------ + src/ConEmuC/makefile_gcc | 6 +++--- + src/ConEmuCD/makefile_gcc | 12 ++++++------ + src/ConEmuDW/makefile_gcc | 12 ++++++------ + src/ConEmuHk/makefile_gcc | 12 ++++++------ + src/ConEmuLn/makefile_gcc | 12 ++++++------ + src/ConEmuTh/makefile_gcc | 12 ++++++------ + src/KeyEvents.SysLog/makefile_gcc | 4 ++-- + 9 files changed, 46 insertions(+), 46 deletions(-) + +diff --git a/src/ConEmu/makefile_gcc b/src/ConEmu/makefile_gcc +index c5d400f..13ed7f9 100644 +--- a/src/ConEmu/makefile_gcc ++++ b/src/ConEmu/makefile_gcc +@@ -181,8 +181,8 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc + RM = rm -f + RMDIR = rmdir + CP = cp -f +@@ -190,9 +190,9 @@ M4 = tools/m4 -P -DFARBIT=$(DIRBIT) + GAWK = tools/gawk + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) $(DEBUGFLAGS) -mwindows -fexceptions -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti $(CXXWIDE) $(USERCPP) + CCFLAGS = $(DEBUGFLAGS) -mwindows -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing $(CCWIDE) $(USERCPP) + LNKFLAGS = $(DEBUGLINKFLAGS) -mwindows $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 $(USERLIBS) +diff --git a/src/ConEmuBg/makefile_gcc b/src/ConEmuBg/makefile_gcc +index 98acbbb..43fffa3 100644 +--- a/src/ConEmuBg/makefile_gcc ++++ b/src/ConEmuBg/makefile_gcc +@@ -91,18 +91,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/ConEmuC/makefile_gcc b/src/ConEmuC/makefile_gcc +index e03bf01..14d5556 100644 +--- a/src/ConEmuC/makefile_gcc ++++ b/src/ConEmuC/makefile_gcc +@@ -82,8 +82,8 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc + RM = rm -f + RMDIR = rmdir + CP = cp -f +@@ -91,7 +91,7 @@ M4 = tools/m4 -P -DFARBIT=$(DIRBIT) + GAWK = tools/gawk + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres -D__FARBIT__=$(DIRBIT) ++WINDRES = $(PREFIX)windres -D__FARBIT__=$(DIRBIT) + DEFINES = -D FAR_ALPHA_VERSION -D UNICODE -D _UNICODE + CXXFLAGS = $(ENCFLAGS) -pipe -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions -fno-rtti -Wall -Wno-missing-braces -Wno-unknown-pragmas -Wno-switch $(CXXWIDE) + CFLAGS = -pipe -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions -Wall -Wno-missing-braces -Wno-unknown-pragmas -Wno-switch $(CCWIDE) +diff --git a/src/ConEmuCD/makefile_gcc b/src/ConEmuCD/makefile_gcc +index 2ed2019..b23f8e8 100644 +--- a/src/ConEmuCD/makefile_gcc ++++ b/src/ConEmuCD/makefile_gcc +@@ -109,18 +109,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/ConEmuDW/makefile_gcc b/src/ConEmuDW/makefile_gcc +index ed2c03d..9b8b457 100644 +--- a/src/ConEmuDW/makefile_gcc ++++ b/src/ConEmuDW/makefile_gcc +@@ -90,18 +90,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/ConEmuHk/makefile_gcc b/src/ConEmuHk/makefile_gcc +index 087712b..e2de4df 100644 +--- a/src/ConEmuHk/makefile_gcc ++++ b/src/ConEmuHk/makefile_gcc +@@ -98,18 +98,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll $(BASEADDRESS) -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/ConEmuLn/makefile_gcc b/src/ConEmuLn/makefile_gcc +index 35141b5..7eedee6 100644 +--- a/src/ConEmuLn/makefile_gcc ++++ b/src/ConEmuLn/makefile_gcc +@@ -88,18 +88,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/ConEmuTh/makefile_gcc b/src/ConEmuTh/makefile_gcc +index a763658..36dcee5 100644 +--- a/src/ConEmuTh/makefile_gcc ++++ b/src/ConEmuTh/makefile_gcc +@@ -97,18 +97,18 @@ ifdef EXCLUDECRT + COMMONLIB = + endif + +-CXX = g++ +-CC = gcc +-DLLTOOL = dlltool ++CXX = $(PREFIX)g++ ++CC = $(PREFIX)gcc ++DLLTOOL = $(PREFIX)dlltool + RM = rm -f + RMDIR = rmdir + CP = cp -f + M4 = m4 -P + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres +-AR = ar +-RANLIB = ranlib ++WINDRES = $(PREFIX)windres ++AR = $(PREFIX)ar ++RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) + LNKFLAGS = -mdll -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) +diff --git a/src/KeyEvents.SysLog/makefile_gcc b/src/KeyEvents.SysLog/makefile_gcc +index 42b6af9..8d9b04b 100644 +--- a/src/KeyEvents.SysLog/makefile_gcc ++++ b/src/KeyEvents.SysLog/makefile_gcc +@@ -18,7 +18,7 @@ NOSTART = + NODEFLIBS = + + +-CXX = g++ ++CXX = $(PREFIX)g++ + RM = rm -f + RMDIR = rmdir + CP = cp -f +@@ -26,7 +26,7 @@ M4 = tools/m4 -P -DFARBIT=$(DIRBIT) + GAWK = tools/gawk + MV = mv -f + MKDIR = mkdir -p +-WINDRES = windres -D__FARBIT__=$(DIRBIT) ++WINDRES = $(PREFIX)windres -D__FARBIT__=$(DIRBIT) + DEFINES = -D FAR_ALPHA_VERSION -D UNICODE -D _UNICODE + CXXFLAGS = $(ENCFLAGS) -mno-cygwin -pipe -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions -fno-rtti -Wall -Wno-missing-braces -Wno-unknown-pragmas -Wno-switch $(CXXWIDE) + CFLAGS = -mno-cygwin -pipe -Os $(DEFINES) -funsigned-char -fomit-frame-pointer -fno-exceptions -Wall -Wno-missing-braces -Wno-unknown-pragmas -Wno-switch $(CCWIDE) +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0002-Dialog-Flags-added-to-Mingw-w64.patch b/mingw-w64-cross-conemu-git/0002-Dialog-Flags-added-to-Mingw-w64.patch new file mode 100644 index 00000000..f19a57a8 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0002-Dialog-Flags-added-to-Mingw-w64.patch @@ -0,0 +1,25 @@ +From 912ea1a9c0f910f993b9acb77e5a6368ee50f59d Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 19:10:32 +0000 +Subject: [PATCH 02/18] Dialog Flags added to Mingw-w64 + +--- + src/ConEmu/ConfirmDlg.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmu/ConfirmDlg.h b/src/ConEmu/ConfirmDlg.h +index 4c4a591..a3568a9 100644 +--- a/src/ConEmu/ConfirmDlg.h ++++ b/src/ConEmu/ConfirmDlg.h +@@ -49,7 +49,7 @@ struct ConfirmCloseParam + }; + int ConfirmCloseConsoles(const ConfirmCloseParam& Parm); + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + + enum _TASKDIALOG_FLAGS + { +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch b/mingw-w64-cross-conemu-git/0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch new file mode 100644 index 00000000..24ef20e4 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch @@ -0,0 +1,25 @@ +From 395338a039dfa97ea462eae7b74104e89152a9b5 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 19:50:49 +0000 +Subject: [PATCH 03/18] SecureZeroMemory support already exists in Mingw-w64 + +--- + src/common/RConStartArgs.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/RConStartArgs.cpp b/src/common/RConStartArgs.cpp +index b1548d5..8efecb4 100644 +--- a/src/common/RConStartArgs.cpp ++++ b/src/common/RConStartArgs.cpp +@@ -43,7 +43,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define MCHKHEAP PRAGMA_ERROR("Restricted in ConEmuHk") + #endif + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #define SecureZeroMemory(p,s) memset(p,0,s) + #endif + +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0004-ShObjIdl-support-already-exists-in-mingw-w64.patch b/mingw-w64-cross-conemu-git/0004-ShObjIdl-support-already-exists-in-mingw-w64.patch new file mode 100644 index 00000000..38b7a0ba --- /dev/null +++ b/mingw-w64-cross-conemu-git/0004-ShObjIdl-support-already-exists-in-mingw-w64.patch @@ -0,0 +1,68 @@ +From ba047645d2c97971609f541641df415c2be975b3 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:45:07 +0000 +Subject: [PATCH 04/18] ShObjIdl support already exists in mingw-w64 + +--- + src/ConEmu/BaseDragDrops.cpp | 2 +- + src/ConEmu/DragDropData.cpp | 2 +- + src/ConEmu/TaskBar.cpp | 2 +- + src/ConEmuHk/ShellProcessor.cpp | 2 ++ + 4 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/ConEmu/BaseDragDrops.cpp b/src/ConEmu/BaseDragDrops.cpp +index 5c91bde..3e017a8 100644 +--- a/src/ConEmu/BaseDragDrops.cpp ++++ b/src/ConEmu/BaseDragDrops.cpp +@@ -8,7 +8,7 @@ + #pragma warning(default: 4091) + #include + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #include "ShObjIdl_Part.h" + #endif // __GNUC__ + +diff --git a/src/ConEmu/DragDropData.cpp b/src/ConEmu/DragDropData.cpp +index f47de80..23fde66 100644 +--- a/src/ConEmu/DragDropData.cpp ++++ b/src/ConEmu/DragDropData.cpp +@@ -34,7 +34,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma warning(disable: 4091) + #include + #pragma warning(default: 4091) +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #include "ShObjIdl_Part.h" + #endif + +diff --git a/src/ConEmu/TaskBar.cpp b/src/ConEmu/TaskBar.cpp +index 64478d5..8e8ca11 100644 +--- a/src/ConEmu/TaskBar.cpp ++++ b/src/ConEmu/TaskBar.cpp +@@ -33,7 +33,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "Options.h" + + // COM TaskBarList interface support +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #include "ShObjIdl_Part.h" + const CLSID CLSID_TaskbarList = {0x56FDF344, 0xFD6D, 0x11d0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90}}; + const IID IID_ITaskbarList4 = {0xc43dc798, 0x95d1, 0x4bea, {0x90, 0x30, 0xbb, 0x99, 0xe2, 0x98, 0x3a, 0x1a}}; +diff --git a/src/ConEmuHk/ShellProcessor.cpp b/src/ConEmuHk/ShellProcessor.cpp +index 71b6e11..6a340f2 100644 +--- a/src/ConEmuHk/ShellProcessor.cpp ++++ b/src/ConEmuHk/ShellProcessor.cpp +@@ -34,7 +34,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #pragma warning(default: 4091) + #include "../ConEmuCD/ExitCodes.h" ++#if defined(__GNUC__) && !defined(__MINGW32__) + #include "../ConEmu/ShObjIdl_Part.h" ++#endif + #include "../common/common.hpp" + #include "../common/ConEmuCheck.h" + #include "SetHook.h" +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch b/mingw-w64-cross-conemu-git/0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch new file mode 100644 index 00000000..eebfb13c --- /dev/null +++ b/mingw-w64-cross-conemu-git/0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch @@ -0,0 +1,39 @@ +From e8c056d8dfeb50d4e1ccae99afbfad9e2f41e518 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:46:57 +0000 +Subject: [PATCH 05/18] Use InterlockedIncrement when compiling under mingw-w64 + +--- + src/ConEmu/ConEmu.h | 2 +- + src/ConEmuCD/ConEmuC.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ConEmu/ConEmu.h b/src/ConEmu/ConEmu.h +index 91c5623..4d962a7 100644 +--- a/src/ConEmu/ConEmu.h ++++ b/src/ConEmu/ConEmu.h +@@ -40,7 +40,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define GET_X_LPARAM(inPx) ((int)(short)LOWORD(inPx)) + #define GET_Y_LPARAM(inPy) ((int)(short)HIWORD(inPy)) + +-#ifndef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +diff --git a/src/ConEmuCD/ConEmuC.h b/src/ConEmuCD/ConEmuC.h +index c82485e..ca4540a 100644 +--- a/src/ConEmuCD/ConEmuC.h ++++ b/src/ConEmuCD/ConEmuC.h +@@ -665,7 +665,7 @@ extern BOOL gbInRecreateRoot; + #include "ExitCodes.h" + + +-#ifndef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch b/mingw-w64-cross-conemu-git/0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch new file mode 100644 index 00000000..848f6c48 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch @@ -0,0 +1,25 @@ +From cde6c617ea13f55fce2bf12e0f5cf512fb184f4e Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:48:13 +0000 +Subject: [PATCH 06/18] IID_IDragSourceHelper2 is already defined in mingw-w64 + +--- + src/ConEmu/DragDropData.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmu/DragDropData.cpp b/src/ConEmu/DragDropData.cpp +index 23fde66..bafd69e 100644 +--- a/src/ConEmu/DragDropData.cpp ++++ b/src/ConEmu/DragDropData.cpp +@@ -77,7 +77,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #endif + + // COM TaskBarList interface support +-#if defined(__GNUC__) && defined(USE_DRAG_HELPER) ++#if defined(__GNUC__) && defined(USE_DRAG_HELPER) && !defined(__MINGW64_VERSION_MAJOR) + const IID IID_IDragSourceHelper2 = {0x83E07D0D, 0x0C5F, 0x4163, {0xBF, 0x1A, 0x60, 0xB2, 0x74, 0x05, 0x1E, 0x40}}; + #endif + +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0007-wmemmove_s-is-available-in-mingw-w64.patch b/mingw-w64-cross-conemu-git/0007-wmemmove_s-is-available-in-mingw-w64.patch new file mode 100644 index 00000000..656f4c5d --- /dev/null +++ b/mingw-w64-cross-conemu-git/0007-wmemmove_s-is-available-in-mingw-w64.patch @@ -0,0 +1,25 @@ +From 54d68aa85aba5372fc1cbc3cad25ca4514c92ef6 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:49:15 +0000 +Subject: [PATCH 07/18] wmemmove_s is available in mingw-w64 + +--- + src/ConEmu/Header.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmu/Header.h b/src/ConEmu/Header.h +index 8dab248..7683612 100644 +--- a/src/ConEmu/Header.h ++++ b/src/ConEmu/Header.h +@@ -52,7 +52,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "../common/Memory.h" + #include "../common/MAssert.h" + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #define wmemmove_s(d,ds,s,ss) wmemmove(d,s,ss) + #define SecureZeroMemory(p,s) memset(p,0,s) + #endif +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0008-use-_printf-because-printf-can-be-undefined-in-this-.patch b/mingw-w64-cross-conemu-git/0008-use-_printf-because-printf-can-be-undefined-in-this-.patch new file mode 100644 index 00000000..31ddae06 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0008-use-_printf-because-printf-can-be-undefined-in-this-.patch @@ -0,0 +1,26 @@ +From 78d260d023005113a8c3df27de9fb6a337b7bad5 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:50:15 +0000 +Subject: [PATCH 08/18] use _printf because printf can be undefined in this + case + +--- + src/ConEmuCD/ConsoleMain.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmuCD/ConsoleMain.cpp b/src/ConEmuCD/ConsoleMain.cpp +index eae3afa..769bd96 100644 +--- a/src/ConEmuCD/ConsoleMain.cpp ++++ b/src/ConEmuCD/ConsoleMain.cpp +@@ -3384,7 +3384,7 @@ int DoParseArgs(LPCWSTR asCmdLine) + _printf("Standard shell splitter\n"); + for (int j = 0; j < iShellCount; j++) + { +- printf("%u: `", j); ++ _printf("%u: `", j); + _wprintf(ppszShl[j]); + _printf("`\n"); + } +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0009-Internet-structs-and-defines-are-already-defined-in-.patch b/mingw-w64-cross-conemu-git/0009-Internet-structs-and-defines-are-already-defined-in-.patch new file mode 100644 index 00000000..cea11870 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0009-Internet-structs-and-defines-are-already-defined-in-.patch @@ -0,0 +1,26 @@ +From 6d09ddb72d41ba46c119a60b5060f6f7eaae3ee5 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:51:04 +0000 +Subject: [PATCH 09/18] Internet structs and defines are already defined in + mingw-w64 + +--- + src/ConEmuCD/Downloader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmuCD/Downloader.cpp b/src/ConEmuCD/Downloader.cpp +index b20794d..ec883ff 100644 +--- a/src/ConEmuCD/Downloader.cpp ++++ b/src/ConEmuCD/Downloader.cpp +@@ -34,7 +34,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "../common/MSectionSimple.h" + #include "Downloader.h" + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + typedef struct { + DWORD dwMajorVersion; + DWORD dwMinorVersion; +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0010-__forceinline-is-already-defined-in-mingw-w64.patch b/mingw-w64-cross-conemu-git/0010-__forceinline-is-already-defined-in-mingw-w64.patch new file mode 100644 index 00000000..e048ad71 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0010-__forceinline-is-already-defined-in-mingw-w64.patch @@ -0,0 +1,25 @@ +From 55a4a591c72047aea8b674bf2ae849850d8d7141 Mon Sep 17 00:00:00 2001 +From: martell +Date: Mon, 10 Nov 2014 20:52:01 +0000 +Subject: [PATCH 10/18] __forceinline is already defined in mingw-w64 + +--- + src/ConEmu/kl_parts.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ConEmu/kl_parts.h b/src/ConEmu/kl_parts.h +index c302109..3fd7709 100644 +--- a/src/ConEmu/kl_parts.h ++++ b/src/ConEmu/kl_parts.h +@@ -24,7 +24,7 @@ typedef unsigned __int16 u16; + typedef unsigned __int64 u64; + typedef DWORD u32; + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) + #define __forceinline __inline__ + #endif + template __forceinline const T& klMin(const T &a, const T &b) {return a < b ? a : b;} +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0011-fixed-interlocked2-for-mingw-w64.patch b/mingw-w64-cross-conemu-git/0011-fixed-interlocked2-for-mingw-w64.patch new file mode 100644 index 00000000..eb138f46 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0011-fixed-interlocked2-for-mingw-w64.patch @@ -0,0 +1,81 @@ +From 640ad5d0ef5287c077baf4d78f8cec14919da0bf Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:15:34 +0000 +Subject: [PATCH 11/18] fixed interlocked2 for mingw-w64 + +--- + src/ConEmu/ConEmu.h | 2 +- + src/ConEmuCD/ConEmuC.h | 2 +- + src/ConEmuHk/ConEmuHooks.h | 2 +- + src/ConEmuHk/SetHook.cpp | 2 +- + src/common/MConHandle.cpp | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/ConEmu/ConEmu.h b/src/ConEmu/ConEmu.h +index 4d962a7..558d450 100644 +--- a/src/ConEmu/ConEmu.h ++++ b/src/ConEmu/ConEmu.h +@@ -40,7 +40,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define GET_X_LPARAM(inPx) ((int)(short)LOWORD(inPx)) + #define GET_Y_LPARAM(inPy) ((int)(short)HIWORD(inPy)) + +-#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +diff --git a/src/ConEmuCD/ConEmuC.h b/src/ConEmuCD/ConEmuC.h +index ca4540a..5f5bb27 100644 +--- a/src/ConEmuCD/ConEmuC.h ++++ b/src/ConEmuCD/ConEmuC.h +@@ -665,7 +665,7 @@ extern BOOL gbInRecreateRoot; + #include "ExitCodes.h" + + +-#if defined(__GNUC__) && !defined(__MINGW64_VERSION_MAJOR) ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +diff --git a/src/ConEmuHk/ConEmuHooks.h b/src/ConEmuHk/ConEmuHooks.h +index f1f0a4d..ace7044 100644 +--- a/src/ConEmuHk/ConEmuHooks.h ++++ b/src/ConEmuHk/ConEmuHooks.h +@@ -201,7 +201,7 @@ extern "C" { + #endif + + #ifdef USEHOOKLOG +- #ifndef __GNUC__ ++ #if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +diff --git a/src/ConEmuHk/SetHook.cpp b/src/ConEmuHk/SetHook.cpp +index 2803a9e..42f756c 100644 +--- a/src/ConEmuHk/SetHook.cpp ++++ b/src/ConEmuHk/SetHook.cpp +@@ -51,7 +51,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include + #include +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +diff --git a/src/common/MConHandle.cpp b/src/common/MConHandle.cpp +index dcdb507..e818f88 100644 +--- a/src/common/MConHandle.cpp ++++ b/src/common/MConHandle.cpp +@@ -142,7 +142,7 @@ MConHandle::MConHandle(LPCWSTR asName) + //} + }; + +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #else + #define _InterlockedIncrement InterlockedIncrement +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch b/mingw-w64-cross-conemu-git/0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch new file mode 100644 index 00000000..213c6ade --- /dev/null +++ b/mingw-w64-cross-conemu-git/0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch @@ -0,0 +1,28 @@ +From cdd911925374a45f16decf0a03ff8ad442584490 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:17:02 +0000 +Subject: [PATCH 12/18] AssertMessageBox is not supported in mingw-w64 + +--- + src/ConEmu/ConEmuApp.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/ConEmu/ConEmuApp.cpp b/src/ConEmu/ConEmuApp.cpp +index e275795..d0ce118 100644 +--- a/src/ConEmu/ConEmuApp.cpp ++++ b/src/ConEmu/ConEmuApp.cpp +@@ -3336,7 +3336,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine + gnOsVer = ((gOSVer.dwMajorVersion & 0xFF) << 8) | (gOSVer.dwMinorVersion & 0xFF); + HeapInitialize(); + RemoveOldComSpecC(); ++ ++#if !defined(__MINGW64_VERSION_MAJOR) + AssertMsgBox = MsgBox; ++#endif ++ + gn_MainThreadId = GetCurrentThreadId(); + + // On Vista and higher ensure our process will be +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch b/mingw-w64-cross-conemu-git/0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch new file mode 100644 index 00000000..407b0b19 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch @@ -0,0 +1,39 @@ +From 2888ceac4970c193543453febf9208cd5dc87446 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:18:25 +0000 +Subject: [PATCH 13/18] Add guard to gestureinfo as it is defined in mingw-w64 + +--- + src/ConEmu/GestureEngine.cpp | 2 +- + src/ConEmu/GestureEngine.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ConEmu/GestureEngine.cpp b/src/ConEmu/GestureEngine.cpp +index b1ff45a..c6a3ec7 100644 +--- a/src/ConEmu/GestureEngine.cpp ++++ b/src/ConEmu/GestureEngine.cpp +@@ -46,7 +46,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "RealConsole.h" + #include "TabBar.h" + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && (WINVER < 0x0601) + /* + * Gesture flags - GESTUREINFO.dwFlags + */ +diff --git a/src/ConEmu/GestureEngine.h b/src/ConEmu/GestureEngine.h +index deb9d00..11de49c 100644 +--- a/src/ConEmu/GestureEngine.h ++++ b/src/ConEmu/GestureEngine.h +@@ -29,7 +29,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once + #include + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && (WINVER < 0x0601) + + #define HGESTUREINFO HANDLE + +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0014-msxml-is-supported-in-mingw-w64.patch b/mingw-w64-cross-conemu-git/0014-msxml-is-supported-in-mingw-w64.patch new file mode 100644 index 00000000..4d7a4cb3 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0014-msxml-is-supported-in-mingw-w64.patch @@ -0,0 +1,85 @@ +From b6eff832f2d39d210f3c14d9247909080fc3c966 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:19:49 +0000 +Subject: [PATCH 14/18] msxml is supported in mingw-w64 + +--- + src/ConEmu/Options.cpp | 4 ++-- + src/ConEmu/Registry.cpp | 2 +- + src/ConEmu/Registry.h | 4 ++-- + src/common/xmllite.h | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/ConEmu/Options.cpp b/src/ConEmu/Options.cpp +index a771267..2000b3d 100644 +--- a/src/ConEmu/Options.cpp ++++ b/src/ConEmu/Options.cpp +@@ -4282,7 +4282,7 @@ SettingsBase* Settings::CreateSettings(const SettingsStorage* apStorage) + } + + +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + DWORD dwAttr = -1; + + if (!apStorage) +@@ -4341,7 +4341,7 @@ void Settings::GetSettingsType(SettingsStorage& Storage, bool& ReadOnly) + + ZeroStruct(Storage); + +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + HANDLE hFile = NULL; + LPWSTR pszXmlFile = gpConEmu->ConEmuXml(); + +diff --git a/src/ConEmu/Registry.cpp b/src/ConEmu/Registry.cpp +index e5d7be2..c5d505a 100644 +--- a/src/ConEmu/Registry.cpp ++++ b/src/ConEmu/Registry.cpp +@@ -354,7 +354,7 @@ void SettingsINI::Save(const wchar_t *regName, LPCBYTE value, DWORD nType, DWORD + + + /* *************************** */ +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + SettingsXML::SettingsXML(const SettingsStorage& Storage) + : SettingsBase(Storage) + { +diff --git a/src/ConEmu/Registry.h b/src/ConEmu/Registry.h +index 1c86874..571821a 100644 +--- a/src/ConEmu/Registry.h ++++ b/src/ConEmu/Registry.h +@@ -28,7 +28,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #pragma once + +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #include + #endif + +@@ -147,7 +147,7 @@ struct SettingsINI : public SettingsBase + virtual ~SettingsINI(); + }; + +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + struct SettingsXML : public SettingsBase + { + protected: +diff --git a/src/common/xmllite.h b/src/common/xmllite.h +index b34daba..e6a77b8 100644 +--- a/src/common/xmllite.h ++++ b/src/common/xmllite.h +@@ -1271,7 +1271,7 @@ EXTERN_C const IID IID_IXmlWriter; + + //////////////////////////////////////////////////////////////////////////////////////////////////////////// + // IID helpers +-#ifndef __GNUC__ ++#if !defined(__GNUC__) || defined(__MINGW64_VERSION_MAJOR) + #define IID_IXmlReader __uuidof(IXmlReader) + #define IID_IXmlWriter __uuidof(IXmlWriter) + #define IID_IXmlResolver __uuidof(IXmlResolver) +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0015-fix-writeprocessd-export-for-gcc.patch b/mingw-w64-cross-conemu-git/0015-fix-writeprocessd-export-for-gcc.patch new file mode 100644 index 00000000..6010777e --- /dev/null +++ b/mingw-w64-cross-conemu-git/0015-fix-writeprocessd-export-for-gcc.patch @@ -0,0 +1,31 @@ +From e1260cf291a7c9336edb199ce8f24b9378953ab0 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:24:03 +0000 +Subject: [PATCH 15/18] fix writeprocessd export for gcc + +--- + src/ConEmuHk/Ansi.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/ConEmuHk/Ansi.h b/src/ConEmuHk/Ansi.h +index 3e52bb2..f55395f 100644 +--- a/src/ConEmuHk/Ansi.h ++++ b/src/ConEmuHk/Ansi.h +@@ -45,6 +45,14 @@ typedef BOOL (WINAPI* OnWriteConsoleW_t)(HANDLE hConsoleOutput, const VOID *lpBu + + struct MSectionSimple; + ++#if defined(__GNUC__) ++extern "C" { ++#endif ++ BOOL WINAPI WriteProcessed(LPCWSTR lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten); ++#if defined(__GNUC__) ++}; ++#endif ++ + struct CEAnsi + { + //private: +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0016-fix-ConEmuHK-linking-under-gcc.patch b/mingw-w64-cross-conemu-git/0016-fix-ConEmuHK-linking-under-gcc.patch new file mode 100644 index 00000000..3d56d536 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0016-fix-ConEmuHK-linking-under-gcc.patch @@ -0,0 +1,40 @@ +From 4c4e3d4b561e9a78825eea30bb0af72665945514 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:24:57 +0000 +Subject: [PATCH 16/18] fix ConEmuHK linking under gcc + +--- + src/ConEmuHk/makefile_gcc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/ConEmuHk/makefile_gcc b/src/ConEmuHk/makefile_gcc +index e2de4df..a5b2081 100644 +--- a/src/ConEmuHk/makefile_gcc ++++ b/src/ConEmuHk/makefile_gcc +@@ -9,12 +9,14 @@ SRCS = \ + ../common/InQueue.cpp \ + ../common/MAssert.cpp \ + ../common/Memory.cpp \ ++ ../common/Monitors.cpp \ + ../common/MSectionSimple.cpp \ + ../common/MSection.cpp \ + ../common/MSecurity.cpp \ + ../common/MStrSafe.cpp \ + ../common/RConStartArgs.cpp \ + ../common/WConsole.cpp \ ++ ../common/WFiles.cpp \ + ../common/WObjects.cpp \ + Ansi.cpp \ + ConEmuHooks.cpp \ +@@ -112,7 +114,7 @@ AR = $(PREFIX)ar + RANLIB = $(PREFIX)ranlib + CXXFLAGS = $(ENCFLAGS) -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-rtti -fno-exceptions $(CXXWIDE) $(USERCPP) $(WINVER) + CCFLAGS = -I $(COMMON) -I $(COMINC) -Wall -Os -funsigned-char -fomit-frame-pointer -fstrict-aliasing -fno-exceptions $(CCWIDE) $(USERCPP) $(WINVER) +-LNKFLAGS = -mdll $(BASEADDRESS) -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 $(USERLIBS) ++LNKFLAGS = -mdll $(BASEADDRESS) -s -lgcc $(USERLIBSFIRST) $(COMMONLIB) -luser32 -lkernel32 -ladvapi32 -lshell32 -luuid -lgdi32 $(USERLIBS) + RCFLAGS = -I $(COMINC) $(RCWIDE) $(USERRC) + + OBJS = $(patsubst %.cpp,$(OBJDIR)/%.o,$(filter %.cpp,$(SRCS))) $(patsubst %.c,$(OBJDIR)/%.o,$(filter %.c,$(SRCS))) $(RES) +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0017-Add-guard-to-vista-transparency-for-mingw-w64.patch b/mingw-w64-cross-conemu-git/0017-Add-guard-to-vista-transparency-for-mingw-w64.patch new file mode 100644 index 00000000..c9c0d7f7 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0017-Add-guard-to-vista-transparency-for-mingw-w64.patch @@ -0,0 +1,33 @@ +From 00d6a150802ac1a989abe9ec8b0efe6577cd1354 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:26:37 +0000 +Subject: [PATCH 17/18] Add guard to vista transparency for mingw-w64 + +--- + src/common/WConsole.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/common/WConsole.cpp b/src/common/WConsole.cpp +index 2f6cef1..19fa119 100644 +--- a/src/common/WConsole.cpp ++++ b/src/common/WConsole.cpp +@@ -424,6 +424,8 @@ void GetConsoleSizeInfo(CONSOLE_INFO *pci) + #undef ENABLE_AUTO_POSITION + #endif + ++#if !defined(__MINGW64_VERSION_MAJOR) ++ + //VISTA support: + #ifndef ENABLE_AUTO_POSITION + typedef struct _CONSOLE_FONT_INFOEX +@@ -437,6 +439,7 @@ typedef struct _CONSOLE_FONT_INFOEX + } CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; + #endif + ++#endif + + // Vista+ only + BOOL apiGetConsoleScreenBufferInfoEx(HANDLE hConsoleOutput, MY_CONSOLE_SCREEN_BUFFER_INFOEX* lpConsoleScreenBufferInfoEx) +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/0018-Fix-various-cross-initialization-errors-under-gcc.patch b/mingw-w64-cross-conemu-git/0018-Fix-various-cross-initialization-errors-under-gcc.patch new file mode 100644 index 00000000..6653dd19 --- /dev/null +++ b/mingw-w64-cross-conemu-git/0018-Fix-various-cross-initialization-errors-under-gcc.patch @@ -0,0 +1,103 @@ +From 06c22fa1635ac3cf9d7349ae587915ffddc6e029 Mon Sep 17 00:00:00 2001 +From: martell +Date: Tue, 11 Nov 2014 04:28:02 +0000 +Subject: [PATCH 18/18] Fix various cross initialization errors under gcc + +--- + src/ConEmu/Options.cpp | 4 +++- + src/ConEmu/RealBuffer.cpp | 4 +++- + src/ConEmuHk/Console2.h | 3 ++- + src/common/CmdLine.cpp | 5 ++++- + 4 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/src/ConEmu/Options.cpp b/src/ConEmu/Options.cpp +index 2000b3d..9098c7b 100644 +--- a/src/ConEmu/Options.cpp ++++ b/src/ConEmu/Options.cpp +@@ -1245,6 +1245,8 @@ bool Settings::LoadCmdTask(SettingsBase* reg, CommandTasks* &pTask, int iIndex) + bool lbRc = false; + wchar_t szVal[32]; + int iCmdMax = 0, iCmdCount = 0; ++ ++ DWORD VkMod; + + wchar_t* pszNameSet = NULL; + if (iIndex >= 0) +@@ -1272,7 +1274,7 @@ bool Settings::LoadCmdTask(SettingsBase* reg, CommandTasks* &pTask, int iIndex) + pTask->SetName(pszNameSet, iIndex); + + pTask->HotKey.HkType = chk_Task; +- DWORD VkMod = 0; ++ VkMod = 0; + if ((iIndex >= 0) && reg->Load(L"Hotkey", VkMod)) + pTask->HotKey.SetVkMod(VkMod); + else +diff --git a/src/ConEmu/RealBuffer.cpp b/src/ConEmu/RealBuffer.cpp +index 294c73d..dd684e4 100644 +--- a/src/ConEmu/RealBuffer.cpp ++++ b/src/ConEmu/RealBuffer.cpp +@@ -673,6 +673,8 @@ BOOL CRealBuffer::SetConsoleSizeSrv(USHORT sizeX, USHORT sizeY, USHORT sizeBuffe + //bool bLargestReached = false; + bool bSecondTry = false; + ++ bool bNeedApplyConsole; ++ + _ASSERTE(anCmdID==CECMD_SETSIZESYNC || anCmdID==CECMD_SETSIZENOSYNC || anCmdID==CECMD_CMDSTARTED || anCmdID==CECMD_CMDFINISHED); + //ExecutePrepareCmd(&lIn.hdr, anCmdID, lIn.hdr.cbSize); + if (!pIn /*|| !pOut*/) +@@ -793,7 +795,7 @@ BOOL CRealBuffer::SetConsoleSizeSrv(USHORT sizeX, USHORT sizeY, USHORT sizeBuffe + ResetEvent(mp_RCon->mh_ApplyFinished); + + _ASSERTE(mp_RCon->m_ConsoleMap.IsValid()); +- bool bNeedApplyConsole = ++ bNeedApplyConsole = + mp_RCon->m_ConsoleMap.IsValid() + && (anCmdID == CECMD_SETSIZESYNC) + && (mp_RCon->mn_MonitorThreadID != GetCurrentThreadId()); +diff --git a/src/ConEmuHk/Console2.h b/src/ConEmuHk/Console2.h +index b719550..17de078 100644 +--- a/src/ConEmuHk/Console2.h ++++ b/src/ConEmuHk/Console2.h +@@ -35,6 +35,7 @@ int InjectHookDLL(PROCESS_INFORMATION pi, InjectHookFunctions* pfn /*UINT_PTR fn + BYTE* code = NULL; + wchar_t strHookDllPath[MAX_PATH*2] = {}; + DWORD dwErrCode = 0; ++ DWORD_PTR nLoadLibraryProcShift; + #ifndef _WIN64 + // starting a 32-bit process + LPCWSTR pszDllName = L"\\ConEmuHk.dll"; +@@ -74,7 +75,7 @@ int InjectHookDLL(PROCESS_INFORMATION pi, InjectHookFunctions* pfn /*UINT_PTR fn + } + + //UINT_PTR fnGetDllByName = 0; +- DWORD_PTR nLoadLibraryProcShift = 0; ++ nLoadLibraryProcShift = 0; + //HMODULE hNtDll, hKernel; + //if (nOsVer >= 0x0602) + if (pfn->fnLdrGetDllHandleByName) +diff --git a/src/common/CmdLine.cpp b/src/common/CmdLine.cpp +index dab6ec3..c386089 100644 +--- a/src/common/CmdLine.cpp ++++ b/src/common/CmdLine.cpp +@@ -412,6 +412,9 @@ bool IsNeedCmd(BOOL bRootCmd, LPCWSTR asCmdLine, CmdArg &szExe, + bool rbRootIsCmdExe = true; + bool rbAlwaysConfirmExit = false; + bool rbAutoDisableConfirmExit = false; ++ ++ wchar_t *pwszEndSpace; ++ + if (rsArguments) *rsArguments = NULL; + + bool lbRc = false; +@@ -682,7 +685,7 @@ bool IsNeedCmd(BOOL bRootCmd, LPCWSTR asCmdLine, CmdArg &szExe, + //pwszCopy = wcsrchr(szArg, L'\\'); if (!pwszCopy) pwszCopy = szArg; else pwszCopy ++; + pwszCopy = PointToName(szExe); + //2009-08-27 +- wchar_t *pwszEndSpace = szExe.ms_Arg + lstrlenW(szExe) - 1; ++ pwszEndSpace = szExe.ms_Arg + lstrlenW(szExe) - 1; + + while ((*pwszEndSpace == L' ') && (pwszEndSpace > szExe)) + { +-- +2.1.3 + diff --git a/mingw-w64-cross-conemu-git/ConEmu.xml b/mingw-w64-cross-conemu-git/ConEmu.xml new file mode 100644 index 00000000..da53e481 --- /dev/null +++ b/mingw-w64-cross-conemu-git/ConEmu.xml @@ -0,0 +1,618 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mingw-w64-cross-conemu-git/PKGBUILD b/mingw-w64-cross-conemu-git/PKGBUILD new file mode 100644 index 00000000..d0722b97 --- /dev/null +++ b/mingw-w64-cross-conemu-git/PKGBUILD @@ -0,0 +1,137 @@ +# Maintainer: Martell Malone + +_realname=conemu +_mingw_suff=mingw-w64-cross +pkgname="${_realname}-git" +replaces="${_realname}" +provides=("${_realname}") +conflicts=("${_realname}") +pkgver=r2173.14d8383 +pkgrel=1 +pkgdesc="Customizable Windows console emulator with tabs" +arch=('i686' 'x86_64') +url="http://code.google.com/p/conemu-maximus5/" +license=('custom') + +makedepends=("git" "${_mingw_suff}-gcc" "${_mingw_suff}-binutils" "${_mingw_suff}-crt") +options=('!strip' 'staticlibs' '!emptydirs' '!buildflags') + +source=(#"${_realname}"::"git+http://github.com/martell/ConEmu.git#branch=mingw64" + "${_realname}"::"git+https://github.com/Maximus5/ConEmu.git" + "0001-added-support-for-a-PREFIX-in-makefile.patch" + "0002-Dialog-Flags-added-to-Mingw-w64.patch" + "0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch" + "0004-ShObjIdl-support-already-exists-in-mingw-w64.patch" + "0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch" + "0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch" + "0007-wmemmove_s-is-available-in-mingw-w64.patch" + "0008-use-_printf-because-printf-can-be-undefined-in-this-.patch" + "0009-Internet-structs-and-defines-are-already-defined-in-.patch" + "0010-__forceinline-is-already-defined-in-mingw-w64.patch" + "0011-fixed-interlocked2-for-mingw-w64.patch" + "0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch" + "0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch" + "0014-msxml-is-supported-in-mingw-w64.patch" + "0015-fix-writeprocessd-export-for-gcc.patch" + "0016-fix-ConEmuHK-linking-under-gcc.patch" + "0017-Add-guard-to-vista-transparency-for-mingw-w64.patch" + "0018-Fix-various-cross-initialization-errors-under-gcc.patch" + "ConEmu.xml") + +md5sums=("SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP" + "SKIP") + +pkgver() { + cd "$srcdir/$_realname" + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/$_realname" + git am "$srcdir/0001-added-support-for-a-PREFIX-in-makefile.patch" + git am "$srcdir/0002-Dialog-Flags-added-to-Mingw-w64.patch" + git am "$srcdir/0003-SecureZeroMemory-support-already-exists-in-Mingw-w64.patch" + git am "$srcdir/0004-ShObjIdl-support-already-exists-in-mingw-w64.patch" + git am "$srcdir/0005-Use-InterlockedIncrement-when-compiling-under-mingw-.patch" + git am "$srcdir/0006-IID_IDragSourceHelper2-is-already-defined-in-mingw-w.patch" + git am "$srcdir/0007-wmemmove_s-is-available-in-mingw-w64.patch" + git am "$srcdir/0008-use-_printf-because-printf-can-be-undefined-in-this-.patch" + git am "$srcdir/0009-Internet-structs-and-defines-are-already-defined-in-.patch" + git am "$srcdir/0010-__forceinline-is-already-defined-in-mingw-w64.patch" + git am "$srcdir/0011-fixed-interlocked2-for-mingw-w64.patch" + git am "$srcdir/0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch" + git am "$srcdir/0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch" + git am "$srcdir/0014-msxml-is-supported-in-mingw-w64.patch" + git am "$srcdir/0015-fix-writeprocessd-export-for-gcc.patch" + git am "$srcdir/0016-fix-ConEmuHK-linking-under-gcc.patch" + git am "$srcdir/0017-Add-guard-to-vista-transparency-for-mingw-w64.patch" + git am "$srcdir/0018-Fix-various-cross-initialization-errors-under-gcc.patch" + +} + +build() { + + case "${CARCH}" in + i686*) + _CC=i686-w64-mingw32 + ;; + x86_64*) + _CC=x86_64-w64-mingw32 + ;; + esac + + cd "${_realname}/src" + + # NOTE: + # The ugliest build system I've ever seen, yuck! + # NOTE: + # Don't remove `-static*' switches from `USERLIBSFIRST'! Otherwise when + # running `cmd.exe' (Command Prompt) in ConEmu, it cannot find + # `libstdc++-6.dll' if it is not in the current `PATH' environment variable. + + PREFIX="${_CC}-" make -f makefile_all_gcc WIDE="1" \ + USERCPP="-pipe -O3 -fomit-frame-pointer -fpermissive -std=c++11" \ + USERLIBSFIRST="-static -static-libgcc -static-libstdc++" + +} + +package() { + cd "$srcdir/$_realname" + + mkdir -p "${pkgdir}/opt/bin" + + local suffix='' + + if test "${CARCH}" == 'x86_64'; then + suffix='64' + fi + + cp -r "$srcdir/ConEmu.xml" "${pkgdir}/opt/bin" + + cd "$srcdir/$_realname/Release" + cp -r "ConEmu.exe" "${pkgdir}/opt/bin/ConEmu.exe" + + cd "ConEmu" + cp -r "ConEmuC.exe" "${pkgdir}/opt/bin/ConEmuC${suffix}.exe" + cp -r "ConEmuCD.dll" "${pkgdir}/opt/bin/ConEmuCD${suffix}.dll" + cp -r "ConEmuHk.dll" "${pkgdir}/opt/bin/ConEmuHk${suffix}.dll" +} +