From f6d6760cafe8901d2bdf05163300124cb2cfaf68 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Wed, 22 Feb 2012 10:03:51 +0000 Subject: [PATCH] - Installer: .NET 2.0 is now a requirement - illustro: Changed to use scalable background --- Application/Application.vcxproj | 4 ---- Library/Rainmeter.cpp | 22 ++++++++++------------ Library/Rainmeter.h | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Application/Application.vcxproj b/Application/Application.vcxproj index 637aab27..4080ce0d 100644 --- a/Application/Application.vcxproj +++ b/Application/Application.vcxproj @@ -128,7 +128,6 @@ if not exist ..\testbench\x32\debug\themes (mkdir ..\testbench\x32\debug\themes) echo "Copying skins..." xcopy /Q /S /Y ..\Install\Skins ..\testbench\x32\debug\skins xcopy /Q /S /Y ..\Install\Themes ..\testbench\x32\debug\themes -xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x32\debug\ :skip @@ -178,7 +177,6 @@ if not exist ..\testbench\x64\debug\themes (mkdir ..\testbench\x64\debug\themes) echo "Copying skins..." xcopy /Q /S /Y ..\Install\Skins ..\testbench\x64\debug\skins xcopy /Q /S /Y ..\Install\Themes ..\testbench\x64\debug\themes -xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x64\debug\ :skip @@ -234,7 +232,6 @@ if not exist ..\testbench\x32\release\themes (mkdir ..\testbench\x32\release\the echo "Copying skins..." xcopy /Q /S /Y ..\Install\Skins ..\testbench\x32\release\skins xcopy /Q /S /Y ..\Install\Themes ..\testbench\x32\release\themes -xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x32\release\ :skip @@ -289,7 +286,6 @@ if not exist ..\testbench\x64\release\themes (mkdir ..\testbench\x64\release\the echo "Copying skins..." xcopy /Q /S /Y ..\Install\Skins ..\testbench\x64\release\skins xcopy /Q /S /Y ..\Install\Themes ..\testbench\x64\release\themes -xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x64\release\ :skip diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 4a8ccfaa..2c56abce 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -661,8 +661,10 @@ CRainmeter::CRainmeter() : m_DisableDragging(false), m_Logging(false), m_CurrentParser(), + m_Window(), m_Instance(), m_ResourceInstance(), + m_ResourceLCID(), m_GDIplusToken(), m_GlobalConfig() { @@ -803,7 +805,7 @@ int CRainmeter::Initialize(LPCWSTR szPath) // If the ini file doesn't exist, create a default Rainmeter.ini file. if (_waccess(m_IniFile.c_str(), 0) == -1) { - CreateDefaultConfigFile(m_IniFile); + CreateDefaultConfigFile(); } bDefaultIniLocation = true; } @@ -822,7 +824,7 @@ int CRainmeter::Initialize(LPCWSTR szPath) // If the ini file doesn't exist in the %APPDATA% either, create a default Rainmeter.ini file. if (_waccess(m_IniFile.c_str(), 0) == -1) { - CreateDefaultConfigFile(m_IniFile); + CreateDefaultConfigFile(); } } } @@ -933,10 +935,6 @@ int CRainmeter::Initialize(LPCWSTR szPath) std::wstring strTo(m_SkinPath); CSystem::CopyFiles(strFrom, strTo); - // This shouldn't be copied - std::wstring strNote = strTo + L"Read me before copying skins here.txt"; - CSystem::RemoveFile(strNote); - // Copy also the themes to the %APPDATA% strFrom = std::wstring(m_Path + L"Themes\\*.*"); strTo = std::wstring(GetSettingsPath() + L"Themes\\"); @@ -1122,23 +1120,23 @@ void CRainmeter::SetNetworkStatisticsTimer() ** Creates the default Rainmeter.ini file with illustro\System enabled. ** */ -void CRainmeter::CreateDefaultConfigFile(const std::wstring& strFile) +void CRainmeter::CreateDefaultConfigFile() { - size_t pos = strFile.find_last_of(L'\\'); + size_t pos = m_IniFile.find_last_of(L'\\'); if (pos != std::wstring::npos) { - std::wstring strPath(strFile, 0, pos); + std::wstring strPath(m_IniFile, 0, pos); CreateDirectory(strPath.c_str(), NULL); } - std::wstring defaultIni = GetPath() + L"Default.ini"; + std::wstring defaultIni = GetPath() + L"Themes\\illustro default\\Rainmeter.thm"; if (_waccess(defaultIni.c_str(), 0) == -1) { - WritePrivateProfileString(L"Rainmeter", L"\r\n[illustro\\System]\r\nActive", L"1", strFile.c_str()); + WritePrivateProfileString(L"Rainmeter", L"\r\n[illustro\\System]\r\nActive", L"1", m_IniFile.c_str()); } else { - CSystem::CopyFiles(defaultIni, GetIniFile()); + CSystem::CopyFiles(defaultIni, m_IniFile); } } diff --git a/Library/Rainmeter.h b/Library/Rainmeter.h index 39a1d261..69e412bf 100644 --- a/Library/Rainmeter.h +++ b/Library/Rainmeter.h @@ -263,7 +263,7 @@ private: HMENU CreateConfigMenu(HMENU configMenu, const std::vector& configMenuData); void CreateThemeMenu(HMENU themeMenu); void CreateMonitorMenu(HMENU monitorMenu, CMeterWindow* meterWindow); - void CreateDefaultConfigFile(const std::wstring& strFile); + void CreateDefaultConfigFile(); void SetLogging(bool logging); void TestSettingsFile(bool bDefaultIniLocation);