- Removed support for using Rainmeter.dll as Litestep module

- Merged Rainmeter.dll and Rainmeter.exe
- Language resource file now located in \Language\<LanguageName>.dll
- Build.bat now automatically builds and packages all languages
This commit is contained in:
Birunthan Mohanathas
2011-09-28 18:28:35 +00:00
parent 573c96d4fe
commit 13c17b9d1a
46 changed files with 420 additions and 2438 deletions

View File

@ -269,10 +269,6 @@ int CMeterWindow::Initialize(CRainmeter& Rainmeter)
throw CError(L"Unable to register window!", __LINE__, __FILE__);
}
#ifndef _WIN64
SetWindowLong(m_Window, GWL_USERDATA, magicDWord);
#endif
setlocale(LC_NUMERIC, "C");
// Mark the window to ignore the Aero peek
@ -879,33 +875,6 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
}
break;
case BANG_LSHOOK:
{
pos = wcsrchr(arg, L' ');
if (pos != NULL)
{
#ifdef _WIN64
HWND hWnd = (HWND)_wtoi64(pos);
#else
HWND hWnd = (HWND)_wtoi(pos);
#endif
if (hWnd)
{
// Disable native transparency
m_NativeTransparency = false;
UpdateTransparency(m_AlphaValue, true);
SetWindowLong(m_Window, GWL_STYLE, (GetWindowLong(m_Window, GWL_STYLE) &~ WS_POPUP) | WS_CHILD);
SetParent(m_Window, hWnd);
m_ChildWindow = true;
}
}
else
{
LogWithArgs(LOG_ERROR, L"!LsBoxHook: Invalid parameters (%s)", arg);
}
}
break;
case BANG_MOVEMETER:
pos = wcschr(arg, L' ');
if (pos != NULL)
@ -1920,21 +1889,6 @@ void CMeterWindow::ReadConfig()
m_AnchorX = parser.ReadString(section, L"AnchorX", m_AnchorX.c_str());
m_AnchorY = parser.ReadString(section, L"AnchorY", m_AnchorY.c_str());
if (!m_Rainmeter->GetDummyLitestep())
{
char* tmpSz = new char[MAX_LINE_LENGTH];
// Check if step.rc has overrides these values
if (GetRCString("RainmeterWindowX", tmpSz, ConvertToAscii(m_WindowX.c_str()).c_str(), MAX_LINE_LENGTH - 1))
{
m_WindowX = ConvertToWide(tmpSz);
}
if (GetRCString("RainmeterWindowY", tmpSz, ConvertToAscii(m_WindowY.c_str()).c_str(), MAX_LINE_LENGTH - 1))
{
m_WindowY = ConvertToWide(tmpSz);
}
delete [] tmpSz;
}
// Check if the window position should be read as a formula
double value;
if (!m_WindowX.empty() && m_WindowX[0] == L'(' && m_WindowX[m_WindowX.size() - 1] == L')')
@ -3624,7 +3578,7 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
std::wstring command = m_SkinPath + m_SkinName;
command += L"\\";
command += m_SkinIniFile;
HANDLE file = CreateFile(command.c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE file = CreateFile(command.c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
command.insert(0, L" \"");
command.insert(0, m_Rainmeter->GetConfigEditor());
@ -3633,12 +3587,12 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (file == INVALID_HANDLE_VALUE)
{
// File is in protected location, so execute as admin
ExecuteCommand(NULL, command.c_str(), SW_SHOWNORMAL, L"runas");
RunCommand(NULL, command.c_str(), SW_SHOWNORMAL, true);
}
else
{
CloseHandle(file);
LSExecute(NULL, command.c_str(), SW_SHOWNORMAL);
RunCommand(NULL, command.c_str(), SW_SHOWNORMAL);
}
}
else if (wParam == ID_CONTEXT_SKINMENU_REFRESH)
@ -3650,7 +3604,7 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
std::wstring command = L"\"" + m_SkinPath;
command += m_SkinName;
command += L"\"";
LSExecute(NULL, command.c_str(), SW_SHOWNORMAL);
RunCommand(NULL, command.c_str(), SW_SHOWNORMAL);
}
else if (wParam == ID_CONTEXT_SKINMENU_MANAGESKIN)
{