parent
1d59e3ed0e
commit
3dfe526019
@ -45,6 +45,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
|
|||||||
L_EXTERNAL};
|
L_EXTERNAL};
|
||||||
|
|
||||||
enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8, WV_WIN81, WV_WIN10};
|
enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8, WV_WIN81, WV_WIN10};
|
||||||
|
enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64 };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ generic_string ThemeSwitcher::getThemeFromXmlFileName(const TCHAR *xmlFullPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
winVer getWindowsVersion()
|
winVer NppParameters::getWindowsVersion()
|
||||||
{
|
{
|
||||||
OSVERSIONINFOEX osvi;
|
OSVERSIONINFOEX osvi;
|
||||||
SYSTEM_INFO si;
|
SYSTEM_INFO si;
|
||||||
@ -766,6 +766,24 @@ winVer getWindowsVersion()
|
|||||||
else
|
else
|
||||||
GetSystemInfo(&si);
|
GetSystemInfo(&si);
|
||||||
|
|
||||||
|
switch (si.wProcessorArchitecture)
|
||||||
|
{
|
||||||
|
case PROCESSOR_ARCHITECTURE_IA64:
|
||||||
|
_platForm = PF_IA64;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROCESSOR_ARCHITECTURE_AMD64:
|
||||||
|
_platForm = PF_X64;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||||
|
_platForm = PF_X86;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
_platForm = PF_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
switch (osvi.dwPlatformId)
|
switch (osvi.dwPlatformId)
|
||||||
{
|
{
|
||||||
case VER_PLATFORM_WIN32_NT:
|
case VER_PLATFORM_WIN32_NT:
|
||||||
@ -5887,6 +5905,22 @@ generic_string NppParameters:: getWinVersionStr() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generic_string NppParameters::getWinVerBitStr() const
|
||||||
|
{
|
||||||
|
switch (_platForm)
|
||||||
|
{
|
||||||
|
case PF_X86:
|
||||||
|
return TEXT("32-bit");
|
||||||
|
|
||||||
|
case PF_X64:
|
||||||
|
case PF_IA64:
|
||||||
|
return TEXT("64-bit");
|
||||||
|
|
||||||
|
default:
|
||||||
|
return TEXT("Unknown-bit");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void NppParameters::writeStyles(LexerStylerArray & lexersStylers, StyleArray & globalStylers)
|
void NppParameters::writeStyles(LexerStylerArray & lexersStylers, StyleArray & globalStylers)
|
||||||
{
|
{
|
||||||
TiXmlNode *lexersRoot = (_pXmlUserStylerDoc->FirstChild(TEXT("NotepadPlus")))->FirstChildElement(TEXT("LexerStyles"));
|
TiXmlNode *lexersRoot = (_pXmlUserStylerDoc->FirstChild(TEXT("NotepadPlus")))->FirstChildElement(TEXT("LexerStyles"));
|
||||||
|
@ -1476,6 +1476,7 @@ public:
|
|||||||
bool reloadContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu);
|
bool reloadContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu);
|
||||||
winVer getWinVersion() const {return _winVersion;};
|
winVer getWinVersion() const {return _winVersion;};
|
||||||
generic_string getWinVersionStr() const;
|
generic_string getWinVersionStr() const;
|
||||||
|
generic_string getWinVerBitStr() const;
|
||||||
FindHistory & getFindHistory() {return _findHistory;};
|
FindHistory & getFindHistory() {return _findHistory;};
|
||||||
bool _isFindReplacing = false; // an on the fly variable for find/replace functions
|
bool _isFindReplacing = false; // an on the fly variable for find/replace functions
|
||||||
void safeWow64EnableWow64FsRedirection(BOOL Wow64FsEnableRedirection);
|
void safeWow64EnableWow64FsRedirection(BOOL Wow64FsEnableRedirection);
|
||||||
@ -1663,6 +1664,7 @@ private:
|
|||||||
bool _asNotepadStyle = false;
|
bool _asNotepadStyle = false;
|
||||||
|
|
||||||
winVer _winVersion;
|
winVer _winVersion;
|
||||||
|
Platform _platForm;
|
||||||
|
|
||||||
NativeLangSpeaker *_pNativeLangSpeaker = nullptr;
|
NativeLangSpeaker *_pNativeLangSpeaker = nullptr;
|
||||||
|
|
||||||
@ -1734,4 +1736,5 @@ private:
|
|||||||
void initScintillaKeys(); //these functions have to be called first before any modifications are loaded
|
void initScintillaKeys(); //these functions have to be called first before any modifications are loaded
|
||||||
int getCmdIdFromMenuEntryItemName(HMENU mainMenuHadle, generic_string menuEntryName, generic_string menuItemName); // return -1 if not found
|
int getCmdIdFromMenuEntryItemName(HMENU mainMenuHadle, generic_string menuEntryName, generic_string menuItemName); // return -1 if not found
|
||||||
int getPluginCmdIdFromMenuEntryItemName(HMENU pluginsMenu, generic_string pluginName, generic_string pluginCmdName); // return -1 if not found
|
int getPluginCmdIdFromMenuEntryItemName(HMENU pluginsMenu, generic_string pluginName, generic_string pluginCmdName); // return -1 if not found
|
||||||
|
winVer getWindowsVersion();
|
||||||
};
|
};
|
||||||
|
@ -161,6 +161,9 @@ INT_PTR CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /
|
|||||||
// OS version
|
// OS version
|
||||||
_debugInfoStr += TEXT("OS : ");
|
_debugInfoStr += TEXT("OS : ");
|
||||||
_debugInfoStr += (NppParameters::getInstance())->getWinVersionStr();
|
_debugInfoStr += (NppParameters::getInstance())->getWinVersionStr();
|
||||||
|
_debugInfoStr += TEXT(" (");
|
||||||
|
_debugInfoStr += (NppParameters::getInstance())->getWinVerBitStr();
|
||||||
|
_debugInfoStr += TEXT(")");
|
||||||
_debugInfoStr += TEXT("\r\n");
|
_debugInfoStr += TEXT("\r\n");
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
|
Loading…
Reference in New Issue
Block a user