/* Copyright (C) 2011 Birunthan Mohanathas 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __APPLICATION_H__ #define __APPLICATION_H__ #include #include "zip.h" #include "unzip.h" #if defined _M_IX86 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_IA64 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_X64 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") #else #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #endif #define MAX_LINE_LENGTH 4096 #define MB_ERROR MB_OK | MB_TOPMOST | MB_ICONERROR struct GLOBALDATA { std::wstring programPath; std::wstring settingsPath; std::wstring skinsPath; std::wstring iniFile; }; enum OSPLATFORM { OSPLATFORM_UNKNOWN = 0, OSPLATFORM_XP, OSPLATFORM_VISTA, OSPLATFORM_7 }; bool CloseRainmeterIfActive(); void LoadTheme(const WCHAR* name); void PreserveSetting(const std::wstring& from, LPCTSTR key, bool replace = true); OSPLATFORM GetOSPlatform(); bool IsRunning(const WCHAR* name, HANDLE* hMutex); bool CopyFiles(const std::wstring& strFrom, const std::wstring& strTo, bool bMove = false); std::string ConvertToAscii(LPCTSTR str); std::wstring ConvertToWide(LPCSTR str); #endif