Update makefile for mingw gcc builds

Close #4145
This commit is contained in:
Christian Grasser 2018-02-01 23:05:41 +01:00 committed by Don HO
parent cf7e373dca
commit c741f83bde
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
16 changed files with 83 additions and 41 deletions

View File

@ -21,10 +21,15 @@ SCI_DIR = ../../scintilla/include
GCC_DIR = .
GCCINCLUDE_DIR = $(GCC_DIR)/include
#json:
JSON_DIR = $(NPP_DIR)/json
#MISC:
MISC_DIR = $(NPP_DIR)/MISC
COMMON_DIR = $(MISC_DIR)/Common
EXCEPTION_DIR = $(MISC_DIR)/Exception
MD5_DIR = $(MISC_DIR)/md5
SHA2_DIR = $(MISC_DIR)/sha2
PLUGINS_DIR = $(MISC_DIR)/PluginsManager
PROCESS_DIR = $(MISC_DIR)/Process
REGEXT_DIR = $(MISC_DIR)/RegExt
@ -54,6 +59,7 @@ WIN_DIR = $(NPP_DIR)/WinControls
GRID_DIR = $(WIN_DIR)/Grid
IMLIST_DIR = $(WIN_DIR)/ImageListSet
OPENSAVE_DIR = $(WIN_DIR)/OpenSaveFileDialog
PLUGADMIN_DIR = $(WIN_DIR)/PluginsAdmin
PREFERENCE_DIR = $(WIN_DIR)/Preference
PRJPANEL_DIR = $(WIN_DIR)/ProjectPanel
READDIR_DIR = $(WIN_DIR)/ReadDirectoryChanges
@ -80,6 +86,8 @@ SRC_GCCINCLUDE = $(wildcard $(GCCINCLUDE_DIR)/*.cpp)
SRC_MISC = $(wildcard $(MISC_DIR)/*.cpp)
SRC_COMMON = $(wildcard $(COMMON_DIR)/*.cpp)
SRC_EXCEPTION = $(wildcard $(EXCEPTION_DIR)/*.cpp)
SRC_MD5 = $(wildcard $(MD5_DIR)/*.cpp)
SRC_SHA2 = $(wildcard $(SHA2_DIR)/*.cpp)
SRC_PLUGINS = $(wildcard $(PLUGINS_DIR)/*.cpp)
SRC_PROCESS = $(wildcard $(PROCESS_DIR)/*.cpp)
SRC_REGEXT = $(wildcard $(REGEXT_DIR)/*.cpp)
@ -109,6 +117,7 @@ SRC_WIN = $(wildcard $(WIN_DIR)/*.cpp)
SRC_GRID = $(wildcard $(GRID_DIR)/*.cpp)
SRC_IMLIST = $(wildcard $(IMLIST_DIR)/*.cpp)
SRC_OPENSAVE = $(wildcard $(OPENSAVE_DIR)/*.cpp)
SRC_PLUGADMIN = $(wildcard $(PLUGADMIN_DIR)/*.cpp)
SRC_PREFERENCE = $(wildcard $(PREFERENCE_DIR)/*.cpp)
SRC_PRJPANEL = $(wildcard $(PRJPANEL_DIR)/*.cpp)
SRC_READDIR = $(wildcard $(READDIR_DIR)/*.cpp)
@ -133,6 +142,8 @@ OBJ_GCCINCLUDE = $(patsubst %.cpp,%.o,$(SRC_GCCINCLUDE))
OBJ_MISC = $(patsubst %.cpp,%.o,$(SRC_MISC))
OBJ_COMMON = $(patsubst %.cpp,%.o,$(SRC_COMMON))
OBJ_EXCEPTION = $(patsubst %.cpp,%.o,$(SRC_EXCEPTION))
OBJ_MD5 = $(patsubst %.cpp,%.o,$(SRC_MD5))
OBJ_SHA2 = $(patsubst %.cpp,%.o,$(SRC_SHA2))
OBJ_PLUGINS = $(patsubst %.cpp,%.o,$(SRC_PLUGINS))
OBJ_PROCESS = $(patsubst %.cpp,%.o,$(SRC_PROCESS))
OBJ_REGEXT = $(patsubst %.cpp,%.o,$(SRC_REGEXT))
@ -162,6 +173,7 @@ OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN))
OBJ_GRID = $(patsubst %.cpp,%.o,$(SRC_GRID))
OBJ_IMLIST = $(patsubst %.cpp,%.o,$(SRC_IMLIST))
OBJ_OPENSAVE = $(patsubst %.cpp,%.o,$(SRC_OPENSAVE))
OBJ_PLUGADMIN = $(patsubst %.cpp,%.o,$(SRC_PLUGADMIN))
OBJ_PREFERENCE = $(patsubst %.cpp,%.o,$(SRC_PREFERENCE))
OBJ_PRJPANEL = $(patsubst %.cpp,%.o,$(SRC_PRJPANEL))
OBJ_READDIR = $(patsubst %.cpp,%.o,$(SRC_READDIR))
@ -179,25 +191,25 @@ 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) $(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_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) $(PLUGADMIN_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)
DIRS_MISC = $(MISC_DIR) $(COMMON_DIR) $(EXCEPTION_DIR) $(MD5_DIR) $(SHA2_DIR) $(PLUGINS_DIR) $(PROCESS_DIR) $(REGEXT_DIR)
DIRS = $(NPP_DIR) $(DIRS_WIN) $(DIRS_UCHARDET) $(DIRS_TIXML) $(DIRS_SCINT) $(DIRS_MISC) $(JSON_DIR) $(SCI_DIR)
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_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_PLUGADMIN) $(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_MISC = $(SRC_MISC) $(SRC_COMMON) $(SRC_EXCEPTION) $(SRC_MD5) $(SRC_SHA2) $(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_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_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_PLUGADMIN) $(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)
OBJS_MISC = $(OBJ_MISC) $(OBJ_COMMON) $(OBJ_EXCEPTION) $(OBJ_PLUGINS) $(OBJ_PROCESS) $(OBJ_REGEXT)
OBJS_MISC = $(OBJ_MISC) $(OBJ_COMMON) $(OBJ_EXCEPTION) $(OBJ_MD5) $(OBJ_SHA2) $(OBJ_PLUGINS) $(OBJ_PROCESS) $(OBJ_REGEXT)
OBJS = $(OBJ_NPP) $(OBJS_WIN) $(OBJS_UCHARDET) $(OBJS_TIXML) $(OBJS_SCINT) $(OBJS_MISC) $(OBJ_GCCINCLUDE)
# Main resource file
@ -205,7 +217,7 @@ SRC_RES = ./resources.rc
OBJ_RES = $(patsubst %.rc,%.res,$(SRC_RES))
# XML config files
SRC_XMLCFG = $(addprefix $(NPP_DIR)/,config.model.xml langs.model.xml stylers.model.xml shortcuts.xml functionList.xml contextMenu.xml)
SRC_XMLCFG = $(addprefix $(NPP_DIR)/,langs.model.xml stylers.model.xml shortcuts.xml functionList.xml contextMenu.xml)
DST_XMLCFG = $(subst $(NPP_DIR),../bin,$(SRC_XMLCFG))
DEPS = $(patsubst %.o,%.d,$(OBJS))
@ -235,10 +247,10 @@ UNICODE = -DUNICODE -D_UNICODE
CXX = $(CROSS_COMPILE)g++
#CXXFLAGS = -O2 $(INCLUDESPECIAL)
CXXFLAGS = $(INCLUDESPECIAL) -DTIXML_USE_STL -DTIXMLA_USE_STL $(UNICODE) -std=c++14 -fpermissive
CXXFLAGS = $(INCLUDESPECIAL) -DTIXML_USE_STL -DTIXMLA_USE_STL $(UNICODE) -std=c++17 -fpermissive
INCLUDES = $(patsubst %,-I%,$(DIRS)) -I./include
LDFLAGS = -Wl,--subsystem,windows
LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi -ldbghelp
LDFLAGS = -Wl,--subsystem,windows -municode -mwindows
LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi -ldbghelp -lversion -lcrypt32 -lsensapi -lwintrust
RC = $(CROSS_COMPILE)windres
@ -254,7 +266,8 @@ all: NotepadPP xmlcfg
NotepadPP: $(EXEC)
$(EXEC): $(OBJS) $(OBJ_RES)
$(CXX) $(LDFLAGS) $^ $(LIBS) -o $@
$(CXX) $(LDFLAGS) $^ $(LIBS) -o $@_dynamic
$(CXX) $(LDFLAGS) $^ $(LIBS) -static -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -MMD -c $< -o $@

View File

@ -5,6 +5,7 @@
#include "../src/ScitillaComponent/columnEditor.rc"
#include "../src/ScitillaComponent/FindReplaceDlg.rc"
#include "../src/ScitillaComponent/UserDefineDialog.rc"
#include "../src/MISC/md5/md5Dlgs.rc"
#include "../src/MISC/RegExt/regExtDlg.rc"
#include "../src/WinControls/AnsiCharPanel/ansiCharPanel.rc"
#include "../src/WinControls/ClipboardHistory/clipboardHistoryPanel.rc"
@ -12,10 +13,12 @@
#include "../src/WinControls/ColourPicker/WordStyleDlg.rc"
#include "../src/WinControls/DockingWnd/DockingGUIWidget.rc"
#include "../src/WinControls/DocumentMap/documentMap.rc"
#include "../src/WinControls/DocumentMap/documentSnapshot.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"
#include "../src/WinControls/PluginsAdmin/pluginsAdmin.rc"
#include "../src/WinControls/Preference/preference.rc"
#include "../src/WinControls/ProjectPanel/ProjectPanel.rc"
#include "../src/WinControls/shortcut/RunMacroDlg.rc"

View File

@ -31,6 +31,7 @@
#include <uxtheme.h>
#include <cassert>
#include <codecvt>
#include <locale>
#include "StaticDialog.h"
@ -1017,7 +1018,7 @@ HWND CreateToolTip(int toolID, HWND hDlg, HINSTANCE hInst, const PTSTR pszText)
}
// Create the tooltip. g_hInst is the global instance handle.
HWND hwndTip = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
HWND hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,

View File

@ -112,8 +112,12 @@ static WORD getBinaryArchitectureType(const TCHAR *filePath)
return machine_type;
}
#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
#ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
#endif
#ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
#endif
int PluginsManager::loadPlugin(const TCHAR *pluginFilePath)
{

View File

@ -235,7 +235,7 @@ BEGIN
MENUITEM "Explorer", IDM_FILE_OPEN_FOLDER
MENUITEM "cmd", IDM_FILE_OPEN_CMD
END
MENUITEM "Open in Default Viewer" IDM_FILE_OPEN_DEFAULT_VIEWER
MENUITEM "Open in Default Viewer", IDM_FILE_OPEN_DEFAULT_VIEWER
MENUITEM "Open Folder as Workspace...", IDM_FILE_OPENFOLDERASWORSPACE
MENUITEM "Re&load from Disk", IDM_FILE_RELOAD
MENUITEM "&Save", IDM_FILE_SAVE

View File

@ -462,7 +462,7 @@ void Notepad_plus::command(int id)
if (nppGui._searchEngineChoice == nppGui.se_custom)
{
url = nppGui._searchEngineCustom;
remove_if(url.begin(), url.end(), isspace);
remove_if(url.begin(), url.end(), _istspace);
auto httpPos = url.find(TEXT("http://"));
auto httpsPos = url.find(TEXT("https://"));

View File

@ -682,7 +682,7 @@ protected:
const char * getCompleteKeywordList(std::basic_string<char> & kwl, LangType langType, int keywordIndex);
void setKeywords(LangType langType, const char *keywords, int index);
void setLexer(int lexerID, LangType langType, int whichList);
inline void makeStyle(LangType langType, const TCHAR **keywordArray = NULL);
void makeStyle(LangType langType, const TCHAR **keywordArray = NULL);
void setStyle(Style styleToSet); //NOT by reference (style edited)
void setSpecialStyle(const Style & styleToSet); //by reference
void setSpecialIndicator(const Style & styleToSet) {

View File

@ -1555,8 +1555,10 @@ bool StringDlg::isAllowed(const generic_string & txt)
{
for (auto ch : txt)
{
#ifndef __MINGW32__
if (std::find(_restrictedChars.cbegin(), _restrictedChars.cend(), ch) != _restrictedChars.cend())
return false;
#endif
}
return true;
}

View File

@ -295,7 +295,7 @@ bool FunctionListPanel::serialize(const generic_string & outputFilename)
}
}
std::ofstream file(fname2write);
std::ofstream file(wmc.wchar2char(fname2write.c_str(), CP_ACP));
file << j;
return true;

View File

@ -1313,7 +1313,7 @@ int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
{
longest=size->cx;
}
p = generic_strtok('\0', TEXT("\n"));
p = generic_strtok(TEXT('\0'), TEXT("\n"));
}
return longest;
}

View File

@ -1486,7 +1486,7 @@ INT_PTR CALLBACK RecentFilesHistoryDlg::run_dlgProc(UINT message, WPARAM wParam,
::SetDlgItemInt(_hSelf, IDC_CUSTOMIZELENGTHVAL_STATIC, length, FALSE);
_customLenVal.init(_hInst, _hSelf);
_customLenVal.create(::GetDlgItem(_hSelf, IDC_CUSTOMIZELENGTHVAL_STATIC), NULL);
_customLenVal.create(::GetDlgItem(_hSelf, IDC_CUSTOMIZELENGTHVAL_STATIC), nullptr);
//
// To avoid the white control background to be displayed in dialog

View File

@ -27,6 +27,7 @@
// See ReadMe.txt for overview information.
#include <shlwapi.h>
#include <cassert>
#include "ReadDirectoryChanges.h"
#include "ReadDirectoryChangesPrivate.h"
@ -61,7 +62,7 @@ CReadChangesRequest::CReadChangesRequest(CReadChangesServer* pServer, LPCTSTR sz
CReadChangesRequest::~CReadChangesRequest()
{
// RequestTermination() must have been called successfully.
_ASSERTE(m_hDirectory == NULL);
assert(m_hDirectory == NULL);
}
@ -124,7 +125,7 @@ VOID CALLBACK CReadChangesRequest::NotificationCompletion(
// Can't use sizeof(FILE_NOTIFY_INFORMATION) because
// the structure is padded to 16 bytes.
_ASSERTE((dwNumberOfBytesTransfered == 0) ||
assert((dwNumberOfBytesTransfered == 0) ||
(dwNumberOfBytesTransfered >= offsetof(FILE_NOTIFY_INFORMATION, FileName) + sizeof(WCHAR)));
pBlock->BackupBuffer(dwNumberOfBytesTransfered);

View File

@ -117,14 +117,14 @@ public:
}
// Called by QueueUserAPC to start orderly shutdown.
static void CALLBACK TerminateProc(__in ULONG_PTR arg)
static void CALLBACK TerminateProc( ULONG_PTR arg)
{
CReadChangesServer* pServer = reinterpret_cast<CReadChangesServer*>(arg);
pServer->RequestTermination();
}
// Called by QueueUserAPC to add another directory.
static void CALLBACK AddDirectoryProc(__in ULONG_PTR arg)
static void CALLBACK AddDirectoryProc( ULONG_PTR arg)
{
CReadChangesRequest* pRequest = reinterpret_cast<CReadChangesRequest*>(arg);
pRequest->m_pServer->AddDirectory(pRequest);

View File

@ -1,31 +1,44 @@
version: 7.6.{build}
version: 7.8.{build}
image: Visual Studio 2017
platform:
- x64
- Win32
environment:
matrix:
- platform: Win32
archi: x86
platform_input: Win32
- platform: x64
archi: amd64
platform_input: x64
- platform: mingw-w64_810_X64
platform_input: mingw
configuration:
- Unicode Release
- Unicode Debug
install:
- if "%platform%"=="x64" set archi=amd64
- if "%platform%"=="x64" set platform_input=x64
- if "%platform%"=="Win32" set archi=x86
- if "%platform%"=="Win32" set platform_input=Win32
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%Platform%"=="mingw-w64_810_X64" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=%
- if "%archi%" NEQ "" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
build_script:
- ps: |
Write-Output "Configuration: $env:CONFIGURATION"
Write-Output "Platform: $env:PLATFORM"
- cd "%APPVEYOR_BUILD_FOLDER%"\scintilla\win32
- if "%configuration%"=="Unicode Debug" set scintilla_debug=DEBUG=1
- if "%configuration%"=="Unicode Release" set scintilla_debug=
- nmake SUPPORT_XP=1 %scintilla_debug% -f scintilla.mak
- if "%archi%" NEQ "" nmake SUPPORT_XP=1 %scintilla_debug% -f scintilla.mak
- if "%Platform%"=="mingw-w64_810_X64" mingw32-make -j%NUMBER_OF_PROCESSORS%
- cd "%APPVEYOR_BUILD_FOLDER%"\PowerEditor\visual.net\
- msbuild notepadPlus.vcxproj /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- if "%archi%" NEQ "" msbuild notepadPlus.vcxproj /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- if "%Platform%"=="mingw-w64_810_X64" cd c:\projects\notepad-plus-plus\PowerEditor\gcc\ & mingw32-make -j%NUMBER_OF_PROCESSORS%
after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"
@ -48,4 +61,9 @@ after_build:
Push-AppveyorArtifact "PowerEditor\visual.net\Unicode Debug\Notepad++.exe" -FileName "$nppFileName"
}
if ($env:PLATFORM_INPUT -eq "mingw") {
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP.exe" -FileName "$nppFileName"
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP.exe_dynamic" -FileName "$nppFileName_dynamic"
}
Push-AppveyorArtifact "scintilla\bin\SciLexer.dll" -FileName "SciLexer.$env:PLATFORM.$env:CONFIGURATION.dll"

View File

@ -110,7 +110,7 @@ static void ColouriseSearchResultDoc(Sci_PositionU startPos, Sci_Position length
return;
SearchResultMarkings* pMarkings = NULL;
sscanf(addrMarkingsStruct, "%p", &pMarkings);
sscanf(addrMarkingsStruct, "%p", (void**)&pMarkings);
for (size_t i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];

View File

@ -694,7 +694,7 @@ static inline void SubGroup(const char * s, vvstring & vec, bool group=false)
delete [] temp;
}
static inline void GenerateVector(vvstring & vec, const char * s, char * prefix, size_t minLength)
static inline void GenerateVector(vvstring & vec, const char * s, const char * prefix, size_t minLength)
{
size_t length = strlen(s);
char * temp = new char[length];
@ -757,7 +757,7 @@ static inline void StringToVector(char * original, vector<string> & tokenVector,
string temp = "";
char * pch = original;
while (*pch != NULL)
while (*pch != '\0')
{
if (*pch != ' ')
temp += *pch; //