2011-11-27 13:24:37 +00:00
|
|
|
/*
|
|
|
|
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
|
2012-01-23 06:36:15 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2011-11-27 13:24:37 +00:00
|
|
|
*/
|
|
|
|
|
2012-06-08 12:53:33 +00:00
|
|
|
#ifndef SKININSTALLER_APPLICATION_H_
|
|
|
|
#define SKININSTALLER_APPLICATION_H_
|
2011-11-27 13:24:37 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "zip.h"
|
|
|
|
#include "unzip.h"
|
|
|
|
|
2012-06-08 12:53:33 +00:00
|
|
|
#define MAX_LINE_LENGTH 4096
|
|
|
|
#define MB_ERROR MB_OK | MB_TOPMOST | MB_ICONERROR
|
2011-11-27 13:24:37 +00:00
|
|
|
|
2012-06-08 12:53:33 +00:00
|
|
|
struct GlobalData
|
2011-11-27 13:24:37 +00:00
|
|
|
{
|
|
|
|
std::wstring programPath;
|
|
|
|
std::wstring settingsPath;
|
|
|
|
std::wstring skinsPath;
|
2011-11-27 14:14:39 +00:00
|
|
|
std::wstring iniFile;
|
2011-11-27 13:24:37 +00:00
|
|
|
};
|
|
|
|
|
2012-06-16 18:56:46 +00:00
|
|
|
struct OsNameVersion
|
|
|
|
{
|
|
|
|
const WCHAR* name;
|
|
|
|
const WCHAR* version;
|
|
|
|
};
|
|
|
|
|
2011-11-27 18:18:34 +00:00
|
|
|
enum OSPLATFORM
|
|
|
|
{
|
|
|
|
OSPLATFORM_UNKNOWN = 0,
|
|
|
|
OSPLATFORM_XP,
|
|
|
|
OSPLATFORM_VISTA,
|
|
|
|
OSPLATFORM_7
|
|
|
|
};
|
|
|
|
|
2011-11-27 14:14:39 +00:00
|
|
|
bool CloseRainmeterIfActive();
|
2011-11-27 18:18:34 +00:00
|
|
|
OSPLATFORM GetOSPlatform();
|
2011-11-27 13:24:37 +00:00
|
|
|
|
2011-11-27 14:14:39 +00:00
|
|
|
bool IsRunning(const WCHAR* name, HANDLE* hMutex);
|
|
|
|
bool CopyFiles(const std::wstring& strFrom, const std::wstring& strTo, bool bMove = false);
|
2013-04-21 14:08:26 +00:00
|
|
|
std::string ConvertToAscii(LPCTSTR str);
|
|
|
|
std::wstring ConvertToWide(LPCSTR str);
|
2011-11-27 13:24:37 +00:00
|
|
|
|
|
|
|
#endif
|