Make Plugins Admin work with MinGW in debug mode binary
Convert path to nppPluginList.json with ::wstring2string(). Unlike MSVC [1], MinGW GCC doesn't provide file stream constructors for wchar_t* paths [2]. --- [1] https://stackoverflow.com/a/822032 [2] https://sourceforge.net/p/mingw-w64/mailman/message/34249829 Fixes #11687, close #11701
This commit is contained in:
parent
e8817eacd0
commit
d6595ad836
|
@ -60,7 +60,7 @@ else
|
|||
BUILD_TYPE := debug
|
||||
BUILD_SUFFIX := -debug
|
||||
CXXFLAGS += -Og -g -Wall -Wpedantic -Wconversion-null
|
||||
#CPP_DEFINE += DEBUG
|
||||
CPP_DEFINE += DEBUG
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
@ -706,7 +706,11 @@ bool PluginsAdminDlg::initFromJson()
|
|||
#ifdef DEBUG // if not debug, then it's release
|
||||
|
||||
// load from nppPluginList.json instead of nppPluginList.dll
|
||||
#ifdef __MINGW32__
|
||||
ifstream nppPluginListJson(wstring2string(_pluginListFullPath, CP_UTF8));
|
||||
#else // MSVC supports UTF-16 path names in file stream constructors
|
||||
ifstream nppPluginListJson(_pluginListFullPath);
|
||||
#endif
|
||||
nppPluginListJson >> j;
|
||||
|
||||
#else //RELEASE
|
||||
|
|
|
@ -27,11 +27,6 @@ configuration:
|
|||
- Release
|
||||
- Debug
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- compiler: GCC
|
||||
configuration: Debug
|
||||
|
||||
before_build:
|
||||
- ps: |
|
||||
Write-Output "Compiler : $env:compiler"
|
||||
|
@ -98,6 +93,7 @@ for:
|
|||
only:
|
||||
- compiler: GCC
|
||||
install:
|
||||
- if "%configuration%" EQU "Debug" set DEBUG=1
|
||||
- if "%platform%" EQU "i686" set PATH=C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
- if "%platform%" EQU "x86_64" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
build_script:
|
||||
|
|
Loading…
Reference in New Issue