mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 07:15:21 +02:00
Fix building MinGW release twice in appveyor builds
Improve also MinGW build (toolbar appears) by adding changes from patch https://github.com/notepad-plus-plus/notepad-plus-plus/files/6947163/notepad-gcc-build.patch.txt Fix #10328, fix #10185, close #10469
This commit is contained in:
parent
ed5c2631c1
commit
f428fbab13
7
BUILD.md
7
BUILD.md
@ -47,6 +47,8 @@ If you have installed [MinGW-w64](https://mingw-w64.org/doku.php/start), then yo
|
|||||||
|
|
||||||
* Compile libscilexer.a
|
* Compile libscilexer.a
|
||||||
|
|
||||||
|
This step is not necessary anymore as it will be build in the process of compiling the Notepad++ binary. It is here just for completeness sake as this option is still available.
|
||||||
|
|
||||||
1. Launch cmd.
|
1. Launch cmd.
|
||||||
2. Change dir into `notepad-plus-plus\scintilla\win32`.
|
2. Change dir into `notepad-plus-plus\scintilla\win32`.
|
||||||
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
|
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
|
||||||
@ -57,8 +59,11 @@ If you have installed [MinGW-w64](https://mingw-w64.org/doku.php/start), then yo
|
|||||||
1. Launch cmd.
|
1. Launch cmd.
|
||||||
2. Change dir into `notepad-plus-plus\PowerEditor\gcc`.
|
2. Change dir into `notepad-plus-plus\PowerEditor\gcc`.
|
||||||
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
|
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
|
||||||
4. `NotepadPP.exe` is generated in `notepad-plus-plus\PowerEditor\bin\`.
|
4. `NotepadPP-release.exe` is generated in `notepad-plus-plus\PowerEditor\bin\`.
|
||||||
|
|
||||||
|
To have a debug build just add `DEBUG=1` to the `mingw32-make.exe` invocation. The binary will be called `NotepadPP-debug.exe` in this case.
|
||||||
|
|
||||||
|
To see commands being executed add `VERBOSE=1` to the same command.
|
||||||
|
|
||||||
You can download MinGW-w64 from https://sourceforge.net/projects/mingw-w64/files/. On Notepad++ Github page (this project), the build system use [MinGW 8.1](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z).
|
You can download MinGW-w64 from https://sourceforge.net/projects/mingw-w64/files/. On Notepad++ Github page (this project), the build system use [MinGW 8.1](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z).
|
||||||
|
|
||||||
|
3
PowerEditor/gcc/gcc-manifest.rc
Normal file
3
PowerEditor/gcc/gcc-manifest.rc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "../src/notepad++.exe.manifest"
|
@ -4,24 +4,24 @@
|
|||||||
|
|
||||||
//GetLongPathName = 410
|
//GetLongPathName = 410
|
||||||
//Multimonitor: 410
|
//Multimonitor: 410
|
||||||
#define _WIN32_WINDOWS 0x0410
|
//#define _WIN32_WINDOWS 0x0410
|
||||||
//Toolbar imagelist = 300
|
//Toolbar imagelist = 300
|
||||||
//TCS_BOTTOM = 300
|
//TCS_BOTTOM = 300
|
||||||
//LVS_EX_BORDERSELECT = 500
|
//LVS_EX_BORDERSELECT = 500
|
||||||
//TBSTYLE_EX_HIDECLIPPEDBUTTONS = 501
|
//TBSTYLE_EX_HIDECLIPPEDBUTTONS = 501
|
||||||
//#define _WIN32_IE 0x501
|
//#define _WIN32_IE 0x501
|
||||||
//Theme (uxtheme)
|
//Theme (uxtheme)
|
||||||
#define _WIN32_WINNT 0x0600
|
//#define _WIN32_WINNT 0x0600
|
||||||
|
|
||||||
//#include <windows.h>
|
//#include <windows.h>
|
||||||
|
|
||||||
#if (_WIN32_IE >= 0x0400)
|
//#if (_WIN32_IE >= 0x0400)
|
||||||
#define TCN_GETOBJECT (TCN_FIRST - 3)
|
//#define TCN_GETOBJECT (TCN_FIRST - 3)
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
#if (_WIN32_IE >= 0x0500)
|
//#if (_WIN32_IE >= 0x0500)
|
||||||
#define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
|
//#define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
|
||||||
#endif // _WIN32_IE >= 0x0500
|
//#endif // _WIN32_IE >= 0x0500
|
||||||
/*
|
/*
|
||||||
#ifndef max
|
#ifndef max
|
||||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||||
@ -48,5 +48,5 @@ static inline int min(unsigned int a, unsigned int b) {
|
|||||||
//double _wtof(const wchar_t * string);
|
//double _wtof(const wchar_t * string);
|
||||||
|
|
||||||
// from MinGW include/driverspecs.h
|
// from MinGW include/driverspecs.h
|
||||||
#define __inout
|
//#define __inout
|
||||||
#define __inout_opt
|
//#define __inout_opt
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# This file is part of Notepad++ project
|
# This file is part of Notepad++ project
|
||||||
# Copyright (C)2008 Harry Bruin <harrybharry@users.sourceforge.net>
|
# Copyright (C)2021 Ivan U7n <jprofic@yandex.ru>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -14,287 +14,131 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Directories:
|
# Definitions:
|
||||||
NPP_DIR = ../src
|
SOURCE_DIR := ../src
|
||||||
SCI_DIR = ../../scintilla/include
|
SOURCE_EXCLUDE := $(SOURCE_DIR)/tools/%
|
||||||
GCC_DIR = .
|
TARGET_DIR := ../bin
|
||||||
GCCINCLUDE_DIR = $(GCC_DIR)/include
|
TARGET_BASE := NotepadPP
|
||||||
|
TARGET_SUFFIX := .exe
|
||||||
|
CONFIG_FILES := langs.model.xml stylers.model.xml shortcuts.xml contextMenu.xml
|
||||||
|
GCC_DIR := .
|
||||||
|
SCINTILLA_DIR := ../../scintilla
|
||||||
|
|
||||||
#darkmode:
|
CXX := $(CROSS_COMPILE)g++
|
||||||
DARKMODE_DIR = $(NPP_DIR)/darkmode
|
CXXFLAGS := -include $(GCC_DIR)/include/various.h -std=c++17 -fpermissive -Wno-conversion-null
|
||||||
|
RC := $(CROSS_COMPILE)windres
|
||||||
|
RCFLAGS :=
|
||||||
|
DEFINES := UNICODE _UNICODE _WIN32_WINNT=0x0600 TIXML_USE_STL TIXMLA_USE_STL
|
||||||
|
INCLUDES := $(SCINTILLA_DIR)/include
|
||||||
|
LD := $(CROSS_COMPILE)g++
|
||||||
|
LDFLAGS := -municode -mwindows
|
||||||
|
LIBRARIES := comctl32 crypt32 dbghelp ole32 sensapi shlwapi uuid uxtheme version wininet wintrust
|
||||||
|
SCINTILLA_TARGET := $(SCINTILLA_DIR)/bin/libscilexer.a
|
||||||
|
SCINTILLA_LIBRARIES := imm32 msimg32 oleaut32
|
||||||
|
SUBMAKEFLAGS := -O --no-print-directory
|
||||||
|
|
||||||
#json:
|
ifeq "$(strip $(DEBUG))" ""
|
||||||
JSON_DIR = $(NPP_DIR)/json
|
CXXFLAGS += -O2 -Os
|
||||||
|
LDFLAGS += -s
|
||||||
#MISC:
|
DEFINES += NDEBUG
|
||||||
MISC_DIR = $(NPP_DIR)/MISC
|
BUILD_TYPE := $(CROSS_COMPILE)release
|
||||||
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
|
|
||||||
|
|
||||||
#ScintillaComponent:
|
|
||||||
SCINT_DIR = $(NPP_DIR)/ScintillaComponent
|
|
||||||
|
|
||||||
#TinyXml
|
|
||||||
TIXML_DIR = $(NPP_DIR)/TinyXml
|
|
||||||
TIXMLA_DIR = $(TIXML_DIR)/tinyXmlA
|
|
||||||
|
|
||||||
#uchardet
|
|
||||||
UCHARDET_DIR = $(NPP_DIR)/uchardet
|
|
||||||
|
|
||||||
#WinControls
|
|
||||||
WIN_DIR = $(NPP_DIR)/WinControls
|
|
||||||
ABOUT_DIR = $(WIN_DIR)/AboutDlg
|
|
||||||
ANSICHAR_DIR = $(WIN_DIR)/AnsiCharPanel
|
|
||||||
CLIPBOARD_DIR = $(WIN_DIR)/ClipboardHistory
|
|
||||||
CONTEXT_DIR = $(WIN_DIR)/ContextMenu
|
|
||||||
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
|
|
||||||
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
|
|
||||||
SHORTCUT_DIR = $(WIN_DIR)/shortcut
|
|
||||||
SPLITTER_DIR = $(WIN_DIR)/SplitterContainer
|
|
||||||
STATICDLG_DIR = $(WIN_DIR)/StaticDialog
|
|
||||||
RUNDLG_DIR = $(STATICDLG_DIR)/RunDlg
|
|
||||||
STATUSBAR_DIR = $(WIN_DIR)/StatusBar
|
|
||||||
TABBAR_DIR = $(WIN_DIR)/TabBar
|
|
||||||
TASKLIST_DIR = $(WIN_DIR)/TaskList
|
|
||||||
TOOLBAR_DIR = $(WIN_DIR)/ToolBar
|
|
||||||
TOOLTIP_DIR = $(WIN_DIR)/ToolTip
|
|
||||||
TRAYICON_DIR = $(WIN_DIR)/TrayIcon
|
|
||||||
TREEVIEW_DIR = $(WIN_DIR)/TreeView
|
|
||||||
VERTFILE_DIR = $(WIN_DIR)/VerticalFileSwitcher
|
|
||||||
WINDOWSDLG_DIR = $(WIN_DIR)/WindowsDlg
|
|
||||||
|
|
||||||
|
|
||||||
# Sources:
|
|
||||||
SRC_NPP = $(wildcard $(NPP_DIR)/*.cpp)
|
|
||||||
SRC_GCCINCLUDE = $(wildcard $(GCCINCLUDE_DIR)/*.cpp)
|
|
||||||
|
|
||||||
#DARKMODE
|
|
||||||
SRC_DARKMODE = $(wildcard $(DARKMODE_DIR)/*.cpp)
|
|
||||||
|
|
||||||
#MISC
|
|
||||||
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)
|
|
||||||
|
|
||||||
#ScintillaComponent
|
|
||||||
SRC_SCINT = $(wildcard $(SCINT_DIR)/*.cpp)
|
|
||||||
|
|
||||||
#TinyXml
|
|
||||||
SRC_TIXML = $(wildcard $(TIXML_DIR)/*.cpp)
|
|
||||||
SRC_TIXMLA = $(wildcard $(TIXMLA_DIR)/*.cpp)
|
|
||||||
|
|
||||||
#uchardet
|
|
||||||
SRC_UCHARDET = $(wildcard $(UCHARDET_DIR)/*.cpp)
|
|
||||||
|
|
||||||
#WinControls
|
|
||||||
SRC_WIN = $(wildcard $(WIN_DIR)/*.cpp)
|
|
||||||
SRC_ABOUT = $(wildcard $(ABOUT_DIR)/*.cpp)
|
|
||||||
SRC_ANSICHAR = $(wildcard $(ANSICHAR_DIR)/*.cpp)
|
|
||||||
SRC_CLIPBOARD = $(wildcard $(CLIPBOARD_DIR)/*.cpp)
|
|
||||||
SRC_CONTEXT = $(wildcard $(CONTEXT_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)
|
|
||||||
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)
|
|
||||||
SRC_SHORTCUT = $(wildcard $(SHORTCUT_DIR)/*.cpp)
|
|
||||||
SRC_SPLITTER = $(wildcard $(SPLITTER_DIR)/*.cpp)
|
|
||||||
SRC_STATICDLG = $(wildcard $(STATICDLG_DIR)/*.cpp)
|
|
||||||
SRC_RUNDLG = $(wildcard $(RUNDLG_DIR)/*.cpp)
|
|
||||||
SRC_STATUSBAR = $(wildcard $(STATUSBAR_DIR)/*.cpp)
|
|
||||||
SRC_TABBAR = $(wildcard $(TABBAR_DIR)/*.cpp)
|
|
||||||
SRC_TASKLIST = $(wildcard $(TASKLIST_DIR)/*.cpp)
|
|
||||||
SRC_TOOLBAR = $(wildcard $(TOOLBAR_DIR)/*.cpp)
|
|
||||||
SRC_TOOLTIP = $(wildcard $(TOOLTIP_DIR)/*.cpp)
|
|
||||||
SRC_TRAYICON = $(wildcard $(TRAYICON_DIR)/*.cpp)
|
|
||||||
SRC_TREEVIEW = $(wildcard $(TREEVIEW_DIR)/*.cpp)
|
|
||||||
SRC_VERTFILE = $(wildcard $(VERTFILE_DIR)/*.cpp)
|
|
||||||
SRC_WINDOWSDLG = $(wildcard $(WINDOWSDLG_DIR)/*.cpp)
|
|
||||||
|
|
||||||
# Objects:
|
|
||||||
OBJ_NPP = $(patsubst %.cpp,%.o,$(SRC_NPP))
|
|
||||||
OBJ_GCCINCLUDE = $(patsubst %.cpp,%.o,$(SRC_GCCINCLUDE))
|
|
||||||
|
|
||||||
#DARKMODE
|
|
||||||
OBJ_DARKMODE = $(patsubst %.cpp,%.o,$(SRC_DARKMODE))
|
|
||||||
|
|
||||||
#MISC
|
|
||||||
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))
|
|
||||||
|
|
||||||
#ScintillaComponent
|
|
||||||
OBJ_SCINT = $(patsubst %.cpp,%.o,$(SRC_SCINT))
|
|
||||||
|
|
||||||
#TinyXml
|
|
||||||
OBJ_TIXML = $(patsubst %.cpp,%.o,$(SRC_TIXML))
|
|
||||||
OBJ_TIXMLA = $(patsubst %.cpp,%.o,$(SRC_TIXMLA))
|
|
||||||
|
|
||||||
#uchardet
|
|
||||||
OBJ_UCHARDET = $(patsubst %.cpp,%.o,$(SRC_UCHARDET))
|
|
||||||
|
|
||||||
#WinControls
|
|
||||||
OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN))
|
|
||||||
OBJ_ABOUT = $(patsubst %.cpp,%.o,$(SRC_ABOUT))
|
|
||||||
OBJ_ANSICHAR = $(patsubst %.cpp,%.o,$(SRC_ANSICHAR))
|
|
||||||
OBJ_CLIPBOARD = $(patsubst %.cpp,%.o,$(SRC_CLIPBOARD))
|
|
||||||
OBJ_CONTEXT = $(patsubst %.cpp,%.o,$(SRC_CONTEXT))
|
|
||||||
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))
|
|
||||||
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))
|
|
||||||
OBJ_SHORTCUT = $(patsubst %.cpp,%.o,$(SRC_SHORTCUT))
|
|
||||||
OBJ_SPLITTER = $(patsubst %.cpp,%.o,$(SRC_SPLITTER))
|
|
||||||
OBJ_STATICDLG = $(patsubst %.cpp,%.o,$(SRC_STATICDLG))
|
|
||||||
OBJ_RUNDLG = $(patsubst %.cpp,%.o,$(SRC_RUNDLG))
|
|
||||||
OBJ_STATUSBAR = $(patsubst %.cpp,%.o,$(SRC_STATUSBAR))
|
|
||||||
OBJ_TABBAR = $(patsubst %.cpp,%.o,$(SRC_TABBAR))
|
|
||||||
OBJ_TASKLIST = $(patsubst %.cpp,%.o,$(SRC_TASKLIST))
|
|
||||||
OBJ_TOOLBAR = $(patsubst %.cpp,%.o,$(SRC_TOOLBAR))
|
|
||||||
OBJ_TOOLTIP = $(patsubst %.cpp,%.o,$(SRC_TOOLTIP))
|
|
||||||
OBJ_TRAYICON = $(patsubst %.cpp,%.o,$(SRC_TRAYICON))
|
|
||||||
OBJ_TREEVIEW = $(patsubst %.cpp,%.o,$(SRC_TREEVIEW))
|
|
||||||
OBJ_VERTFILE = $(patsubst %.cpp,%.o,$(SRC_VERTFILE))
|
|
||||||
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) $(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) $(TREEVIEW_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) $(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_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_TREEVIEW) $(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_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_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_TREEVIEW) $(OBJ_VERTFILE) $(OBJ_WINDOWSDLG)
|
|
||||||
OBJS_UCHARDET = $(OBJ_UCHARDET)
|
|
||||||
OBJS_TIXML = $(OBJ_TIXML) $(OBJ_TIXMLA)
|
|
||||||
OBJS_SCINT = $(OBJ_SCINT)
|
|
||||||
OBJS_DARKMODE = $(OBJ_DARKMODE)
|
|
||||||
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) $(OBJS_DARKMODE) $(OBJ_GCCINCLUDE)
|
|
||||||
|
|
||||||
# Main resource file
|
|
||||||
SRC_RES = ./resources.rc
|
|
||||||
OBJ_RES = $(patsubst %.rc,%.res,$(SRC_RES))
|
|
||||||
|
|
||||||
# XML config files
|
|
||||||
SRC_XMLCFG = $(addprefix $(NPP_DIR)/,langs.model.xml stylers.model.xml shortcuts.xml contextMenu.xml)
|
|
||||||
DST_XMLCFG = $(subst $(NPP_DIR),../bin,$(SRC_XMLCFG))
|
|
||||||
|
|
||||||
DEPS = $(patsubst %.o,%.d,$(OBJS))
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
ifdef ComSpec
|
|
||||||
SHELL = $(ComSpec)
|
|
||||||
else
|
else
|
||||||
SHELL = cmd.exe
|
CXXFLAGS += -g -Wall -Wpedantic -Wconversion-null
|
||||||
|
#DEFINES += DEBUG
|
||||||
|
BUILD_TYPE := $(CROSS_COMPILE)debug
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CROSS_COMPILE =
|
BUILD_DIR := $(GCC_DIR)/$(BUILD_TYPE)
|
||||||
DIRSEP = \\
|
TARGET_BINARY := $(TARGET_DIR)/$(TARGET_BASE)-$(BUILD_TYPE)$(TARGET_SUFFIX)
|
||||||
RM = del
|
|
||||||
CP = copy /Y
|
# Preparations:
|
||||||
else
|
ifeq "$(strip $(VERBOSE))" ""
|
||||||
CROSS_COMPILE ?= i686-w64-mingw32-
|
AT := @
|
||||||
DIRSEP = /
|
|
||||||
RM = rm -f
|
|
||||||
CP = cp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Parameters
|
ifeq "$(strip $(windir))" ""
|
||||||
INCLUDESPECIAL = -include./include/various.h
|
# not a Windows system
|
||||||
UNICODE = -DUNICODE -D_UNICODE
|
MKDIR := mkdir -p
|
||||||
|
RMDIR := rm -rf
|
||||||
|
CP := cp
|
||||||
|
RM := rm -f
|
||||||
|
normalize-path = $1
|
||||||
|
else ifneq "$(wildcard $(dir $(SHELL))ls.exe)" ""
|
||||||
|
# a Windows system with UNIX-like shell
|
||||||
|
MKDIR := $(dir $(SHELL))mkdir.exe -p
|
||||||
|
RMDIR := $(dir $(SHELL))rm.exe -rf
|
||||||
|
CP := $(dir $(SHELL))cp.exe
|
||||||
|
RM := $(dir $(SHELL))rm.exe -f
|
||||||
|
normalize-path = $1
|
||||||
|
else
|
||||||
|
# a standard Windows system
|
||||||
|
MKDIR := mkdir
|
||||||
|
RMDIR := rmdir /q /s
|
||||||
|
CP := copy /y
|
||||||
|
RM := del /q
|
||||||
|
normalize-path = $(subst /,\,$1)
|
||||||
|
endif
|
||||||
|
|
||||||
CXX = $(CROSS_COMPILE)g++
|
list-subtree = $(foreach entry,$(wildcard $1/*),$(entry) $(call list-subtree,$(entry)))
|
||||||
#CXXFLAGS = -O2 $(INCLUDESPECIAL)
|
GCC_DIR_TREE := $(patsubst $(GCC_DIR)/%,%,$(call list-subtree,$(GCC_DIR)))
|
||||||
CXXFLAGS = $(INCLUDESPECIAL) -D_WIN32_WINNT=0x0600 -DTIXML_USE_STL -DTIXMLA_USE_STL $(UNICODE) -std=c++17 -fpermissive -Wno-conversion-null
|
SOURCE_DIR_TREE := $(patsubst $(SOURCE_DIR)/%,%,$(filter-out $(SOURCE_EXCLUDE),$(call list-subtree,$(SOURCE_DIR))))
|
||||||
INCLUDES = $(patsubst %,-I%,$(DIRS)) -I./include
|
|
||||||
LDFLAGS = -Wl,--subsystem,windows -municode -mwindows
|
|
||||||
LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi -ldbghelp -lversion -lcrypt32 -lsensapi -lwininet -lwintrust -luuid -luxtheme
|
|
||||||
LIBSCILEX = -L$(SCI_DIR)/../bin -lscilexer -loleaut32 -limm32 -lmsimg32
|
|
||||||
|
|
||||||
RC = $(CROSS_COMPILE)windres
|
INCLUDES += $(addprefix $(SOURCE_DIR)/,$(sort $(dir $(filter %.h %.hpp,$(SOURCE_DIR_TREE)))))
|
||||||
|
|
||||||
OUT_NPP = NotepadPP.exe
|
vpath %.cpp $(GCC_DIR) $(SOURCE_DIR)
|
||||||
|
CXX_TARGETS := $(patsubst %.cpp,$(BUILD_DIR)/%.o,$(sort $(filter %.cpp,$(GCC_DIR_TREE)) $(filter %.cpp,$(SOURCE_DIR_TREE))))
|
||||||
|
|
||||||
EXEC = ../bin/$(OUT_NPP)
|
vpath %.rc $(GCC_DIR) $(SOURCE_DIR)
|
||||||
|
RC_TARGETS := $(patsubst %.rc,$(BUILD_DIR)/%.res,$(sort $(filter %.rc,$(GCC_DIR_TREE)) $(filter %.rc,$(SOURCE_DIR_TREE))))
|
||||||
|
|
||||||
all: NotepadPP xmlcfg
|
CONFIG_TARGETS := $(addprefix $(TARGET_DIR)/,$(CONFIG_FILES))
|
||||||
|
|
||||||
-include $(DEPS)
|
# Actions:
|
||||||
|
.PHONY: .force all binary clean
|
||||||
|
.force:
|
||||||
|
|
||||||
# Main Notepad++ rule
|
GOALS := $(addprefix $(MAKELEVEL)-,$(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
|
||||||
NotepadPP: $(EXEC)
|
|
||||||
|
|
||||||
$(EXEC): $(OBJS) $(OBJ_RES)
|
ifneq "$(filter 0-all,$(GOALS))" ""
|
||||||
$(CXX) $(LDFLAGS) $^ $(LIBSCILEX) $(LIBS) -o $@_dynamic
|
.NOTPARALLEL:
|
||||||
$(CXX) $(LDFLAGS) $^ $(LIBSCILEX) $(LIBS) -static -o $@
|
all: $(SCINTILLA_TARGET)
|
||||||
|
$(AT)$(MAKE) $(SUBMAKEFLAGS) binary
|
||||||
|
else
|
||||||
|
all: binary
|
||||||
|
endif
|
||||||
|
|
||||||
%.o: %.cpp
|
$(SCINTILLA_TARGET): $(if $(filter 1-binary,$(GOALS)),,.force)
|
||||||
$(CXX) $(CXXFLAGS) $(INCLUDES) -MMD -c $< -o $@
|
$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(SCINTILLA_DIR)/win32 $(SCINTILLA_TARGET:$(SCINTILLA_DIR)/%=../%)
|
||||||
|
|
||||||
%.res: %.rc
|
binary: $(TARGET_BINARY) $(CONFIG_TARGETS)
|
||||||
$(RC) $(INCLUDES) $(UNICODE) --input=$< --output=$@ --input-format=rc --output-format=coff
|
|
||||||
|
|
||||||
xmlcfg: $(DST_XMLCFG)
|
$(BUILD_DIR):
|
||||||
|
@echo BUILD_DIR = $@
|
||||||
|
$(AT)$(MKDIR) $(call normalize-path,$(sort $(BUILD_DIR)/ $(dir $(CXX_TARGETS) $(dir $(RC_TARGETS)))))
|
||||||
|
|
||||||
$(DST_XMLCFG): $(dir $(firstword $(DST_XMLCFG)))%.xml: $(dir $(firstword $(SRC_XMLCFG)))%.xml
|
$(CXX_TARGETS): | $(BUILD_DIR)
|
||||||
$(CP) $(subst /,$(DIRSEP),$< $@)
|
$(CXX_TARGETS): $(BUILD_DIR)/%.o: %.cpp
|
||||||
|
@echo compiling $<
|
||||||
|
$(AT)$(CXX) $(CXXFLAGS) $(addprefix -D,$(DEFINES)) $(addprefix -I,$(INCLUDES)) -MMD -c -o $@ $<
|
||||||
|
|
||||||
|
$(RC_TARGETS): | $(BUILD_DIR)
|
||||||
|
$(RC_TARGETS): $(BUILD_DIR)/%.res: %.rc
|
||||||
|
@echo compiling $<
|
||||||
|
$(AT)$(RC) $(RCFLAGS) $(addprefix -D,$(DEFINES)) $(addprefix -I,$(INCLUDES)) -O coff -o $@ -i $<
|
||||||
|
|
||||||
|
$(TARGET_BINARY): $(CXX_TARGETS) $(RC_TARGETS) $(SCINTILLA_TARGET)
|
||||||
|
@echo linking $@
|
||||||
|
$(AT)$(LD) $(LDFLAGS) $^ $(addprefix -l,$(LIBRARIES) $(SCINTILLA_LIBRARIES)) -static -o $@
|
||||||
|
|
||||||
|
$(CONFIG_TARGETS): $(TARGET_DIR)/%.xml: $(SOURCE_DIR)/%.xml
|
||||||
|
@echo config $@
|
||||||
|
$(AT)$(CP) $(call normalize-path,$< $@)
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
clean:
|
clean:
|
||||||
-@$(RM) $(subst /,$(DIRSEP),$(OBJS) $(OBJ_RES))
|
-$(AT)$(RM) $(call normalize-path,$(TARGET_BINARY) $(CONFIG_TARGETS))
|
||||||
-@$(RM) $(subst /,$(DIRSEP),$(DST_XMLCFG))
|
-$(AT)$(RMDIR) $(call normalize-path,$(BUILD_DIR))
|
||||||
-@$(RM) $(subst /,$(DIRSEP),$(DEPS))
|
-$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(SCINTILLA_DIR)/win32 $@
|
||||||
|
# the `clean` target of Scintilla leaves some artifacts, thus clean up after it
|
||||||
|
-$(AT)$(RM) $(call normalize-path,$(SCINTILLA_DIR)/bin/*.a $(SCINTILLA_DIR)/bin/*.dll)
|
||||||
|
|
||||||
.PHONY: all clean NotepadPP
|
-include $(CXX_TARGETS:%.o=%.d)
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
#include "./include/various.h"
|
|
||||||
|
|
||||||
#define TEXT(quote) quote
|
|
||||||
|
|
||||||
#include "../src/ScintillaComponent/columnEditor.rc"
|
|
||||||
#include "../src/ScintillaComponent/FindReplaceDlg.rc"
|
|
||||||
#include "../src/ScintillaComponent/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"
|
|
||||||
#include "../src/WinControls/ColourPicker/ColourPopup.rc"
|
|
||||||
#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"
|
|
||||||
#include "../src/WinControls/shortcut/shortcut.rc"
|
|
||||||
#include "../src/WinControls/TaskList/TaskListDlg.rc"
|
|
||||||
#include "../src/WinControls/StaticDialog/RunDlg/RunDlg.rc"
|
|
||||||
#include "../src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.rc"
|
|
||||||
#include "../src/WinControls/WindowsDlg/WindowsDlg.rc"
|
|
||||||
#include "../src/Notepad_plus.rc"
|
|
20
appveyor.yml
20
appveyor.yml
@ -1,4 +1,4 @@
|
|||||||
version: 7.9.{build}
|
version: 8.1.{build}
|
||||||
image: Visual Studio 2019
|
image: Visual Studio 2019
|
||||||
|
|
||||||
|
|
||||||
@ -34,15 +34,11 @@ build_script:
|
|||||||
Write-Output "Configuration: $env:CONFIGURATION"
|
Write-Output "Configuration: $env:CONFIGURATION"
|
||||||
Write-Output "Platform: $env:PLATFORM"
|
Write-Output "Platform: $env:PLATFORM"
|
||||||
|
|
||||||
- cd "%APPVEYOR_BUILD_FOLDER%"\scintilla\win32
|
- if "%configuration%"=="Debug" set build_options=DEBUG=1
|
||||||
#- if "%configuration%"=="Debug" set scintilla_debug=DEBUG=1
|
- if "%configuration%"=="Release" set build_options=
|
||||||
#- if "%configuration%"=="Release" set scintilla_debug=
|
|
||||||
#- if "%archi%"=="x86" nmake %scintilla_debug% BOOSTPATH=C:\Libraries\boost_1_69_0\ BOOSTREGEXLIBPATH=C:\Libraries\boost_1_69_0\lib32-msvc-14.1\ -f scintilla.mak
|
|
||||||
#- if "%archi%"=="amd64" nmake %scintilla_debug% BOOSTPATH=C:\Libraries\boost_1_69_0\ BOOSTREGEXLIBPATH=C:\Libraries\boost_1_69_0\lib64-msvc-14.1\ -f scintilla.mak
|
|
||||||
- if "%Platform%"=="mingw-w64_810_X64" mingw32-make %scintilla_debug% -j%NUMBER_OF_PROCESSORS%
|
|
||||||
- cd "%APPVEYOR_BUILD_FOLDER%"\PowerEditor\visual.net\
|
- cd "%APPVEYOR_BUILD_FOLDER%"\PowerEditor\visual.net\
|
||||||
- if "%archi%" NEQ "" msbuild /m notepadPlus.sln /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
- if "%archi%" NEQ "" msbuild /m notepadPlus.sln /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 %scintilla_debug% -j%NUMBER_OF_PROCESSORS%
|
- if "%Platform%"=="mingw-w64_810_X64" cd c:\projects\notepad-plus-plus\PowerEditor\gcc\ & mingw32-make -j%NUMBER_OF_PROCESSORS% VERBOSE=1 %build_options%
|
||||||
|
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
@ -103,9 +99,11 @@ after_build:
|
|||||||
Push-AppveyorArtifact "PowerEditor\visual.net\arm64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
Push-AppveyorArtifact "PowerEditor\visual.net\arm64\Debug\Notepad++.exe" -FileName "$nppFileName"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($env:PLATFORM_INPUT -eq "mingw") {
|
if ($env:PLATFORM_INPUT -eq "mingw" -and $env:CONFIGURATION -eq "Release") {
|
||||||
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP.exe" -FileName "$nppFileName"
|
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP-release.exe" -FileName "$nppFileName"
|
||||||
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP.exe_dynamic" -FileName "$nppFileName_dynamic"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($env:PLATFORM_INPUT -eq "mingw" -and $env:CONFIGURATION -eq "Debug") {
|
||||||
|
Push-AppveyorArtifact "PowerEditor\bin\NotepadPP-debug.exe" -FileName "$nppFileName"
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user