From 5a96eb68b242d53c1333ea68479bd57475fa5b66 Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Mon, 24 Oct 2016 23:09:40 +0200 Subject: [PATCH] MinGW GCC update - changes necessary to get back a buildable version with mingw, last adapted with https://github.com/notepad-plus-plus/notepad-plus-plus/pull/1229 - fixed some gcc compiler errors and warnings, see https://ci.appveyor.com/project/chcg/notepad-plus-plus/build/1.0.3 to https://ci.appveyor.com/project/chcg/notepad-plus-plus/build/1.0.13 - remaining task is the wincontrol "ReadDirectoryChanges", which uses ATL, propably not available with mingw Closes #2478 --- PowerEditor/gcc/include/various.h | 1 + PowerEditor/gcc/makefile | 16 +++++++++++----- PowerEditor/gcc/resources.rc | 1 + .../src/ScitillaComponent/ScintillaEditView.h | 2 +- .../src/WinControls/FileBrowser/fileBrowser.h | 4 +++- .../WinControls/FunctionList/functionParser.h | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/PowerEditor/gcc/include/various.h b/PowerEditor/gcc/include/various.h index c4bf6f09..ae1658c0 100644 --- a/PowerEditor/gcc/include/various.h +++ b/PowerEditor/gcc/include/various.h @@ -49,3 +49,4 @@ static inline int min(unsigned int a, unsigned int b) { // from MinGW include/driverspecs.h #define __inout +#define __inout_opt diff --git a/PowerEditor/gcc/makefile b/PowerEditor/gcc/makefile index 701dbf1b..52b85d53 100644 --- a/PowerEditor/gcc/makefile +++ b/PowerEditor/gcc/makefile @@ -48,6 +48,7 @@ WIN_DIR = $(NPP_DIR)/WinControls COLOUR_DIR = $(WIN_DIR)/ColourPicker DOCKING_DIR = $(WIN_DIR)/DockingWnd DOCMAP_DIR = $(WIN_DIR)/DocumentMap + FBROWSER_DIR = $(WIN_DIR)/FileBrowser FINDCHARS_DIR = $(WIN_DIR)/FindCharsInRange FUNCLIST_DIR = $(WIN_DIR)/FunctionList GRID_DIR = $(WIN_DIR)/Grid @@ -55,6 +56,7 @@ WIN_DIR = $(NPP_DIR)/WinControls OPENSAVE_DIR = $(WIN_DIR)/OpenSaveFileDialog PREFERENCE_DIR = $(WIN_DIR)/Preference PRJPANEL_DIR = $(WIN_DIR)/ProjectPanel + READDIR_DIR = $(WIN_DIR)/ReadDirectoryChanges SHORTCUT_DIR = $(WIN_DIR)/shortcut SPLITTER_DIR = $(WIN_DIR)/SplitterContainer STATICDLG_DIR = $(WIN_DIR)/StaticDialog @@ -65,7 +67,7 @@ WIN_DIR = $(NPP_DIR)/WinControls TOOLBAR_DIR = $(WIN_DIR)/ToolBar TOOLTIP_DIR = $(WIN_DIR)/ToolTip TRAYICON_DIR = $(WIN_DIR)/TrayIcon - # TREEVIEW_DIR = $(WIN_DIR)/TreeView + # NOT USED TREEVIEW_DIR = $(WIN_DIR)/TreeView VERTFILE_DIR = $(WIN_DIR)/VerticalFileSwitcher WINDOWSDLG_DIR = $(WIN_DIR)/WindowsDlg @@ -101,6 +103,7 @@ SRC_WIN = $(wildcard $(WIN_DIR)/*.cpp) SRC_COLOUR = $(wildcard $(COLOUR_DIR)/*.cpp) SRC_DOCKING = $(wildcard $(DOCKING_DIR)/*.cpp) SRC_DOCMAP = $(wildcard $(DOCMAP_DIR)/*.cpp) + SRC_FBROWSER = $(wildcard $(FBROWSER_DIR)/*.cpp) SRC_FINDCHARS = $(wildcard $(FINDCHARS_DIR)/*.cpp) SRC_FUNCLIST = $(wildcard $(FUNCLIST_DIR)/*.cpp) SRC_GRID = $(wildcard $(GRID_DIR)/*.cpp) @@ -108,6 +111,7 @@ SRC_WIN = $(wildcard $(WIN_DIR)/*.cpp) SRC_OPENSAVE = $(wildcard $(OPENSAVE_DIR)/*.cpp) SRC_PREFERENCE = $(wildcard $(PREFERENCE_DIR)/*.cpp) SRC_PRJPANEL = $(wildcard $(PRJPANEL_DIR)/*.cpp) + SRC_READDIR = $(wildcard $(READDIR_DIR)/*.cpp) SRC_SHORTCUT = $(wildcard $(SHORTCUT_DIR)/*.cpp) SRC_SPLITTER = $(wildcard $(SPLITTER_DIR)/*.cpp) SRC_STATICDLG = $(wildcard $(STATICDLG_DIR)/*.cpp) @@ -152,6 +156,7 @@ OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN)) OBJ_COLOUR = $(patsubst %.cpp,%.o,$(SRC_COLOUR)) OBJ_DOCKING = $(patsubst %.cpp,%.o,$(SRC_DOCKING)) OBJ_DOCMAP = $(patsubst %.cpp,%.o,$(SRC_DOCMAP)) + OBJ_FBROWSER = $(patsubst %.cpp,%.o,$(SRC_FBROWSER)) OBJ_FINDCHARS = $(patsubst %.cpp,%.o,$(SRC_FINDCHARS)) OBJ_FUNCLIST = $(patsubst %.cpp,%.o,$(SRC_FUNCLIST)) OBJ_GRID = $(patsubst %.cpp,%.o,$(SRC_GRID)) @@ -159,6 +164,7 @@ OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN)) OBJ_OPENSAVE = $(patsubst %.cpp,%.o,$(SRC_OPENSAVE)) OBJ_PREFERENCE = $(patsubst %.cpp,%.o,$(SRC_PREFERENCE)) OBJ_PRJPANEL = $(patsubst %.cpp,%.o,$(SRC_PRJPANEL)) + OBJ_READDIR = $(patsubst %.cpp,%.o,$(SRC_READDIR)) OBJ_SHORTCUT = $(patsubst %.cpp,%.o,$(SRC_SHORTCUT)) OBJ_SPLITTER = $(patsubst %.cpp,%.o,$(SRC_SPLITTER)) OBJ_STATICDLG = $(patsubst %.cpp,%.o,$(SRC_STATICDLG)) @@ -173,21 +179,21 @@ OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN)) OBJ_WINDOWSDLG = $(patsubst %.cpp,%.o,$(SRC_WINDOWSDLG)) # Collections -DIRS_WIN = $(WIN_DIR) $(ABOUT_DIR) $(ANSICHAR_DIR) $(CLIPBOARD_DIR) $(CONTEXT_DIR) $(COLOUR_DIR) $(DOCKING_DIR) $(DOCMAP_DIR) $(FINDCHARS_DIR) $(FUNCLIST_DIR) $(GRID_DIR) $(IMLIST_DIR) $(OPENSAVE_DIR) $(PREFERENCE_DIR) $(PRJPANEL_DIR) $(SHORTCUT_DIR) $(SPLITTER_DIR) $(STATICDLG_DIR) $(RUNDLG_DIR) $(STATUSBAR_DIR) $(TABBAR_DIR) $(TASKLIST_DIR) $(TOOLBAR_DIR) $(TOOLTIP_DIR) $(TRAYICON_DIR) $(VERTFILE_DIR) $(WINDOWSDLG_DIR) +DIRS_WIN = $(WIN_DIR) $(ABOUT_DIR) $(ANSICHAR_DIR) $(CLIPBOARD_DIR) $(CONTEXT_DIR) $(COLOUR_DIR) $(DOCKING_DIR) $(DOCMAP_DIR) $(FBROWSER_DIR) $(FINDCHARS_DIR) $(FUNCLIST_DIR) $(GRID_DIR) $(IMLIST_DIR) $(OPENSAVE_DIR) $(PREFERENCE_DIR) $(PRJPANEL_DIR) $(READDIR_DIR) $(SHORTCUT_DIR) $(SPLITTER_DIR) $(STATICDLG_DIR) $(RUNDLG_DIR) $(STATUSBAR_DIR) $(TABBAR_DIR) $(TASKLIST_DIR) $(TOOLBAR_DIR) $(TOOLTIP_DIR) $(TRAYICON_DIR) $(VERTFILE_DIR) $(WINDOWSDLG_DIR) DIRS_UCHARDET = $(UCHARDET_DIR) DIRS_TIXML = $(TIXML_DIR) $(TIXMLA_DIR) DIRS_SCINT = $(SCINT_DIR) DIRS_MISC = $(MISC_DIR) $(COMMON_DIR) $(EXCEPTION_DIR) $(PLUGINS_DIR) $(PROCESS_DIR) $(REGEXT_DIR) DIRS = $(NPP_DIR) $(DIRS_WIN) $(DIRS_UCHARDET) $(DIRS_TIXML) $(DIRS_SCINT) $(DIRS_MISC) $(SCI_DIR) -SRCS_WIN = $(SRC_WIN) $(SRC_ABOUT) $(SRC_ANSICHAR) $(SRC_CLIPBOARD) $(SRC_CONTEXT) $(SRC_COLOUR) $(SRC_DOCKING) $(SRC_DOCMAP) $(SRC_FINDCHARS) $(SRC_FUNCLIST) $(SRC_GRID) $(SRC_IMLIST) $(SRC_OPENSAVE) $(SRC_PREFERENCE) $(SRC_PRJPANEL) $(SRC_SHORTCUT) $(SRC_SPLITTER) $(SRC_STATICDLG) $(SRC_RUNDLG) $(SRC_STATUSBAR) $(SRC_TABBAR) $(SRC_TASKLIST) $(SRC_TOOLBAR) $(SRC_TOOLTIP) $(SRC_TRAYICON) $(SRC_VERTFILE) $(SRC_WINDOWSDLG) +SRCS_WIN = $(SRC_WIN) $(SRC_ABOUT) $(SRC_ANSICHAR) $(SRC_CLIPBOARD) $(SRC_CONTEXT) $(SRC_COLOUR) $(SRC_DOCKING) $(SRC_DOCMAP) $(SRC_FBROWSER) $(SRC_FINDCHARS) $(SRC_FUNCLIST) $(SRC_GRID) $(SRC_IMLIST) $(SRC_OPENSAVE) $(SRC_PREFERENCE) $(SRC_PRJPANEL) $(SRC_READDIR) $(SRC_SHORTCUT) $(SRC_SPLITTER) $(SRC_STATICDLG) $(SRC_RUNDLG) $(SRC_STATUSBAR) $(SRC_TABBAR) $(SRC_TASKLIST) $(SRC_TOOLBAR) $(SRC_TOOLTIP) $(SRC_TRAYICON) $(SRC_VERTFILE) $(SRC_WINDOWSDLG) SRCS_UCHARDET = $(SRC_UCHARDET) SRCS_TIXML = $(SRC_TIXML) $(SRC_TIXMLA) SRCS_SCINT = $(SRC_SCINT) SRCS_MISC = $(SRC_MISC) $(SRC_COMMON) $(SRC_EXCEPTION) $(SRC_PLUGINS) $(SRC_PROCESS) $(SRC_REGEXT) SRCS = $(SRC_NPP) $(SRCS_WIN) $(SRCS_UCHARDET) $(SRCS_TIXML) $(SRCS_SCINT) $(SRCS_MISC) $(SRC_GCCINCLUDE) -OBJS_WIN = $(OBJ_WIN) $(OBJ_ABOUT) $(OBJ_ANSICHAR) $(OBJ_CLIPBOARD) $(OBJ_CONTEXT) $(OBJ_COLOUR) $(OBJ_DOCKING) $(OBJ_DOCMAP) $(OBJ_FINDCHARS) $(OBJ_FUNCLIST) $(OBJ_GRID) $(OBJ_IMLIST) $(OBJ_OPENSAVE) $(OBJ_PREFERENCE) $(OBJ_PRJPANEL) $(OBJ_SHORTCUT) $(OBJ_SPLITTER) $(OBJ_STATICDLG) $(OBJ_RUNDLG) $(OBJ_STATUSBAR) $(OBJ_TABBAR) $(OBJ_TASKLIST) $(OBJ_TOOLBAR) $(OBJ_TOOLTIP) $(OBJ_TRAYICON) $(OBJ_VERTFILE) $(OBJ_WINDOWSDLG) +OBJS_WIN = $(OBJ_WIN) $(OBJ_ABOUT) $(OBJ_ANSICHAR) $(OBJ_CLIPBOARD) $(OBJ_CONTEXT) $(OBJ_COLOUR) $(OBJ_DOCKING) $(OBJ_DOCMAP) $(OBJ_FBROWSER) $(OBJ_FINDCHARS) $(OBJ_FUNCLIST) $(OBJ_GRID) $(OBJ_IMLIST) $(OBJ_OPENSAVE) $(OBJ_PREFERENCE) $(OBJ_PRJPANEL) $(OBJ_READDIR) $(OBJ_SHORTCUT) $(OBJ_SPLITTER) $(OBJ_STATICDLG) $(OBJ_RUNDLG) $(OBJ_STATUSBAR) $(OBJ_TABBAR) $(OBJ_TASKLIST) $(OBJ_TOOLBAR) $(OBJ_TOOLTIP) $(OBJ_TRAYICON) $(OBJ_VERTFILE) $(OBJ_WINDOWSDLG) OBJS_UCHARDET = $(OBJ_UCHARDET) OBJS_TIXML = $(OBJ_TIXML) $(OBJ_TIXMLA) OBJS_SCINT = $(OBJ_SCINT) @@ -232,7 +238,7 @@ CXX = $(CROSS_COMPILE)g++ CXXFLAGS = $(INCLUDESPECIAL) -DTIXML_USE_STL -DTIXMLA_USE_STL $(UNICODE) -std=c++14 -fpermissive INCLUDES = $(patsubst %,-I%,$(DIRS)) -I./include LDFLAGS = -Wl,--subsystem,windows -LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi +LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi -ldbghelp RC = $(CROSS_COMPILE)windres diff --git a/PowerEditor/gcc/resources.rc b/PowerEditor/gcc/resources.rc index 76d1b321..e683f91b 100644 --- a/PowerEditor/gcc/resources.rc +++ b/PowerEditor/gcc/resources.rc @@ -12,6 +12,7 @@ #include "../src/WinControls/ColourPicker/WordStyleDlg.rc" #include "../src/WinControls/DockingWnd/DockingGUIWidget.rc" #include "../src/WinControls/DocumentMap/documentMap.rc" +#include "../src/WinControls/FileBrowser/fileBrowser.rc" #include "../src/WinControls/FindCharsInRange/findCharsInRange.rc" #include "../src/WinControls/FunctionList/functionListPanel.rc" #include "../src/WinControls/Grid/ShortcutMapper.rc" diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index 40b30459..78a36b7a 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -583,7 +583,7 @@ public: execute(SCI_INDICATORCLEARRANGE, docStart, docEnd-docStart); }; - static LanguageName ScintillaEditView::langNames[L_EXTERNAL+1]; + static LanguageName langNames[L_EXTERNAL+1]; void bufferUpdated(Buffer * buffer, int mask); BufferID getCurrentBufferID() { return _currentBufferID; }; diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h index 39c0ec81..02b0b0f7 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h @@ -63,6 +63,8 @@ //#define PM_MOVEDOWNENTRY TEXT("Move Down\tCtrl+Down") class TiXmlNode; +class FileBrowser; +class FolderInfo; class FileInfo final { @@ -158,7 +160,7 @@ public: void addRootFolder(generic_string); HTREEITEM getRootFromFullPath(const generic_string & rootPath) const; - HTREEITEM FileBrowser::findChildNodeFromName(HTREEITEM parent, generic_string); + HTREEITEM findChildNodeFromName(HTREEITEM parent, generic_string); bool addInTree(generic_string rootPath, generic_string addItemFullPath, HTREEITEM node, std::vector linarPathArray); HTREEITEM findInTree(generic_string rootPath, HTREEITEM node, std::vector linarPathArray); diff --git a/PowerEditor/src/WinControls/FunctionList/functionParser.h b/PowerEditor/src/WinControls/FunctionList/functionParser.h index 8c59bbe7..bf91afc9 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionParser.h +++ b/PowerEditor/src/WinControls/FunctionList/functionParser.h @@ -25,7 +25,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#pragma once; +#pragma once class ScintillaEditView; class TiXmlDocument;