[REALEASE_46] New release v4.6 - add the restriction to launch auto-updater under winnt/95/98/me.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@75 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-11-21 23:20:23 +00:00
parent d64eb26372
commit c5b2193400
3 changed files with 7 additions and 3 deletions

View File

@ -63,6 +63,8 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p
_isScintillaKeyModified(false), _isPluginCmdScModified(false), _isRTL(false), \ _isScintillaKeyModified(false), _isPluginCmdScModified(false), _isRTL(false), \
_linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false) _linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false)
{ {
_winVersion = getWindowsVersion();
TiXmlDocument *nativeLangDocRoot = (NppParameters::getInstance())->getNativeLang(); TiXmlDocument *nativeLangDocRoot = (NppParameters::getInstance())->getNativeLang();
if (nativeLangDocRoot) if (nativeLangDocRoot)
{ {
@ -158,8 +160,6 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi
{ {
Window::init(hInst, parent); Window::init(hInst, parent);
_winVersion = getWindowsVersion();
WNDCLASS nppClass; WNDCLASS nppClass;
nppClass.style = CS_BYTEALIGNWINDOW | CS_DBLCLKS;//CS_HREDRAW | CS_VREDRAW; nppClass.style = CS_BYTEALIGNWINDOW | CS_DBLCLKS;//CS_HREDRAW | CS_VREDRAW;

View File

@ -345,6 +345,7 @@ public:
loadSession(lastSession); loadSession(lastSession);
}; };
bool loadSession(Session & session); bool loadSession(Session & session);
winVer getWinVersion() const {return _winVersion;};
private: private:
static const char _className[32]; static const char _className[32];

View File

@ -278,8 +278,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
bool isUpExist = nppGui._doesExistUpdater = (::PathFileExists(updaterFullPath.c_str()) == TRUE); bool isUpExist = nppGui._doesExistUpdater = (::PathFileExists(updaterFullPath.c_str()) == TRUE);
bool doUpdate = !nppGui._neverUpdate; bool doUpdate = !nppGui._neverUpdate;
bool winSupported = notepad_plus_plus.getWinVersion() >= WV_W2K;
if (!winSupported)
nppGui._doesExistUpdater = false;
if (TheFirstOne && isUpExist && doUpdate) if (TheFirstOne && isUpExist && doUpdate && winSupported)
{ {
Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str()); Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str());
updater.run(); updater.run();