From 13c17b9d1ac5afc22281eab602339c97f85a5456 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Wed, 28 Sep 2011 18:28:35 +0000 Subject: [PATCH] - Removed support for using Rainmeter.dll as Litestep module - Merged Rainmeter.dll and Rainmeter.exe - Language resource file now located in \Language\.dll - Build.bat now automatically builds and packages all languages --- Application/Application.rc | 115 -- Application/Application.vcxproj | 331 ---- Application/Application.vcxproj.filters | 37 - Application/Rainmeter.ico | Bin 85182 -> 0 bytes Application/resource.h | 21 - {Application => Library}/Application.cpp | 106 +- Library/ConfigParser.cpp | 17 +- Library/DialogAbout.cpp | 2 +- Library/DialogManage.cpp | 18 +- Library/Library.rc | 4 +- Library/Library.vcxproj | 37 +- Library/Library.vcxproj.filters | 3 + Library/Litestep.cpp | 198 +-- Library/Litestep.h | 26 +- Library/Measure.cpp | 1 - Library/MeasureNet.cpp | 12 +- Library/MeasurePlugin.cpp | 9 +- Library/MeterWindow.cpp | 54 +- Library/MeterWindow.h | 1 - Library/Rainmeter.cpp | 1343 ++--------------- Library/Rainmeter.h | 133 +- Library/Res/window.ico | Bin 5430 -> 85182 bytes Library/System.cpp | 39 +- Library/TrayWindow.cpp | 61 +- .../PluginAdvancedCPU.vcxproj | 10 +- Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj | 11 +- Plugins/PluginExample/PluginExample.vcxproj | 10 +- Plugins/PluginFolderInfo/FolderInfoPlugin.cpp | 31 +- .../PluginFolderInfo/PluginFolderInfo.vcxproj | 10 +- Plugins/PluginMediaKey/PluginMediaKey.vcxproj | 11 +- .../PluginNowPlaying/PluginNowPlaying.vcxproj | 15 +- Plugins/PluginPerfMon/PluginPerfMon.vcxproj | 10 +- Plugins/PluginPing/PluginPing.vcxproj | 14 +- Plugins/PluginPower/PluginPower.vcxproj | 10 +- Plugins/PluginQuote/PluginQuote.vcxproj | 14 +- .../PluginRecycleManager.vcxproj | 10 +- Plugins/PluginResMon/PluginResMon.vcxproj | 14 +- Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj | 10 +- Plugins/PluginSysInfo/PluginSysInfo.vcxproj | 14 +- .../PluginVirtualDesktops.vcxproj | 10 +- .../PluginWebParser/PluginWebParser.vcxproj | 14 +- .../PluginWifiStatus/PluginWifiStatus.vcxproj | 10 +- .../PluginWin7Audio/PluginWin7Audio.vcxproj | 11 +- .../PluginWindowMessage.vcxproj | 10 +- Plugins/PluginiTunes/PluginiTunes.vcxproj | 10 +- Rainmeter.sln | 31 +- 46 files changed, 420 insertions(+), 2438 deletions(-) delete mode 100644 Application/Application.rc delete mode 100644 Application/Application.vcxproj delete mode 100644 Application/Application.vcxproj.filters delete mode 100644 Application/Rainmeter.ico delete mode 100644 Application/resource.h rename {Application => Library}/Application.cpp (76%) diff --git a/Application/Application.rc b/Application/Application.rc deleted file mode 100644 index 7c992dcd..00000000 --- a/Application/Application.rc +++ /dev/null @@ -1,115 +0,0 @@ -// Microsoft Developer Studio generated resource script. -// Caution! Do not modify this file without changing \install\UpdateApplicationRC.au3 -// -#include "resource.h" -#include "../Version.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Finnish resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION FILEVER - PRODUCTVERSION PRODUCTVER - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "FileDescription", "Rainmeter" - VALUE "FileVersion", STRFILEVER - VALUE "InternalName", "Rainmeter" - VALUE "LegalCopyright", "Copyright (C) 2011 - All authors" - VALUE "OriginalFilename", "Rainmeter.exe" - VALUE "ProductName", "Rainmeter" -#ifdef _WIN64 - VALUE "ProductVersion", STRPRODUCTVER " (64-bit)" -#else - VALUE "ProductVersion", STRPRODUCTVER " (32-bit)" -#endif //_WIN64 - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_RAINMETER ICON DISCARDABLE "Rainmeter.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Finnish resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Application/Application.vcxproj b/Application/Application.vcxproj deleted file mode 100644 index f5300d9f..00000000 --- a/Application/Application.vcxproj +++ /dev/null @@ -1,331 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D2A0903C-E760-4134-AE61-3D55BF8F760C} - - - - - Application - false - Unicode - true - - - Application - false - Unicode - - - Application - false - Unicode - $(COMPILER64) - true - - - Application - false - Unicode - $(COMPILER64) - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)TestBench\x32\$(Configuration)\ - .\x32\$(Configuration)\ - false - $(SolutionDir)TestBench\x64\$(Configuration)\ - .\x64\$(Configuration)\ - false - $(SolutionDir)TestBench\x32\$(Configuration)\ - .\x32\$(Configuration)\ - false - $(SolutionDir)TestBench\x64\$(Configuration)\ - .\x64\$(Configuration)\ - false - Rainmeter - Rainmeter - Rainmeter - Rainmeter - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\x32/Debug/Application.tlb - - - - - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - .\x32/Debug/Application.pch - .\x32/Debug/ - .\x32/Debug/ - .\x32/Debug/ - Level3 - true - EditAndContinue - 4018;4090;4114;4267;4351;4786;4800;4996 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ../TestBench/x32/Debug/Rainmeter.exe - true - true - .\x32/Debug/Rainmeter.pdb - Windows - wWinMainCRTStartup - MachineX86 - - - if exist ..\testbench\x32\release\skins goto skip -mkdir ..\testbench\x32\release\skins -if not exist ..\testbench\x32\release\themes (mkdir ..\testbench\x32\release\themes) -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 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\x64/Debug/Application.tlb - - - - - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - .\x64/Debug/Application.pch - .\x64/Debug/ - .\x64/Debug/ - .\x64/Debug/ - Level3 - true - ProgramDatabase - 4018;4090;4114;4267;4351;4786;4800;4996 - - - _DEBUG;_WIN64;%(PreprocessorDefinitions) - 0x0409 - - - ../TestBench/x64/Debug/Rainmeter.exe - true - true - .\x32/Debug/Rainmeter.pdb - Windows - wWinMainCRTStartup - MachineX64 - - - if exist ..\testbench\x32\release\skins goto skip -mkdir ..\testbench\x32\release\skins -if not exist ..\testbench\x32\release\themes (mkdir ..\testbench\x32\release\themes) -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 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\x32/Release/Application.tlb - - - - - MaxSpeed - OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_SECURE_SCL=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - .\x32/Release/Application.pch - .\x32/Release/ - .\x32/Release/ - .\x32/Release/ - Level3 - true - ProgramDatabase - 4018;4090;4114;4267;4351;4786;4800;4996 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - Rainmeter.lib;%(AdditionalDependencies) - ../TestBench/x32/Release/Rainmeter.exe - true - ..\Library\x32\Release;%(AdditionalLibraryDirectories) - true - .\x32/Release/Rainmeter.pdb - Windows - wWinMainCRTStartup - MachineX86 - .rdata=.text - true - true - - - if exist ..\testbench\x32\release\skins goto skip -mkdir ..\testbench\x32\release\skins -if not exist ..\testbench\x32\release\themes (mkdir ..\testbench\x32\release\themes) -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 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\x64/Release/Application.tlb - - - - - /GL /GA %(AdditionalOptions) - MaxSpeed - OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_SECURE_SCL=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\x64/Release/Application.pch - .\x64/Release/ - .\x64/Release/ - .\x64/Release/ - Level3 - true - ProgramDatabase - 4018;4090;4114;4267;4351;4786;4800;4996 - - - NDEBUG;_WIN64;%(PreprocessorDefinitions) - 0x0409 - - - /LTCG %(AdditionalOptions) - Rainmeter.lib;%(AdditionalDependencies) - ../TestBench/x64/Release/Rainmeter.exe - true - ..\Library\x64\Release;%(AdditionalLibraryDirectories) - .\x64/Release/Rainmeter.pdb - Windows - wWinMainCRTStartup - MachineX64 - .rdata=.text - true - true - - - if exist ..\testbench\x32\release\skins goto skip -mkdir ..\testbench\x32\release\skins -if not exist ..\testbench\x32\release\themes (mkdir ..\testbench\x32\release\themes) -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 - - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - - _DEBUG;%(PreprocessorDefinitions) - _DEBUG;%(PreprocessorDefinitions) - NDEBUG;%(PreprocessorDefinitions) - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - {be9d2400-7f1c-49d6-8498-5ce495491ad6} - false - - - - - - \ No newline at end of file diff --git a/Application/Application.vcxproj.filters b/Application/Application.vcxproj.filters deleted file mode 100644 index 079efa20..00000000 --- a/Application/Application.vcxproj.filters +++ /dev/null @@ -1,37 +0,0 @@ - - - - - {22670730-eb79-4df9-bed9-27fff1350132} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {774a1827-ac91-40b9-ad18-8a3d68983c64} - h;hpp;hxx;hm;inl - - - {a4963a10-e359-400f-86fa-bdce98dd5dc2} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - - - Header Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/Application/Rainmeter.ico b/Application/Rainmeter.ico deleted file mode 100644 index cb2e5558cdb998a7b4a4c61223f11420d97eb2e5..0000000000000000000000000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(r~U^CQlLDTbLkx}Ol!~`z7mgs&{`J5uYfSBz$ zb|TJi4W57cB@Gma`|0~)g6AV&isHFDh^+w9egXQR2b}arK8=b6`n3_@l^*A7kdd&{ z1kb&v-cH!=rz6jg>i3z({f~fy>&Vko)BlP*Dag0*8UOD>85)focy1WrBB0VUo^OZ$ ze*x52&4V=g;TgaR)%%*Rk;f5GKp;kXJb=$v(e#Y!J>>ZWa2L>>_Yv0wuuTJ1^F8Yt zc`X3P70>^GYrZF5Xq^Lj+24ZzhRc8^&#F(;e|V-NfPU+nH2q(gdw6y@K&!7g%eZG4 xY@AUg*f`Zd1$qS=r~Mjid=T*K!C>PXTY`=M2K -#include -#include -#include +#include "StdAfx.h" #include "resource.h" -#include "../Library/Rainmeter.h" +#include "Rainmeter.h" +#include "TrayWindow.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='*'\"") @@ -34,24 +32,14 @@ #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #endif -/* -** Protos -*/ +extern CRainmeter* Rainmeter; + +void Bang(const WCHAR* command); BOOL InitApplication(HINSTANCE hInstance, const WCHAR* WinClass); HWND InitInstance(HINSTANCE hInstance, const WCHAR* WinClass, const WCHAR* WinName); -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -void Bang(const WCHAR* command); -HMODULE RmLoadSystemLibrary(LPCWSTR lpLibFileName); +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); BOOL IsRunning(HANDLE* hMutex); -/* -** Stuff from the DLL -*/ -extern "C" EXPORT_PLUGIN int initModuleEx(HWND ParentWnd, HINSTANCE dllInst, LPCSTR); -extern "C" EXPORT_PLUGIN void quitModule(HINSTANCE dllInst); -extern "C" EXPORT_PLUGIN void Initialize(bool DummyLS, LPCTSTR CmdLine); -extern "C" EXPORT_PLUGIN void ExecuteBang(LPCTSTR szBang); - const WCHAR* WinClass = L"DummyRainWClass"; const WCHAR* WinName = L"Rainmeter control window"; @@ -99,7 +87,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd if (!InitApplication(hInstance, WinClass)) return RetError; } - hWnd=InitInstance(hInstance, WinClass, WinName); + hWnd = InitInstance(hInstance, WinClass, WinName); if (!hWnd) return RetError; // Remove quotes from the commandline @@ -113,38 +101,40 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd } } - // Initialize from exe - Initialize(true, Path); - - // Check that the DLL is available - HMODULE module = GetModuleHandle(L"Rainmeter.dll"); - if (module == NULL) + int result = 1; + try { - MessageBox(NULL, L"Unable to load Rainmeter.dll", L"Rainmeter", MB_OK | MB_TOPMOST | MB_ICONERROR); - DestroyWindow(hWnd); - return RetError; - } + Rainmeter = new CRainmeter; - // Initialize the DLL - if (initModuleEx(hWnd, module, NULL) == 1) - { - MessageBox(NULL, L"Unable to initialize Rainmeter.dll", L"Rainmeter", MB_OK | MB_TOPMOST | MB_ICONERROR); - DestroyWindow(hWnd); - return RetError; - } - - // Run the standard window message loop - while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) - { - if (bRet == -1) // error + if (Rainmeter) { - quitModule(NULL); - break; + result = Rainmeter->Initialize(hWnd, hInstance, lpCmdLine); } - else + } + catch (CError& error) + { + MessageBox(hWnd, error.GetString().c_str(), APPNAME, MB_OK | MB_TOPMOST | MB_ICONEXCLAMATION); + } + + if (result == 1) + { + DestroyWindow(hWnd); + } + else + { + // Run the standard window message loop + while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) { - TranslateMessage(&msg); - DispatchMessage(&msg); + if (bRet == -1) // error + { + CRainmeter::Quit(); + break; + } + else + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } } } @@ -163,11 +153,11 @@ BOOL InitApplication(HINSTANCE hInstance, const WCHAR* WinClass) WNDCLASS wc; wc.style = 0; - wc.lpfnWndProc = (WNDPROC) MainWndProc; + wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; - wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_RAINMETER)); + wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOW)); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; @@ -332,34 +322,34 @@ BOOL IsRunning(HANDLE* hMutex) } /* -** MainWndProc +** WndProc ** ** The main window procedure ** */ -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - switch(message) { - + switch (uMsg) + { case WM_DESTROY: { - quitModule(NULL); + CRainmeter::Quit(); PostQuitMessage(0); } break; case WM_COPYDATA: { - COPYDATASTRUCT* pCopyDataStruct = (COPYDATASTRUCT*) lParam; - if (pCopyDataStruct && (pCopyDataStruct->dwData == 1) && (pCopyDataStruct->cbData > 0)) + COPYDATASTRUCT* cds = (COPYDATASTRUCT*)lParam; + if (Rainmeter && cds && (cds->dwData == 1) && (cds->cbData > 0) && cds->lpData) { - ExecuteBang((const WCHAR*)pCopyDataStruct->lpData); + ExecuteBang((LPCWSTR)cds->lpData); } } break; default: - return DefWindowProc(hWnd, message, wParam, lParam); + return DefWindowProc(hWnd, uMsg, wParam, lParam); } return 0; diff --git a/Library/ConfigParser.cpp b/Library/ConfigParser.cpp index 0b962d04..f942cb70 100644 --- a/Library/ConfigParser.cpp +++ b/Library/ConfigParser.cpp @@ -645,19 +645,6 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT } } - // Check Litestep vars - if (Rainmeter && !Rainmeter->GetDummyLitestep()) - { - std::string ansi = ConvertToAscii(result.c_str()); - if (ansi.size() < 4096) - { - char* buffer = new char[4096]; // lets hope the buffer is large enough... - VarExpansion(buffer, ansi.c_str()); - result = ConvertToWide(buffer); - delete [] buffer; - } - } - SetBuiltInVariable(L"CURRENTSECTION", section); // Set temporarily if (ReplaceVariables(result)) @@ -1051,11 +1038,11 @@ void CConfigParser::ReadIniFile(const std::vector& iniFileMappings if (temporary) { - if (CRainmeter::GetDebug()) LogWithArgs(LOG_DEBUG, L"Reading file: %s (Temp: %s)", iniFile.c_str(), iniRead.c_str()); + if (Rainmeter->GetDebug()) LogWithArgs(LOG_DEBUG, L"Reading file: %s (Temp: %s)", iniFile.c_str(), iniRead.c_str()); } else { - if (CRainmeter::GetDebug()) LogWithArgs(LOG_DEBUG, L"Reading file: %s", iniFile.c_str()); + if (Rainmeter->GetDebug()) LogWithArgs(LOG_DEBUG, L"Reading file: %s", iniFile.c_str()); iniRead = iniFile; } diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index 35750a04..7e47dd5a 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -1064,7 +1064,7 @@ INT_PTR CDialogAbout::CTabVersion::OnNotify(WPARAM wParam, LPARAM lParam) switch (nm->code) { case NM_CLICK: - LSExecute(NULL, ((PNMLINK)lParam)->item.szUrl, SW_SHOWNORMAL); + RunCommand(NULL, ((PNMLINK)lParam)->item.szUrl, SW_SHOWNORMAL); break; default: diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 42fc2183..ed33a1ac 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -254,12 +254,12 @@ INT_PTR CDialogManage::OnCommand(WPARAM wParam, LPARAM lParam) std::wstring command = Rainmeter->GetConfigEditor() + L" \""; command += Rainmeter->GetIniFile(); command += L"\""; - LSExecute(Rainmeter->GetTrayWindow()->GetWindow(), command.c_str(), SW_SHOWNORMAL); + RunCommand(Rainmeter->GetTrayWindow()->GetWindow(), command.c_str(), SW_SHOWNORMAL); } break; case IDC_OPENLOG_BUTTON: - RainmeterAboutWide(); + RainmeterAbout(); break; case IDCLOSE: @@ -925,7 +925,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) std::wstring command = Rainmeter->GetSkinPath() + m_SkinName; command += L"\\"; command += m_FileName; - 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, Rainmeter->GetConfigEditor()); @@ -934,12 +934,12 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(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, L"runas"); } else { CloseHandle(file); - LSExecute(NULL, command.c_str(), SW_SHOWNORMAL); + RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } } break; @@ -1117,7 +1117,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) std::wstring command = L"\"" + Rainmeter->GetSkinPath(); command += GetTreeSelectionPath(tree); command += L"\""; - LSExecute(NULL, command.c_str(), SW_SHOWNORMAL); + RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } break; @@ -1540,7 +1540,7 @@ INT_PTR CDialogManage::CTabThemes::OnCommand(WPARAM wParam, LPARAM lParam) command += L"Themes\\"; command += themes[sel]; command += L"\\Rainmeter.thm\""; - LSExecute(NULL, command.c_str(), SW_SHOWNORMAL); + RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } break; @@ -1586,7 +1586,7 @@ INT_PTR CDialogManage::CTabThemes::OnCommand(WPARAM wParam, LPARAM lParam) { std::wstring command = L"\"" + Rainmeter->GetAddonPath(); command += L"RainBackup\\RainBackup.exe\""; - LSExecute(NULL, command.c_str(), SW_SHOWNORMAL); + RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } break; @@ -1669,7 +1669,7 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam) case IDC_MANAGESETTINGS_SHOWLOGFILE_BUTTON: { std::wstring command = Rainmeter->GetLogViewer() + Rainmeter->GetLogFile(); - LSExecute(NULL, command.c_str(), SW_SHOWNORMAL); + RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } break; diff --git a/Library/Library.rc b/Library/Library.rc index d99347bf..c7a95365 100644 --- a/Library/Library.rc +++ b/Library/Library.rc @@ -31,11 +31,11 @@ BEGIN BEGIN BLOCK "040904E4" BEGIN - VALUE "FileDescription", "Rainmeter Core Library" + VALUE "FileDescription", "Rainmeter" VALUE "FileVersion", STRFILEVER VALUE "InternalName", "Rainmeter" VALUE "LegalCopyright", "Copyright (C) 2011 - All authors" - VALUE "OriginalFilename", "Rainmeter.dll" + VALUE "OriginalFilename", "Rainmeter.exe" VALUE "ProductName", "Rainmeter" #ifdef _WIN64 VALUE "ProductVersion", STRPRODUCTVER " (64-bit)" diff --git a/Library/Library.vcxproj b/Library/Library.vcxproj index da6f28b8..cba46131 100644 --- a/Library/Library.vcxproj +++ b/Library/Library.vcxproj @@ -20,29 +20,30 @@ {BE9D2400-7F1C-49D6-8498-5CE495491AD6} + Application - DynamicLibrary + Application false Unicode true - DynamicLibrary + Application false Unicode - DynamicLibrary + Application false Unicode $(COMPILER64) true - DynamicLibrary + Application false Unicode $(COMPILER64) @@ -95,7 +96,7 @@ Disabled lua/include;lua/lua;lua/tolua++;lua/glue;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;LIBRARY_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;HAVE_CONFIG_H;SUPPORT_UTF8;LIBRARY_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -116,12 +117,14 @@ comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;%(AdditionalDependencies) - ../TestBench/x32/Debug/Rainmeter.dll + ../TestBench/x32/Debug/Rainmeter.exe true %(AdditionalLibraryDirectories) true .\x32/Debug/Rainmeter.pdb .\x32/Debug/Rainmeter.lib + Windows + wWinMainCRTStartup MachineX86 @@ -138,7 +141,7 @@ Disabled lua/include;lua/lua;lua/tolua++;lua/glue;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;LIBRARY_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;HAVE_CONFIG_H;SUPPORT_UTF8;LIBRARY_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -159,12 +162,14 @@ comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;%(AdditionalDependencies) - ../TestBench/x64/Debug/Rainmeter.dll + ../TestBench/x64/Debug/Rainmeter.exe true %(AdditionalLibraryDirectories) true .\x64/Debug/Rainmeter.pdb .\x64/Debug/Rainmeter.lib + Windows + wWinMainCRTStartup MachineX64 @@ -182,7 +187,7 @@ MaxSpeed OnlyExplicitInline lua/include;lua/lua;lua/tolua++;lua/glue;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBRARY_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;LIBRARY_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -198,6 +203,7 @@ true ProgramDatabase 4018;4090;4114;4267;4334;4351;4786;4800;4996 + /GL /GA %(AdditionalOptions) NDEBUG;%(PreprocessorDefinitions) @@ -205,12 +211,14 @@ comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;%(AdditionalDependencies) - ../TestBench/x32/Release/Rainmeter.dll + ../TestBench/x32/Release/Rainmeter.exe true lua/lib;%(AdditionalLibraryDirectories) true .\x32/Release/Rainmeter.pdb .\x32/Release/Rainmeter.lib + Windows + wWinMainCRTStartup MachineX86 .rdata=.text true @@ -228,11 +236,11 @@ - /GL %(AdditionalOptions) + /GL /GA %(AdditionalOptions) MaxSpeed Default lua/include;lua/lua;lua/tolua++;lua/glue;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBRARY_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;LIBRARY_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -253,11 +261,13 @@ /LTCG %(AdditionalOptions) comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;%(AdditionalDependencies) - ../TestBench/x64/Release/Rainmeter.dll + ../TestBench/x64/Release/Rainmeter.exe true %(AdditionalLibraryDirectories) .\x64/Release/Rainmeter.pdb .\x64/Release/Rainmeter.lib + Windows + wWinMainCRTStartup MachineX64 .rdata=.text true @@ -265,6 +275,7 @@ + Disabled EnableFastChecks diff --git a/Library/Library.vcxproj.filters b/Library/Library.vcxproj.filters index 17159efc..b27d2846 100644 --- a/Library/Library.vcxproj.filters +++ b/Library/Library.vcxproj.filters @@ -357,6 +357,9 @@ Source Files + + Source Files + diff --git a/Library/Litestep.cpp b/Library/Litestep.cpp index d109164d..c660a800 100644 --- a/Library/Litestep.cpp +++ b/Library/Litestep.cpp @@ -24,36 +24,6 @@ extern CRainmeter* Rainmeter; -typedef BOOL (*FPADDBANGCOMMAND)(LPCSTR command, BangCommand f); -FPADDBANGCOMMAND fpAddBangCommand = NULL; - -typedef HRGN (*FPBITMAPTOREGION)(HBITMAP hBmp, COLORREF cTransparentColor, COLORREF cTolerance, int xoffset, int yoffset); -FPBITMAPTOREGION fpBitmapToRegion = NULL; - -typedef HWND (*FPGETLITESTEPWND)(void); -FPGETLITESTEPWND fpGetLitestepWnd = NULL; - -typedef BOOL (*FPGETRCSTRING)(LPCSTR lpKeyName, LPSTR value, LPCSTR defStr, int maxLen); -FPGETRCSTRING fpGetRCString = NULL; - -//typedef int (*FPGETRCINT)(LPCSTR lpKeyName, int nDefault); -//FPGETRCINT fpGetRCInt = NULL; - -typedef HINSTANCE (*FPLSEXECUTE)(HWND Owner, LPCSTR szCommand, int nShowCmd); -FPLSEXECUTE fpLSExecute = NULL; - -typedef BOOL (*FPREMOVEBANGCOMMAND)(LPCSTR command); -FPREMOVEBANGCOMMAND fpRemoveBangCommand = NULL; - -//typedef void (*FPTRANSPARENTBLTLS)(HDC dc, int nXDest, int nYDest, int nWidth, int nHeight, HDC tempDC, int nXSrc, int nYSrc, COLORREF colorTransparent); -//FPTRANSPARENTBLTLS fpTransparentBltLS = NULL; - -typedef void (*FPVAREXPANSION)(LPSTR buffer, LPCSTR value); -FPVAREXPANSION fpVarExpansion = NULL; - -typedef BOOL (WINAPI *FPLSLOG)(int nLevel, LPCSTR pszModule, LPCSTR pszMessage); -FPLSLOG fpLSLog = NULL; - static CRITICAL_SECTION g_CsLog = {0}; static CRITICAL_SECTION g_CsLogDelay = {0}; @@ -68,25 +38,6 @@ void InitalizeLitestep() { InitializeCriticalSection(&g_CsLog); InitializeCriticalSection(&g_CsLogDelay); - - if (!CRainmeter::GetDummyLitestep()) - { - // Use lsapi's methods instead of the stubs - HINSTANCE h = CSystem::RmLoadLibrary(L"lsapi.dll"); - if (h != NULL) - { - fpAddBangCommand = (FPADDBANGCOMMAND)GetProcAddress(h, "AddBangCommand"); - fpBitmapToRegion = (FPBITMAPTOREGION)GetProcAddress(h, "BitmapToRegion"); - fpGetLitestepWnd = (FPGETLITESTEPWND)GetProcAddress(h, "GetLitestepWnd"); - fpGetRCString = (FPGETRCSTRING)GetProcAddress(h, "GetRCString"); - //fpGetRCInt = (FPGETRCINT)GetProcAddress(h, "GetRCInt"); - fpLSExecute = (FPLSEXECUTE)GetProcAddress(h, "LSExecute"); - fpRemoveBangCommand = (FPREMOVEBANGCOMMAND)GetProcAddress(h, "RemoveBangCommand"); - //fpTransparentBltLS = (FPTRANSPARENTBLTLS)GetProcAddress(h, "TransparentBltLS"); - fpVarExpansion = (FPVAREXPANSION)GetProcAddress(h, "VarExpansion"); - fpLSLog = (FPLSLOG)GetProcAddress(h, "_LSLog@12"); - } - } } void FinalizeLitestep() @@ -95,73 +46,8 @@ void FinalizeLitestep() DeleteCriticalSection(&g_CsLogDelay); } -BOOL AddBangCommand(LPCSTR command, BangCommand f) -{ - // Use the lsapi.dll version of the method if possible - if (fpAddBangCommand) return fpAddBangCommand(command, f); - - // The stub implementation - return true; -} - -HWND GetLitestepWnd(void) -{ - // Use the lsapi.dll version of the method if possible - if (fpGetLitestepWnd) return fpGetLitestepWnd(); - - // The stub implementation - return NULL; -} - -BOOL RemoveBangCommand(LPCSTR command) -{ - // Use the lsapi.dll version of the method if possible - if (fpRemoveBangCommand) return fpRemoveBangCommand(command); - - // The stub implementation - return true; -} - -BOOL GetRCString(LPCSTR lpKeyName, LPSTR value, LPCSTR defStr, int maxLen) -{ - // Use the lsapi.dll version of the method if possible - if (fpGetRCString) return fpGetRCString(lpKeyName, value, defStr, maxLen); - - // The stub implementation - return false; -} - -//int GetRCInt(LPCSTR lpKeyName, int nDefault) -//{ -// // Use the lsapi.dll version of the method if possible -// if (fpGetRCInt) return fpGetRCInt(lpKeyName, nDefault); -// -// // The stub implementation -// return nDefault; -//} - -void VarExpansion(LPSTR buffer, LPCSTR value) -{ - // Use the lsapi.dll version of the method if possible - if (fpVarExpansion) - { - fpVarExpansion(buffer, value); - } - else - { - // The stub implementation - if (buffer != value) - { - strcpy(buffer, value); - } - } -} - HRGN BitmapToRegion(HBITMAP hbm, COLORREF clrTransp, COLORREF clrTolerance, int xoffset, int yoffset) { - // Use the lsapi.dll version of the method if possible - if (fpBitmapToRegion) return fpBitmapToRegion(hbm, clrTransp, clrTolerance, xoffset, yoffset); - // start with a completely transparent rgn // this is more correct as no bmp, should render a transparent background HRGN hRgn = CreateRectRgn(0, 0, 0, 0); @@ -289,70 +175,17 @@ HRGN BitmapToRegion(HBITMAP hbm, COLORREF clrTransp, COLORREF clrTolerance, int return hRgn; } -//HINSTANCE LSExecuteAsAdmin(HWND Owner, LPCTSTR szCommand, int nShowCmd) -//{ -// BOOL IsInAdminGroup = FALSE; -// -// SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; -// PSID AdministratorsGroup; -// // Initialize SID. -// if (!AllocateAndInitializeSid( &NtAuthority, -// 2, -// SECURITY_BUILTIN_DOMAIN_RID, -// DOMAIN_ALIAS_RID_ADMINS, -// 0, 0, 0, 0, 0, 0, -// &AdministratorsGroup)) -// { -// // Initializing SID Failed. -// IsInAdminGroup = FALSE; -// } -// else -// { -// // Check whether the token is present in admin group. -// if (!CheckTokenMembership( NULL, -// AdministratorsGroup, -// &IsInAdminGroup )) -// { -// // Error occurred. -// IsInAdminGroup = FALSE; -// } -// // Free SID and return. -// FreeSid(AdministratorsGroup); -// } -// -// if (IsInAdminGroup) -// { -// return ExecuteCommand(Owner, szCommand, nShowCmd, L"open"); -// } -// else -// { -// return ExecuteCommand(Owner, szCommand, nShowCmd, L"runas"); -// } -//} - -HINSTANCE LSExecute(HWND Owner, LPCTSTR szCommand, int nShowCmd) -{ - // Use the lsapi.dll version of the method if possible - if (fpLSExecute) - { - std::string asc = ConvertToAscii(szCommand); - return fpLSExecute(Owner, asc.c_str(), nShowCmd); - } - - return ExecuteCommand(Owner, szCommand, nShowCmd, L"open"); -} - -HINSTANCE ExecuteCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, LPCTSTR szVerb) +void RunCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, bool asAdmin) { // The stub implementation (some of this code is taken from lsapi.cpp) - if (szCommand == NULL || *szCommand == 0) return NULL; + if (szCommand == NULL || *szCommand == 0) return; std::wstring args; std::wstring command = szCommand; size_t notwhite = command.find_first_not_of(L" \t\r\n"); command.erase(0, notwhite); - if (command.empty()) return NULL; + if (command.empty()) return; size_t quotePos = command.find(L'"'); if (quotePos == 0) @@ -380,11 +213,12 @@ HINSTANCE ExecuteCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, LPCTSTR sz if (!command.empty()) { + LPCWSTR szVerb = asAdmin ? L"runas" : L"open"; DWORD type = GetFileAttributes(command.c_str()); if (type & FILE_ATTRIBUTE_DIRECTORY && type != 0xFFFFFFFF) { - HINSTANCE instance = ShellExecute(Owner, szVerb, command.c_str(), NULL, NULL, nShowCmd ? nShowCmd : SW_SHOWNORMAL); - return instance; + ShellExecute(Owner, szVerb, command.c_str(), NULL, NULL, nShowCmd ? nShowCmd : SW_SHOWNORMAL); + return; } std::wstring dir = CRainmeter::ExtractPath(command); @@ -398,11 +232,6 @@ HINSTANCE ExecuteCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, LPCTSTR sz si.nShow = nShowCmd ? nShowCmd : SW_SHOWNORMAL; si.fMask = SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI; ShellExecuteEx(&si); - return si.hInstApp; - } - else - { - return (HINSTANCE)SE_ERR_FNF; } } @@ -556,10 +385,7 @@ BOOL LogInternal(int nLevel, LPCTSTR pszModule, ULONGLONG elapsed, LPCTSTR pszMe WCHAR buffer[128]; _snwprintf_s(buffer, _TRUNCATE, L"%02llu:%02llu:%02llu.%03llu", elapsed / (1000 * 60 * 60), (elapsed / (1000 * 60)) % 60, (elapsed / 1000) % 60, elapsed % 1000); - if (Rainmeter) - { - Rainmeter->AddAboutLogInfo(nLevel, buffer, pszMessage); - } + Rainmeter->AddAboutLogInfo(nLevel, buffer, pszMessage); std::wstring message = L"("; message += buffer; @@ -571,16 +397,8 @@ BOOL LogInternal(int nLevel, LPCTSTR pszModule, ULONGLONG elapsed, LPCTSTR pszMe _RPT0(_CRT_WARN, "\n"); #endif - // Use the lsapi.dll version of the method if possible - if (fpLSLog) - { - std::string asc = ConvertToAscii(message.c_str()); - std::string mod = ConvertToAscii(pszModule); - return fpLSLog(nLevel, mod.c_str(), asc.c_str()); - } - // The stub implementation - if (Rainmeter && Rainmeter->GetLogging()) + if (Rainmeter->GetLogging()) { std::wstring logfile = Rainmeter->GetLogFile(); if (logFound == 0) diff --git a/Library/Litestep.h b/Library/Litestep.h index 01c81172..74751332 100644 --- a/Library/Litestep.h +++ b/Library/Litestep.h @@ -25,31 +25,13 @@ #include "Error.h" #include "Export.h" -#define magicDWord 0x49474541 -#define LM_GETREVID 9265 -#define LM_REGISTERMESSAGE 9263 -#define LM_UNREGISTERMESSAGE 9264 - - -typedef void (BangCommand)(HWND sender, LPCSTR args); - -// Call this if you want to use lsapi.dll's functions instead of stubs void InitalizeLitestep(); void FinalizeLitestep(); -// The stubs -BOOL AddBangCommand(LPCSTR command, BangCommand f); -HRGN BitmapToRegion(HBITMAP hBmp, COLORREF cTransparentColor, COLORREF cTolerance, int xoffset, int yoffset); -HWND GetLitestepWnd(void); -BOOL GetRCString(LPCSTR lpKeyName, LPSTR value, LPCSTR defStr, int maxLen); -//int GetRCInt(LPCSTR lpKeyName, int nDefault); -BOOL RemoveBangCommand(LPCSTR command); -//void TransparentBltLS (HDC dc, int nXDest, int nYDest, int nWidth, int nHeight, HDC tempDC, int nXSrc, int nYSrc, COLORREF colorTransparent); -void VarExpansion(LPSTR buffer, LPCSTR value); -//void LSSetVariable(const BSTR name, const BSTR value); - void ResetLoggingFlag(); +HRGN BitmapToRegion(HBITMAP hBmp, COLORREF cTransparentColor, COLORREF cTolerance, int xoffset, int yoffset); + std::string ConvertToAscii(LPCTSTR str); std::wstring ConvertToWide(LPCSTR str); std::string ConvertToUTF8(LPCWSTR str); @@ -59,9 +41,7 @@ void Log(int nLevel, const WCHAR* message, const WCHAR* module = L"Rainmeter"); void LogWithArgs(int nLevel, const WCHAR* format, ... ); // Replacement for DebugLog(), has the same functionality but has the option to set teh Log Level. void LogError(CError& error); -HINSTANCE LSExecute(HWND Owner, LPCTSTR szCommand, int nShowCmd); -//HINSTANCE LSExecuteAsAdmin(HWND Owner, LPCTSTR szCommand, int nShowCmd); -HINSTANCE ExecuteCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, LPCTSTR szVerb); +void RunCommand(HWND Owner, LPCTSTR szCommand, int nShowCmd, bool asAdmin = false); WCHAR* GetString(UINT id); std::wstring GetFormattedString(UINT id, ...); diff --git a/Library/Measure.cpp b/Library/Measure.cpp index 86e65313..6eb16a91 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -433,7 +433,6 @@ std::wstring CMeasure::ExtractWord(std::wstring& buffer) return ret; } - /* ** PreUpdate ** diff --git a/Library/MeasureNet.cpp b/Library/MeasureNet.cpp index 7df4e1a4..92480060 100644 --- a/Library/MeasureNet.cpp +++ b/Library/MeasureNet.cpp @@ -110,7 +110,7 @@ void CMeasureNet::UpdateIFTable() logging = true; } - if (CRainmeter::GetDebug() && logging) + if (Rainmeter->GetDebug() && logging) { Log(LOG_DEBUG, L"------------------------------"); LogWithArgs(LOG_DEBUG, L"* NETWORK-INTERFACE: Count=%i", c_NumOfTables); @@ -206,7 +206,7 @@ void CMeasureNet::UpdateIFTable() logging = true; } - if (CRainmeter::GetDebug() && logging) + if (Rainmeter->GetDebug() && logging) { Log(LOG_DEBUG, L"------------------------------"); LogWithArgs(LOG_DEBUG, L"* NETWORK-INTERFACE: Count=%i", c_NumOfTables); @@ -467,17 +467,17 @@ void CMeasureNet::ReadConfig(CConfigParser& parser, const WCHAR* section, NET ne if (net == NET_IN) { netName = L"NetInSpeed"; - value = CRainmeter::GetGlobalConfig().netInSpeed; + value = Rainmeter->GetGlobalConfig().netInSpeed; } else if (net == NET_OUT) { netName = L"NetOutSpeed"; - value = CRainmeter::GetGlobalConfig().netOutSpeed; + value = Rainmeter->GetGlobalConfig().netOutSpeed; } else { netName = L"NetTotalSpeed"; - value = CRainmeter::GetGlobalConfig().netInSpeed + CRainmeter::GetGlobalConfig().netOutSpeed; + value = Rainmeter->GetGlobalConfig().netInSpeed + Rainmeter->GetGlobalConfig().netOutSpeed; } double maxValue = parser.ReadFloat(section, L"MaxValue", -1); @@ -716,7 +716,7 @@ void CMeasureNet::InitializeNewApi() } } - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { UpdateIFTable(); } diff --git a/Library/MeasurePlugin.cpp b/Library/MeasurePlugin.cpp index bc2c69ed..55c534bc 100644 --- a/Library/MeasurePlugin.cpp +++ b/Library/MeasurePlugin.cpp @@ -123,7 +123,7 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section) if (m_Plugin == NULL) { - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { LogWithArgs(LOG_ERROR, L"Plugin: Unable to load \"%s\" (%u)", m_PluginName.c_str(), err); } @@ -140,7 +140,7 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section) if (m_Plugin == NULL) { - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { LogWithArgs(LOG_ERROR, L"Plugin: Unable to load \"%s\" (%u)", pluginName.c_str(), err); } @@ -175,14 +175,9 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section) m_ID = id++; if (InitializeFunc) { - // Remove current directory from DLL search path - SetDllDirectory(L""); - double maxValue; maxValue = InitializeFunc(m_Plugin, parser.GetFilename().c_str(), section, m_ID); - // Reset to default - SetDllDirectory(L""); CSystem::ResetWorkingDirectory(); const std::wstring& szMaxValue = parser.ReadString(section, L"MaxValue", L""); diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index 6635f331..cecfb059 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -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) { diff --git a/Library/MeterWindow.h b/Library/MeterWindow.h index c92a1e43..cf3afa5c 100644 --- a/Library/MeterWindow.h +++ b/Library/MeterWindow.h @@ -148,7 +148,6 @@ enum BANGCOMMAND BANG_DISABLEMEASUREGROUP, BANG_UPDATEMEASUREGROUP, - BANG_LSHOOK, BANG_PLUGIN, BANG_SETVARIABLE, BANG_SETOPTION, diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index b4115ba0..d4fe1f12 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -35,9 +35,6 @@ using namespace Gdiplus; CRainmeter* Rainmeter; // The module -bool CRainmeter::c_DummyLitestep = false; -std::wstring CRainmeter::c_CmdLine; - /* ** ParseString ** @@ -137,61 +134,6 @@ std::vector CRainmeter::ParseString(LPCTSTR str) return result; } -/* -** initModuleEx -** -** This is called when the plugin is initialized -** -*/ -int initModuleEx(HWND ParentWnd, HINSTANCE dllInst, LPCSTR szPath) -{ - int result = 1; - - try - { - Rainmeter = new CRainmeter; - - if (Rainmeter) - { - result = Rainmeter->Initialize(ParentWnd, dllInst, szPath); - } - } - catch (CError& error) - { - MessageBox(ParentWnd, error.GetString().c_str(), APPNAME, MB_OK | MB_TOPMOST | MB_ICONEXCLAMATION); - } - - return result; -} - -/* -** quitModule -** -** This is called when the plugin quits. -** -*/ -void quitModule(HINSTANCE dllInst) -{ - if (Rainmeter) - { - Rainmeter->Quit(dllInst); - delete Rainmeter; - Rainmeter = NULL; - } -} - -/* -** Initialize -** -** Init Rainmeter -** -*/ -void Initialize(bool DummyLS, LPCTSTR CmdLine) -{ - CRainmeter::SetDummyLitestep(DummyLS); - CRainmeter::SetCommandLine(CmdLine); -} - /* ** ExecuteBang ** @@ -201,7 +143,7 @@ void Initialize(bool DummyLS, LPCTSTR CmdLine) */ void ExecuteBang(LPCTSTR szBang) { - if (Rainmeter && szBang) + if (szBang) { // ExecuteBang needs to be delayed since it crashes if done during processing. // The receiver must free a given string buffer (lParam) by using free(). @@ -409,15 +351,7 @@ void BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs) if (meterWindow) { - if (bang == BANG_LSHOOK) - { - // LsHook is a special case - meterWindow->RunBang(bang, arg); - } - else - { - meterWindow->RunBang(bang, argument.c_str()); - } + meterWindow->RunBang(bang, argument.c_str()); } else { @@ -481,819 +415,13 @@ void BangGroupWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs) } } - -// ----------------------------------------------------------------------------------------------- -// -// Callbacks for Litestep -// -// ----------------------------------------------------------------------------------------------- - -/* -** RainmeterHide -** -** Callback for the !RainmeterHide bang -** -*/ -void RainmeterHide(HWND, const char* arg) -{ - BangWithArgs(BANG_HIDE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterShow -** -** Callback for the !RainmeterShow bang -** -*/ -void RainmeterShow(HWND, const char* arg) -{ - BangWithArgs(BANG_SHOW, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterToggle -** -** Callback for the !RainmeterToggle bang -** -*/ -void RainmeterToggle(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterHideFade -** -** Callback for the !RainmeterHideFade bang -** -*/ -void RainmeterHideFade(HWND, const char* arg) -{ - BangWithArgs(BANG_HIDEFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterShowFade -** -** Callback for the !RainmeterShowFade bang -** -*/ -void RainmeterShowFade(HWND, const char* arg) -{ - BangWithArgs(BANG_SHOWFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterToggleFade -** -** Callback for the !RainmeterToggleFade bang -** -*/ -void RainmeterToggleFade(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterHideBlur -** -** Callback for the !RainmeterHideBlur bang -** -*/ -void RainmeterHideBlur(HWND, const char* arg) -{ - BangWithArgs(BANG_HIDEBLUR, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterShowBlur -** -** Callback for the !RainmeterShowBlur bang -** -*/ -void RainmeterShowBlur(HWND, const char* arg) -{ - BangWithArgs(BANG_SHOWBLUR, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterToggleBlur -** -** Callback for the !RainmeterToggleBlur bang -** -*/ -void RainmeterToggleBlur(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEBLUR, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterAddBlur -** -** Callback for the !RainmeterAddBlur bang -** -*/ -void RainmeterAddBlur(HWND, const char* arg) -{ - BangWithArgs(BANG_ADDBLUR, ConvertToWide(arg).c_str(), 1); -} - - -/* -** RainmeterRemoveBlur -** -** Callback for the !RainmeterRemoveBlur bang -** -*/ -void RainmeterRemoveBlur(HWND, const char* arg) -{ - BangWithArgs(BANG_REMOVEBLUR, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterHideMeter -** -** Callback for the !RainmeterHideMeter bang -** -*/ -void RainmeterHideMeter(HWND, const char* arg) -{ - BangWithArgs(BANG_HIDEMETER, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterShowMeter -** -** Callback for the !RainmeterShowMeter bang -** -*/ -void RainmeterShowMeter(HWND, const char* arg) -{ - BangWithArgs(BANG_SHOWMETER, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterToggleMeter -** -** Callback for the !RainmeterToggleMeter bang -** -*/ -void RainmeterToggleMeter(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEMETER, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterMoveMeter -** -** Callback for the !RainmeterMoveMeter bang -** -*/ -void RainmeterMoveMeter(HWND, const char* arg) -{ - BangWithArgs(BANG_MOVEMETER, ConvertToWide(arg).c_str(), 3); -} - -/* -** RainmeterUpdateMeter -** -** Callback for the !RainmeterUpdateMeter bang -** -*/ -void RainmeterUpdateMeter(HWND, const char* arg) -{ - BangWithArgs(BANG_UPDATEMETER, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterDisableMeasure -** -** Callback for the !RainmeterDisableMeasure bang -** -*/ -void RainmeterDisableMeasure(HWND, const char* arg) -{ - BangWithArgs(BANG_DISABLEMEASURE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterEnableMeasure -** -** Callback for the !RainmeterEnableMeasure bang -** -*/ -void RainmeterEnableMeasure(HWND, const char* arg) -{ - BangWithArgs(BANG_ENABLEMEASURE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterToggleMeasure -** -** Callback for the !RainmeterToggleMeasure bang -** -*/ -void RainmeterToggleMeasure(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEMEASURE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterUpdateMeasure -** -** Callback for the !RainmeterUpdateMeasure bang -** -*/ -void RainmeterUpdateMeasure(HWND, const char* arg) -{ - BangWithArgs(BANG_UPDATEMEASURE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterCommandMeasure -** -** Callback for the !RainmeterCommandMeasure bang -** -*/ -void RainmeterCommandMeasure(HWND, const char* arg) -{ - BangWithArgs(BANG_COMMANDMEASURE, ConvertToWide(arg).c_str(), 2); -} - -/* -** RainmeterRefresh -** -** Callback for the !RainmeterRefresh bang -** -*/ -void RainmeterRefresh(HWND, const char* arg) -{ - BangWithArgs(BANG_REFRESH, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterRefreshApp -** -** Callback for the !RainmeterRefreshApp bang -** -*/ -void RainmeterRefreshApp(HWND, const char* arg) -{ - RainmeterRefreshAppWide(); -} - -/* -** RainmeterRedraw -** -** Callback for the !RainmeterRedraw bang -** -*/ -void RainmeterRedraw(HWND, const char* arg) -{ - BangWithArgs(BANG_REDRAW, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterUpdate -** -** Callback for the !RainmeterUpdate bang -** -*/ -void RainmeterUpdate(HWND, const char* arg) -{ - BangWithArgs(BANG_UPDATE, ConvertToWide(arg).c_str(), 0); -} - /* ** RainmeterActivateConfig ** ** Callback for the !RainmeterActivateConfig bang ** */ -void RainmeterActivateConfig(HWND, const char* arg) -{ - RainmeterActivateConfigWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterDeactivateConfig -** -** Callback for the !RainmeterDeactivateConfig bang -** -*/ -void RainmeterDeactivateConfig(HWND, const char* arg) -{ - RainmeterDeactivateConfigWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterToggleConfig -** -** Callback for the !RainmeterToggleConfig bang -** -*/ -void RainmeterToggleConfig(HWND, const char* arg) -{ - RainmeterToggleConfigWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterMove -** -** Callback for the !RainmeterMove bang -** -*/ -void RainmeterMove(HWND, const char* arg) -{ - BangWithArgs(BANG_MOVE, ConvertToWide(arg).c_str(), 2); -} - -/* -** RainmeterZPos -** -** Callback for the !RainmeterZPos bang -** -*/ -void RainmeterZPos(HWND, const char* arg) -{ - BangWithArgs(BANG_ZPOS, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterClickThrough -** -** Callback for the !RainmeterClickThrough bang -** -*/ -void RainmeterClickThrough(HWND, const char* arg) -{ - BangWithArgs(BANG_CLICKTHROUGH, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterDraggable -** -** Callback for the !RainmeterDraggable bang -** -*/ -void RainmeterDraggable(HWND, const char* arg) -{ - BangWithArgs(BANG_DRAGGABLE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSnapEdges -** -** Callback for the !RainmeterSnapEdges bang -** -*/ -void RainmeterSnapEdges(HWND, const char* arg) -{ - BangWithArgs(BANG_SNAPEDGES, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterKeepOnScreen -** -** Callback for the !RainmeterKeepOnScreen bang -** -*/ -void RainmeterKeepOnScreen(HWND, const char* arg) -{ - BangWithArgs(BANG_KEEPONSCREEN, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSetTransparency -** -** Callback for the !RainmeterSetTransparency bang -** -*/ -void RainmeterSetTransparency(HWND, const char* arg) -{ - BangWithArgs(BANG_SETTRANSPARENCY, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSetVariable -** -** Callback for the !RainmeterSetVariable bang -** -*/ -void RainmeterSetVariable(HWND, const char* arg) -{ - BangWithArgs(BANG_SETVARIABLE, ConvertToWide(arg).c_str(), 2); -} - -/* -** RainmeterSetOption -** -** Callback for the !RainmeterSetOption bang -** -*/ -void RainmeterSetOption(HWND, const char* arg) -{ - BangWithArgs(BANG_SETOPTION, ConvertToWide(arg).c_str(), 3); -} - -/* -** RainmeterHideGroup -** -** Callback for the !RainmeterHideGroup bang -** -*/ -void RainmeterHideGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_HIDE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterShowGroup -** -** Callback for the !RainmeterShowGroup bang -** -*/ -void RainmeterShowGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SHOW, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterToggleGroup -** -** Callback for the !RainmeterToggleGroup bang -** -*/ -void RainmeterToggleGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_TOGGLE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterHideFadeGroup -** -** Callback for the !RainmeterHideFadeGroup bang -** -*/ -void RainmeterHideFadeGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_HIDEFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterShowFadeGroup -** -** Callback for the !RainmeterShowFadeGroup bang -** -*/ -void RainmeterShowFadeGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SHOWFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterToggleFadeGroup -** -** Callback for the !RainmeterToggleFadeGroup bang -** -*/ -void RainmeterToggleFadeGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_TOGGLEFADE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterHideMeterGroup -** -** Callback for the !RainmeterHideMeterGroup bang -** -*/ -void RainmeterHideMeterGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_HIDEMETERGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterShowMeterGroup -** -** Callback for the !RainmeterShowMeterGroup bang -** -*/ -void RainmeterShowMeterGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_SHOWMETERGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterToggleMeterGroup -** -** Callback for the !RainmeterToggleMeterGroup bang -** -*/ -void RainmeterToggleMeterGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEMETERGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterUpdateMeterGroup -** -** Callback for the !RainmeterUpdateMeterGroup bang -** -*/ -void RainmeterUpdateMeterGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_UPDATEMETERGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterDisableMeasureGroup -** -** Callback for the !RainmeterDisableMeasureGroup bang -** -*/ -void RainmeterDisableMeasureGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_DISABLEMEASUREGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterEnableMeasureGroup -** -** Callback for the !RainmeterEnableMeasureGroup bang -** -*/ -void RainmeterEnableMeasureGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_ENABLEMEASUREGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterToggleMeasureGroup -** -** Callback for the !RainmeterToggleMeasureGroup bang -** -*/ -void RainmeterToggleMeasureGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_TOGGLEMEASUREGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterUpdateMeasureGroup -** -** Callback for the !RainmeterUpdateMeasureGroup bang -** -*/ -void RainmeterUpdateMeasureGroup(HWND, const char* arg) -{ - BangWithArgs(BANG_UPDATEMEASUREGROUP, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterRefreshGroup -** -** Callback for the !RainmeterRefreshGroup bang -** -*/ -void RainmeterRefreshGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_REFRESH, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterRedrawGroup -** -** Callback for the !RainmeterRedrawGroup bang -** -*/ -void RainmeterRedrawGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_REDRAW, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterUpdateGroup -** -** Callback for the !RainmeterUpdateGroup bang -** -*/ -void RainmeterUpdateGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_UPDATE, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterDeactivateConfigGroup -** -** Callback for the !RainmeterDeactivateConfigGroup bang -** -*/ -void RainmeterDeactivateConfigGroup(HWND, const char* arg) -{ - RainmeterDeactivateConfigGroupWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterZPosGroup -** -** Callback for the !RainmeterZPosGroup bang -** -*/ -void RainmeterZPosGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_ZPOS, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterClickThroughGroup -** -** Callback for the !RainmeterClickThroughGroup bang -** -*/ -void RainmeterClickThroughGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_CLICKTHROUGH, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterDraggableGroup -** -** Callback for the !RainmeterDraggableGroup bang -** -*/ -void RainmeterDraggableGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_DRAGGABLE, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSnapEdgesGroup -** -** Callback for the !RainmeterSnapEdgesGroup bang -** -*/ -void RainmeterSnapEdgesGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SNAPEDGES, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterKeepOnScreenGroup -** -** Callback for the !RainmeterKeepOnScreenGroup bang -** -*/ -void RainmeterKeepOnScreenGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_KEEPONSCREEN, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSetTransparencyGroup -** -** Callback for the !RainmeterSetTransparencyGroup bang -** -*/ -void RainmeterSetTransparencyGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SETTRANSPARENCY, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterSetVariableGroup -** -** Callback for the !RainmeterSetVariableGroup bang -** -*/ -void RainmeterSetVariableGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SETVARIABLE, ConvertToWide(arg).c_str(), 2); -} -/* -** RainmeterSetOptionGroup -** -** Callback for the !RainmeterSetOptionGroup bang -** -*/ -void RainmeterSetOptionGroup(HWND, const char* arg) -{ - BangGroupWithArgs(BANG_SETOPTION, ConvertToWide(arg).c_str(), 3); -} - -/* -** RainmeterLsHook -** -** Callback for the !RainmeterLsHook bang -** -*/ -void RainmeterLsHook(HWND, const char* arg) -{ - BangWithArgs(BANG_LSHOOK, ConvertToWide(arg).c_str(), 0); -} - -/* -** RainmeterAbout -** -** Callback for the !RainmeterAbout bang -** -*/ -void RainmeterAbout(HWND, const char* arg) -{ - RainmeterAboutWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterManage -** -** Callback for the !RainmeterManage bang -** -*/ -void RainmeterManage(HWND, const char* arg) -{ - RainmeterManageWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterSkinMenu -** -** Callback for the !RainmeterSkinMenu bang -** -*/ -void RainmeterSkinMenu(HWND, const char* arg) -{ - RainmeterSkinMenuWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterTrayMenu -** -** Callback for the !RainmeterTrayMenu bang -** -*/ -void RainmeterTrayMenu(HWND, const char* arg) -{ - RainmeterTrayMenuWide(); -} - -/* -** RainmeterResetStats -** -** Callback for the !RainmeterResetStats bang -** -*/ -void RainmeterResetStats(HWND, const char* arg) -{ - RainmeterResetStatsWide(); -} - -/* -** RainmeterWriteKeyValue -** -** Callback for the !RainmeterWriteKeyValue bang -** -*/ -void RainmeterWriteKeyValue(HWND, const char* arg) -{ - RainmeterWriteKeyValueWide(ConvertToWide(arg).c_str()); -} - -/* -** RainmeterPluginBang -** -** Callback for the !RainmeterPluginBang bang -** -*/ -void RainmeterPluginBang(HWND, const char* arg) -{ - BangWithArgs(BANG_PLUGIN, ConvertToWide(arg).c_str(), 1); -} - -/* -** RainmeterQuit -** -** Callback for the !RainmeterQuit bang -** -*/ -void RainmeterQuit(HWND, const char* arg) -{ - RainmeterQuitWide(); -} - - -// ----------------------------------------------------------------------------------------------- -// -// Callbacks for Unicode support -// -// ----------------------------------------------------------------------------------------------- - -/* -** RainmeterActivateConfigWide -** -** Callback for the !RainmeterActivateConfig bang -** -*/ -void RainmeterActivateConfigWide(const WCHAR* arg) +void RainmeterActivateConfig(const WCHAR* arg) { if (Rainmeter) { @@ -1318,12 +446,12 @@ void RainmeterActivateConfigWide(const WCHAR* arg) } /* -** RainmeterDeactivateConfigWide +** RainmeterDeactivateConfig ** ** Callback for the !RainmeterDeactivateConfig bang ** */ -void RainmeterDeactivateConfigWide(const WCHAR* arg) +void RainmeterDeactivateConfig(const WCHAR* arg) { if (Rainmeter) { @@ -1347,12 +475,12 @@ void RainmeterDeactivateConfigWide(const WCHAR* arg) } /* -** RainmeterToggleConfigWide +** RainmeterToggleConfig ** ** Callback for the !RainmeterToggleConfig bang ** */ -void RainmeterToggleConfigWide(const WCHAR* arg) +void RainmeterToggleConfig(const WCHAR* arg) { if (Rainmeter) { @@ -1368,7 +496,7 @@ void RainmeterToggleConfigWide(const WCHAR* arg) } // If the config wasn't active, activate it - RainmeterActivateConfigWide(arg); + RainmeterActivateConfig(arg); } else { @@ -1378,12 +506,12 @@ void RainmeterToggleConfigWide(const WCHAR* arg) } /* -** RainmeterDeactivateConfigGroupWide +** RainmeterDeactivateConfigGroup ** ** Callback for the !RainmeterDeactivateConfigGroup bang ** */ -void RainmeterDeactivateConfigGroupWide(const WCHAR* arg) +void RainmeterDeactivateConfigGroup(const WCHAR* arg) { if (Rainmeter) { @@ -1408,12 +536,12 @@ void RainmeterDeactivateConfigGroupWide(const WCHAR* arg) } /* -** RainmeterRefreshAppWide +** RainmeterRefreshApp ** ** Callback for the !RainmeterRefreshApp bang ** */ -void RainmeterRefreshAppWide() +void RainmeterRefreshApp() { if (Rainmeter) { @@ -1423,12 +551,12 @@ void RainmeterRefreshAppWide() } /* -** RainmeterAboutWide +** RainmeterAbout ** ** Callback for the !RainmeterAbout bang ** */ -void RainmeterAboutWide(const WCHAR* arg) +void RainmeterAbout(const WCHAR* arg) { if (Rainmeter) { @@ -1454,12 +582,12 @@ void RainmeterAboutWide(const WCHAR* arg) } /* -** RainmeterManageWide +** RainmeterManage ** ** Callback for the !RainmeterManage bang ** */ -void RainmeterManageWide(const WCHAR* arg) +void RainmeterManage(const WCHAR* arg) { if (Rainmeter) { @@ -1481,12 +609,12 @@ void RainmeterManageWide(const WCHAR* arg) } /* -** RainmeterSkinMenuWide +** RainmeterSkinMenu ** ** Callback for the !RainmeterSkinMenu bang ** */ -void RainmeterSkinMenuWide(const WCHAR* arg) +void RainmeterSkinMenu(const WCHAR* arg) { if (Rainmeter) { @@ -1528,12 +656,12 @@ void RainmeterTrayMenuWide() } /* -** RainmeterResetStatsWide +** RainmeterResetStats ** ** Callback for the !RainmeterResetStats bang ** */ -void RainmeterResetStatsWide() +void RainmeterResetStats() { if (Rainmeter) { @@ -1542,12 +670,12 @@ void RainmeterResetStatsWide() } /* -** RainmeterWriteKeyValueWide +** RainmeterWriteKeyValue ** ** Callback for the !RainmeterWriteKeyValue bang ** */ -void RainmeterWriteKeyValueWide(const WCHAR* arg) +void RainmeterWriteKeyValue(const WCHAR* arg) { if (Rainmeter) { @@ -1601,11 +729,11 @@ void RainmeterWriteKeyValueWide(const WCHAR* arg) if (temporary) { - if (CRainmeter::GetDebug()) LogWithArgs(LOG_DEBUG, L"!WriteKeyValue: Writing to: %s (Temp: %s)", iniFile.c_str(), iniWrite.c_str()); + if (Rainmeter->GetDebug()) LogWithArgs(LOG_DEBUG, L"!WriteKeyValue: Writing to: %s (Temp: %s)", iniFile.c_str(), iniWrite.c_str()); } else { - if (CRainmeter::GetDebug()) LogWithArgs(LOG_DEBUG, L"!WriteKeyValue: Writing to: %s", iniFile.c_str()); + if (Rainmeter->GetDebug()) LogWithArgs(LOG_DEBUG, L"!WriteKeyValue: Writing to: %s", iniFile.c_str()); iniWrite = iniFile; } @@ -1679,12 +807,12 @@ void RainmeterWriteKeyValueWide(const WCHAR* arg) } /* -** RainmeterQuitWide +** RainmeterQuit ** ** Callback for the !RainmeterQuit bang ** */ -void RainmeterQuitWide() +void RainmeterQuit() { if (Rainmeter) { @@ -1700,9 +828,6 @@ void RainmeterQuitWide() // // ----------------------------------------------------------------------------------------------- -GlobalConfig CRainmeter::c_GlobalConfig = {0}; -bool CRainmeter::c_Debug = false; - /* ** CRainmeter ** @@ -1711,6 +836,7 @@ bool CRainmeter::c_Debug = false; */ CRainmeter::CRainmeter() : m_TrayWindow(), + m_Debug(false), m_DisableVersionCheck(false), m_NewVersion(false), m_DesktopWorkAreaChanged(false), @@ -1722,7 +848,8 @@ CRainmeter::CRainmeter() : m_CurrentParser(), m_Instance(), m_ResourceInstance(), - m_GDIplusToken() + m_GDIplusToken(), + m_GlobalConfig() { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); @@ -1777,16 +904,11 @@ CRainmeter::~CRainmeter() ** May throw CErrors !!!! ** */ -int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) +int CRainmeter::Initialize(HWND hParent, HINSTANCE hInstance, LPCWSTR szPath) { int result = 0; - if (Parent == NULL || Instance == NULL) - { - throw CError(L"Null parameter"); - } - - m_Instance = Instance; + m_Instance = hInstance; WCHAR* tmpSzPath = new WCHAR[MAX_LINE_LENGTH]; GetModuleFileName(m_Instance, tmpSzPath, MAX_LINE_LENGTH); @@ -1804,40 +926,21 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) m_Path = tmpSzPath; - wcscat(tmpSzPath, L"Language.dll"); + wcscat(tmpSzPath, L"Languages\\English.dll"); m_ResourceInstance = LoadLibraryEx(tmpSzPath, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE); if (!m_ResourceInstance) { - throw CError(L"Unable to load Language.dll"); + throw CError(L"Unable to load English.dll"); } InitalizeLitestep(); bool bDefaultIniLocation = false; - if (c_CmdLine.empty()) - { - m_IniFile = m_Path; - m_IniFile += L"Rainmeter.ini"; - - // If the ini file doesn't exist in the program folder store it to the %APPDATA% instead so that things work better in Vista/Win7 - if (_waccess(m_IniFile.c_str(), 0) == -1) - { - m_IniFile = L"%APPDATA%\\Rainmeter\\Rainmeter.ini"; - ExpandEnvironmentVariables(m_IniFile); - bDefaultIniLocation = true; - - // 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); - } - } - } - else + if (*szPath) { // The command line defines the location of Rainmeter.ini (or whatever it calls it). - std::wstring iniFile = c_CmdLine; + std::wstring iniFile = szPath; if (iniFile[0] == L'\"') { if (iniFile.length() == 1) @@ -1876,6 +979,25 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) } bDefaultIniLocation = true; } + else + { + m_IniFile = m_Path; + m_IniFile += L"Rainmeter.ini"; + + // If the ini file doesn't exist in the program folder store it to the %APPDATA% instead so that things work better in Vista/Win7 + if (_waccess(m_IniFile.c_str(), 0) == -1) + { + m_IniFile = L"%APPDATA%\\Rainmeter\\Rainmeter.ini"; + ExpandEnvironmentVariables(m_IniFile); + bDefaultIniLocation = true; + + // 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); + } + } + } // Set the log file and stats file location m_LogFile = m_StatsFile = m_IniFile; @@ -1893,7 +1015,7 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) // Read Logging settings beforehand m_Logging = 0!=GetPrivateProfileInt(L"Rainmeter", L"Logging", 0, m_IniFile.c_str()); - c_Debug = 0!=GetPrivateProfileInt(L"Rainmeter", L"Debug", 0, m_IniFile.c_str()); + m_Debug = 0!=GetPrivateProfileInt(L"Rainmeter", L"Debug", 0, m_IniFile.c_str()); if (m_Logging) { @@ -1964,38 +1086,6 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) delete [] tmpSzPath; tmpSzPath = NULL; - if (!c_DummyLitestep) - { - char* tmpSz = new char[MAX_LINE_LENGTH]; - - // Check if step.rc has overrides these values - if (GetRCString("RainmeterIniFile", tmpSz, NULL, MAX_LINE_LENGTH - 1)) - { - m_IniFile = ConvertToWide(tmpSz); - } - - if (GetRCString("RainmeterSkinPath", tmpSz, NULL, MAX_LINE_LENGTH - 1)) - { - m_SkinPath = ConvertToWide(tmpSz); - } - - if (GetRCString("RainmeterPluginPath", tmpSz, NULL, MAX_LINE_LENGTH - 1)) - { - m_PluginPath = ConvertToWide(tmpSz); - } - - delete [] tmpSz; - - if (!m_SkinPath.empty()) - { - WCHAR ch = m_SkinPath[m_SkinPath.size() - 1]; - if (ch != L'\\' && ch != L'/') - { - m_SkinPath += L"\\"; - } - } - } - LogWithArgs(LOG_NOTICE, L"Path: %s", m_Path.c_str()); LogWithArgs(LOG_NOTICE, L"IniFile: %s", m_IniFile.c_str()); LogWithArgs(LOG_NOTICE, L"SkinPath: %s", m_SkinPath.c_str()); @@ -2026,10 +1116,10 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) // Test that the Rainmeter.ini file is writable TestSettingsFile(bDefaultIniLocation); - CSystem::Initialize(Instance); + CSystem::Initialize(hInstance); CMeasureNet::InitializeNewApi(); - if (c_Debug) + if (m_Debug) { Log(LOG_DEBUG, L"Enumerating installed font families..."); CMeterString::EnumerateInstalledFontFamilies(); @@ -2065,92 +1155,27 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) UpdateDesktopWorkArea(false); } - // If we're running as Litestep's plugin, register the !bangs - if (!c_DummyLitestep) - { - int Msgs[] = { LM_GETREVID, 0 }; - // Register RevID message to Litestep - if (m_TrayWindow && m_TrayWindow->GetWindow()) ::SendMessage(GetLitestepWnd(), LM_REGISTERMESSAGE, (WPARAM)m_TrayWindow->GetWindow(), (LPARAM)Msgs); - - AddBangCommand("!RainmeterRefresh", RainmeterRefresh); - AddBangCommand("!RainmeterRedraw", RainmeterRedraw); - AddBangCommand("!RainmeterUpdate", RainmeterUpdate); - AddBangCommand("!RainmeterHide", RainmeterHide); - AddBangCommand("!RainmeterShow", RainmeterShow); - AddBangCommand("!RainmeterToggle", RainmeterToggle); - AddBangCommand("!RainmeterHideFade", RainmeterHideFade); - AddBangCommand("!RainmeterShowFade", RainmeterShowFade); - AddBangCommand("!RainmeterToggleFade", RainmeterToggleFade); - AddBangCommand("!RainmeterHideBlur", RainmeterHideBlur); - AddBangCommand("!RainmeterShowBlur", RainmeterShowBlur); - AddBangCommand("!RainmeterToggleBlur", RainmeterToggleBlur); - AddBangCommand("!RainmeterAddBlur", RainmeterAddBlur); - AddBangCommand("!RainmeterRemoveBlur", RainmeterRemoveBlur); - AddBangCommand("!RainmeterHideMeter", RainmeterHideMeter); - AddBangCommand("!RainmeterShowMeter", RainmeterShowMeter); - AddBangCommand("!RainmeterToggleMeter", RainmeterToggleMeter); - AddBangCommand("!RainmeterMoveMeter", RainmeterMoveMeter); - AddBangCommand("!RainmeterUpdateMeter", RainmeterUpdateMeter); - AddBangCommand("!RainmeterDisableMeasure", RainmeterDisableMeasure); - AddBangCommand("!RainmeterEnableMeasure", RainmeterEnableMeasure); - AddBangCommand("!RainmeterToggleMeasure", RainmeterToggleMeasure); - AddBangCommand("!RainmeterUpdateMeasure", RainmeterUpdateMeasure); - AddBangCommand("!RainmeterActivateConfig", RainmeterActivateConfig); - AddBangCommand("!RainmeterDeactivateConfig", RainmeterDeactivateConfig); - AddBangCommand("!RainmeterToggleConfig", RainmeterToggleConfig); - AddBangCommand("!RainmeterMove", RainmeterMove); - AddBangCommand("!RainmeterZPos", RainmeterZPos); - AddBangCommand("!RainmeterClickThrough", RainmeterClickThrough); - AddBangCommand("!RainmeterDraggable", RainmeterDraggable); - AddBangCommand("!RainmeterSnapEdges", RainmeterSnapEdges); - AddBangCommand("!RainmeterKeepOnScreen", RainmeterKeepOnScreen); - AddBangCommand("!RainmeterSetTransparency", RainmeterSetTransparency); - AddBangCommand("!RainmeterSetVariable", RainmeterSetVariable); - - AddBangCommand("!RainmeterRefreshGroup", RainmeterRefreshGroup); - AddBangCommand("!RainmeterRedrawGroup", RainmeterRedrawGroup); - AddBangCommand("!RainmeterUpdateGroup", RainmeterUpdateGroup); - AddBangCommand("!RainmeterHideGroup", RainmeterHideGroup); - AddBangCommand("!RainmeterShowGroup", RainmeterShowGroup); - AddBangCommand("!RainmeterToggleGroup", RainmeterToggleGroup); - AddBangCommand("!RainmeterHideFadeGroup", RainmeterHideFadeGroup); - AddBangCommand("!RainmeterShowFadeGroup", RainmeterShowFadeGroup); - AddBangCommand("!RainmeterToggleFadeGroup", RainmeterToggleFadeGroup); - AddBangCommand("!RainmeterHideMeterGroup", RainmeterHideMeterGroup); - AddBangCommand("!RainmeterShowMeterGroup", RainmeterShowMeterGroup); - AddBangCommand("!RainmeterToggleMeterGroup", RainmeterToggleMeterGroup); - AddBangCommand("!RainmeterUpdateMeterGroup", RainmeterUpdateMeterGroup); - AddBangCommand("!RainmeterDisableMeasureGroup", RainmeterDisableMeasureGroup); - AddBangCommand("!RainmeterEnableMeasureGroup", RainmeterEnableMeasureGroup); - AddBangCommand("!RainmeterToggleMeasureGroup", RainmeterToggleMeasureGroup); - AddBangCommand("!RainmeterUpdateMeasureGroup", RainmeterUpdateMeasureGroup); - AddBangCommand("!RainmeterDeactivateConfigGroup", RainmeterDeactivateConfigGroup); - AddBangCommand("!RainmeterZPosGroup", RainmeterZPosGroup); - AddBangCommand("!RainmeterClickThroughGroup", RainmeterClickThroughGroup); - AddBangCommand("!RainmeterDraggableGroup", RainmeterDraggableGroup); - AddBangCommand("!RainmeterSnapEdgesGroup", RainmeterSnapEdgesGroup); - AddBangCommand("!RainmeterKeepOnScreenGroup", RainmeterKeepOnScreenGroup); - AddBangCommand("!RainmeterSetTransparencyGroup", RainmeterSetTransparencyGroup); - AddBangCommand("!RainmeterSetVariableGroup", RainmeterSetVariableGroup); - - AddBangCommand("!RainmeterRefreshApp", RainmeterRefreshApp); - AddBangCommand("!RainmeterLsBoxHook", RainmeterLsHook); - AddBangCommand("!RainmeterAbout", RainmeterAbout); - AddBangCommand("!RainmeterManage", RainmeterManage); - AddBangCommand("!RainmeterSkinMenu", RainmeterSkinMenu); - AddBangCommand("!RainmeterTrayMenu", RainmeterTrayMenu); - AddBangCommand("!RainmeterResetStats", RainmeterResetStats); - AddBangCommand("!RainmeterWriteKeyValue", RainmeterWriteKeyValue); - AddBangCommand("!RainmeterPluginBang", RainmeterPluginBang); - AddBangCommand("!RainmeterQuit", RainmeterQuit); - } - // Create meter windows for active configs ActivateActiveConfigs(); return result; // Alles OK } +/* +** Quit +** +** Quits Rainmeter. +** +*/ +void CRainmeter::Quit() +{ + if (Rainmeter) + { + delete Rainmeter; + Rainmeter = NULL; + } +} + /* ** CreateDefaultConfigFile ** @@ -2505,95 +1530,6 @@ int CRainmeter::GetLoadOrder(const std::wstring& config) return 0; } -/* -** Quit -** -** Called when the module quits -** -*/ -void CRainmeter::Quit(HINSTANCE dllInst) -{ - // If we're running as Litestep's plugin, unregister the !bangs - if (!c_DummyLitestep) - { - int Msgs[] = { LM_GETREVID, 0 }; - // Unregister RevID message - if (m_TrayWindow && m_TrayWindow->GetWindow()) ::SendMessage(GetLitestepWnd(), LM_UNREGISTERMESSAGE, (WPARAM)m_TrayWindow->GetWindow(), (LPARAM)Msgs); - - RemoveBangCommand("!RainmeterRefresh"); - RemoveBangCommand("!RainmeterRedraw"); - RemoveBangCommand("!RainmeterUpdate"); - RemoveBangCommand("!RainmeterHide"); - RemoveBangCommand("!RainmeterShow"); - RemoveBangCommand("!RainmeterToggle"); - RemoveBangCommand("!RainmeterHideFade"); - RemoveBangCommand("!RainmeterShowFade"); - RemoveBangCommand("!RainmeterToggleFade"); - RemoveBangCommand("!RainmeterHideBlur"); - RemoveBangCommand("!RainmeterShowBlur"); - RemoveBangCommand("!RainmeterToggleBlur"); - RemoveBangCommand("!RainmeterAddBlur"); - RemoveBangCommand("!RainmeterRemoveBlur"); - RemoveBangCommand("!RainmeterHideMeter"); - RemoveBangCommand("!RainmeterShowMeter"); - RemoveBangCommand("!RainmeterToggleMeter"); - RemoveBangCommand("!RainmeterMoveMeter"); - RemoveBangCommand("!RainmeterUpdateMeter"); - RemoveBangCommand("!RainmeterHideMeasure"); - RemoveBangCommand("!RainmeterShowMeasure"); - RemoveBangCommand("!RainmeterToggleMeasure"); - RemoveBangCommand("!RainmeterUpdateMeasure"); - RemoveBangCommand("!RainmeterActivateConfig"); - RemoveBangCommand("!RainmeterDeactivateConfig"); - RemoveBangCommand("!RainmeterToggleConfig"); - RemoveBangCommand("!RainmeterMove"); - RemoveBangCommand("!RainmeterZPos"); - RemoveBangCommand("!RainmeterClickThrough"); - RemoveBangCommand("!RainmeterDraggable"); - RemoveBangCommand("!RainmeterSnapEdges"); - RemoveBangCommand("!RainmeterKeepOnScreen"); - RemoveBangCommand("!RainmeterSetTransparency"); - RemoveBangCommand("!RainmeterSetVariable"); - - RemoveBangCommand("!RainmeterRefreshGroup"); - RemoveBangCommand("!RainmeterRedrawGroup"); - RemoveBangCommand("!RainmeterUpdateGroup"); - RemoveBangCommand("!RainmeterHideGroup"); - RemoveBangCommand("!RainmeterShowGroup"); - RemoveBangCommand("!RainmeterToggleGroup"); - RemoveBangCommand("!RainmeterHideFadeGroup"); - RemoveBangCommand("!RainmeterShowFadeGroup"); - RemoveBangCommand("!RainmeterToggleFadeGroup"); - RemoveBangCommand("!RainmeterHideMeterGroup"); - RemoveBangCommand("!RainmeterShowMeterGroup"); - RemoveBangCommand("!RainmeterToggleMeterGroup"); - RemoveBangCommand("!RainmeterUpdateMeterGroup"); - RemoveBangCommand("!RainmeterHideMeasureGroup"); - RemoveBangCommand("!RainmeterShowMeasureGroup"); - RemoveBangCommand("!RainmeterToggleMeasureGroup"); - RemoveBangCommand("!RainmeterUpdateMeasureGroup"); - RemoveBangCommand("!RainmeterDeactivateConfigGroup"); - RemoveBangCommand("!RainmeterZPosGroup"); - RemoveBangCommand("!RainmeterClickThroughGroup"); - RemoveBangCommand("!RainmeterDraggableGroup"); - RemoveBangCommand("!RainmeterSnapEdgesGroup"); - RemoveBangCommand("!RainmeterKeepOnScreenGroup"); - RemoveBangCommand("!RainmeterSetTransparencyGroup"); - RemoveBangCommand("!RainmeterSetVariableGroup"); - - RemoveBangCommand("!RainmeterRefreshApp"); - RemoveBangCommand("!RainmeterLsBoxHook"); - RemoveBangCommand("!RainmeterAbout"); - RemoveBangCommand("!RainmeterManage"); - RemoveBangCommand("!RainmeterSkinMenu"); - RemoveBangCommand("!RainmeterTrayMenu"); - RemoveBangCommand("!RainmeterResetStats"); - RemoveBangCommand("!RainmeterWriteKeyValue"); - RemoveBangCommand("!RainmeterPluginBang"); - RemoveBangCommand("!RainmeterQuit"); - } -} - /* ** ScanForConfigs ** @@ -2749,7 +1685,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"RefreshApp") == 0) { - RainmeterRefreshAppWide(); + RainmeterRefreshApp(); } else if (_wcsicmp(name, L"Redraw") == 0) { @@ -2845,15 +1781,15 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"ActivateConfig") == 0) { - RainmeterActivateConfigWide(arg.c_str()); + RainmeterActivateConfig(arg.c_str()); } else if (_wcsicmp(name, L"DeactivateConfig") == 0) { - RainmeterDeactivateConfigWide(arg.c_str()); + RainmeterDeactivateConfig(arg.c_str()); } else if (_wcsicmp(name, L"ToggleConfig") == 0) { - RainmeterToggleConfigWide(arg.c_str()); + RainmeterToggleConfig(arg.c_str()); } else if (_wcsicmp(name, L"Move") == 0) { @@ -2961,7 +1897,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"DeactivateConfigGroup") == 0) { - RainmeterDeactivateConfigGroupWide(arg.c_str()); + RainmeterDeactivateConfigGroup(arg.c_str()); } else if (_wcsicmp(name, L"ZPosGroup") == 0) { @@ -2997,15 +1933,15 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"About") == 0) { - RainmeterAboutWide(arg.c_str()); + RainmeterAbout(arg.c_str()); } else if (_wcsicmp(name, L"Manage") == 0) { - RainmeterManageWide(arg.c_str()); + RainmeterManage(arg.c_str()); } else if (_wcsicmp(name, L"SkinMenu") == 0) { - RainmeterSkinMenuWide(arg.c_str()); + RainmeterSkinMenu(arg.c_str()); } else if (_wcsicmp(name, L"TrayMenu") == 0) { @@ -3013,11 +1949,11 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"ResetStats") == 0) { - RainmeterResetStatsWide(); + RainmeterResetStats(); } else if (_wcsicmp(name, L"WriteKeyValue") == 0) { - RainmeterWriteKeyValueWide(arg.c_str()); + RainmeterWriteKeyValue(arg.c_str()); } else if (_wcsicmp(name, L"PluginBang") == 0) { @@ -3029,7 +1965,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg, } else if (_wcsicmp(name, L"Quit") == 0) { - RainmeterQuitWide(); + RainmeterQuit(); } else if (_wcsicmp(bang.c_str(), L"!Execute") == 0) { @@ -3170,7 +2106,7 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow) { command = strCommand.c_str(); - if (command[0] == L'!' && Rainmeter->GetDummyLitestep()) // Bangs + if (command[0] == L'!') // Bang { if (meterWindow) { @@ -3246,7 +2182,7 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow) } // Run command - LSExecute(NULL, command, SW_SHOWNORMAL); + RunCommand(NULL, command, SW_SHOWNORMAL); } } } @@ -3269,7 +2205,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) // Read Logging settings m_Logging = 0!=parser.ReadInt(L"Rainmeter", L"Logging", 0); - c_Debug = 0!=parser.ReadInt(L"Rainmeter", L"Debug", 0); + m_Debug = 0!=parser.ReadInt(L"Rainmeter", L"Debug", 0); if (m_Logging) { @@ -3281,8 +2217,8 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) m_TrayWindow->ReadConfig(parser); } - c_GlobalConfig.netInSpeed = parser.ReadFloat(L"Rainmeter", L"NetInSpeed", 0.0); - c_GlobalConfig.netOutSpeed = parser.ReadFloat(L"Rainmeter", L"NetOutSpeed", 0.0); + m_GlobalConfig.netInSpeed = parser.ReadFloat(L"Rainmeter", L"NetInSpeed", 0.0); + m_GlobalConfig.netOutSpeed = parser.ReadFloat(L"Rainmeter", L"NetOutSpeed", 0.0); m_DisableDragging = 0!=parser.ReadInt(L"Rainmeter", L"DisableDragging", 0); m_DisableRDP = 0!=parser.ReadInt(L"Rainmeter", L"DisableRDP", 0); @@ -3333,7 +2269,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) m_LogViewer.append(L"\""); } - if (c_Debug) + if (m_Debug) { LogWithArgs(LOG_NOTICE, L"ConfigEditor: %s", m_ConfigEditor.c_str()); LogWithArgs(LOG_NOTICE, L"LogViewer: %s", m_LogViewer.c_str()); @@ -3368,37 +2304,6 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) m_DesktopWorkAreaType = 0!=parser.ReadInt(L"Rainmeter", L"DesktopWorkAreaType", 0); - // Check which configs are active - if (!c_DummyLitestep) - { - char* tmpSz = new char[MAX_LINE_LENGTH]; - std::wstring skinName; - std::wstring skinIni = L"Rainmeter.ini"; - - // Check if step.rc has overrides these values - if (GetRCString("RainmeterCurrentConfig", tmpSz, "", MAX_LINE_LENGTH - 1)) - { - skinName = ConvertToWide(tmpSz); - } - - if (GetRCString("RainmeterCurrentConfigIni", tmpSz, "Rainmeter.ini", MAX_LINE_LENGTH - 1)) - { - skinIni = ConvertToWide(tmpSz); - } - - delete [] tmpSz; - - if (!skinName.empty()) - { - if (!SetActiveConfig(skinName, skinIni)) - { - std::wstring error = GetFormattedString(ID_STR_UNABLETOACTIVATESKIN, skinName.c_str(), skinIni.c_str()); - MessageBox(NULL, error.c_str(), APPNAME, MB_OK | MB_TOPMOST | MB_ICONEXCLAMATION); - } - return; - } - } - for (int i = 0, isize = (int)m_ConfigStrings.size(); i < isize; ++i) { int active = parser.ReadInt(m_ConfigStrings[i].config.c_str(), L"Active", 0); @@ -3409,32 +2314,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) m_ConfigStrings[i].active = active; } - int order; - if (parser.IsSectionDefined(m_ConfigStrings[i].config.c_str())) - { - std::wstring orderStr = parser.ReadString(m_ConfigStrings[i].config.c_str(), L"LoadOrder", L"", false); - if (orderStr.empty()) - { - order = 0; - } - else if (_wcsicmp(orderStr.c_str(), L"LAST") == 0) - { - order = INT_MAX; - } - else if (_wcsicmp(orderStr.c_str(), L"FIRST") == 0) - { - order = INT_MIN; - } - else - { - order = _wtoi(orderStr.c_str()); - } - } - else - { - order = 0; - } - + int order = parser.ReadInt(m_ConfigStrings[i].config.c_str(), L"LoadOrder", 0); SetLoadOrder(i, order); } } @@ -3586,6 +2466,9 @@ void CRainmeter::LoadTheme(const std::wstring& name) theme += L"\\Rainmeter.thm"; CSystem::CopyFiles(theme, Rainmeter->GetIniFile()); + /* + TODO fix me + */ PreserveSetting(backup, L"SkinPath"); PreserveSetting(backup, L"ConfigEditor"); PreserveSetting(backup, L"LogViewer"); @@ -3643,7 +2526,7 @@ void CRainmeter::UpdateDesktopWorkArea(bool reset) BOOL result = SystemParametersInfo(SPI_SETWORKAREA, 0, &r, 0); - if (c_Debug) + if (m_Debug) { std::wstring format = L"Resetting WorkArea@%i: L=%i, T=%i, R=%i, B=%i (W=%i, H=%i)"; if (!result) @@ -3670,7 +2553,7 @@ void CRainmeter::UpdateDesktopWorkArea(bool reset) } } - if (c_Debug) + if (m_Debug) { LogWithArgs(LOG_DEBUG, L"DesktopWorkAreaType: %s", m_DesktopWorkAreaType ? L"Margin" : L"Default"); } @@ -3710,7 +2593,7 @@ void CRainmeter::UpdateDesktopWorkArea(bool reset) changed = true; } - if (c_Debug) + if (m_Debug) { std::wstring format = L"Applying DesktopWorkArea"; if (i != 0) @@ -3828,29 +2711,20 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow) { SetMenuDefaultItem(subMenu, ID_CONTEXT_MANAGE, MF_BYCOMMAND); - if (!GetDummyLitestep()) + if (_waccess(m_LogFile.c_str(), 0) == -1) { - // Disable Quit/Logging if ran as a Litestep plugin - EnableMenuItem(subMenu, ID_CONTEXT_QUIT, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(subMenu, 10, MF_BYPOSITION | MF_GRAYED); // "Logging" menu + EnableMenuItem(subMenu, ID_CONTEXT_SHOWLOGFILE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, ID_CONTEXT_DELETELOGFILE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); } else { - if (_waccess(m_LogFile.c_str(), 0) == -1) - { - EnableMenuItem(subMenu, ID_CONTEXT_SHOWLOGFILE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(subMenu, ID_CONTEXT_DELETELOGFILE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(subMenu, ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); - } - else - { - EnableMenuItem(subMenu, (m_Logging) ? ID_CONTEXT_STARTLOG : ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); - } + EnableMenuItem(subMenu, (m_Logging) ? ID_CONTEXT_STARTLOG : ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); + } - if (c_Debug) - { - CheckMenuItem(subMenu, ID_CONTEXT_DEBUGLOG, MF_BYCOMMAND | MF_CHECKED); - } + if (m_Debug) + { + CheckMenuItem(subMenu, ID_CONTEXT_DEBUGLOG, MF_BYCOMMAND | MF_CHECKED); } HMENU configMenu = GetSubMenu(subMenu, 4); @@ -4057,11 +2931,6 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con if (meterWindow->GetXPercentage()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_XPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); if (meterWindow->GetYPercentage()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_YPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); - if (!c_DummyLitestep) - { - EnableMenuItem(posMenu, ID_CONTEXT_SKINMENU_ONDESKTOP, MF_BYCOMMAND | MF_GRAYED); - } - HMENU monitorMenu = GetSubMenu(posMenu, 0); if (monitorMenu) { @@ -4367,7 +3236,7 @@ void CRainmeter::SetLogging(bool logging) void CRainmeter::SetDebug(bool debug) { - c_Debug = debug; + m_Debug = debug; WritePrivateProfileString(L"Rainmeter", L"Debug", debug ? L"1" : L"0", m_IniFile.c_str()); } diff --git a/Library/Rainmeter.h b/Library/Rainmeter.h index 696e7441..71140d89 100644 --- a/Library/Rainmeter.h +++ b/Library/Rainmeter.h @@ -39,95 +39,19 @@ #define WIDEN(x) WIDEN2(x) #define APPDATE WIDEN(__DATE__) -// Callbacks for Litestep -void RainmeterRefresh(HWND, const char* arg); -void RainmeterRefreshApp(HWND, const char* arg); -void RainmeterRedraw(HWND, const char* arg); -void RainmeterUpdate(HWND, const char* arg); -void RainmeterShow(HWND, const char* arg); -void RainmeterHide(HWND, const char* arg); -void RainmeterToggle(HWND, const char* arg); -void RainmeterShowFade(HWND, const char* arg); -void RainmeterHideFade(HWND, const char* arg); -void RainmeterToggleFade(HWND, const char* arg); -void RainmeterShowBlur(HWND, const char* arg); -void RainmeterHideBlur(HWND, const char* arg); -void RainmeterToggleBlur(HWND, const char* arg); -void RainmeterAddBlur(HWND, const char* arg); -void RainmeterRemoveBlur(HWND, const char* arg); -void RainmeterShowMeter(HWND, const char* arg); -void RainmeterHideMeter(HWND, const char* arg); -void RainmeterToggleMeter(HWND, const char* arg); -void RainmeterMoveMeter(HWND, const char* arg); -void RainmeterUpdateMeter(HWND, const char* arg); -void RainmeterEnableMeasure(HWND, const char* arg); -void RainmeterDisableMeasure(HWND, const char* arg); -void RainmeterToggleMeasure(HWND, const char* arg); -void RainmeterUpdateMeasure(HWND, const char* arg); -void RainmeterCommandMeasure(HWND, const char* arg); -void RainmeterActivateConfig(HWND, const char* arg); -void RainmeterDeactivateConfig(HWND, const char* arg); -void RainmeterToggleConfig(HWND, const char* arg); -void RainmeterMove(HWND, const char* arg); -void RainmeterZPos(HWND, const char* arg); -void RainmeterClickThrough(HWND, const char* arg); -void RainmeterDraggable(HWND, const char* arg); -void RainmeterSnapEdges(HWND, const char* arg); -void RainmeterKeepOnScreen(HWND, const char* arg); -void RainmeterSetTransparency(HWND, const char* arg); -void RainmeterSetVariable(HWND, const char* arg); -void RainmeterSetOption(HWND, const char* arg); - -void RainmeterRefreshGroup(HWND, const char* arg); -void RainmeterRedrawGroup(HWND, const char* arg); -void RainmeterUpdateGroup(HWND, const char* arg); -void RainmeterShowGroup(HWND, const char* arg); -void RainmeterHideGroup(HWND, const char* arg); -void RainmeterToggleGroup(HWND, const char* arg); -void RainmeterShowFadeGroup(HWND, const char* arg); -void RainmeterHideFadeGroup(HWND, const char* arg); -void RainmeterToggleFadeGroup(HWND, const char* arg); -void RainmeterShowMeterGroup(HWND, const char* arg); -void RainmeterHideMeterGroup(HWND, const char* arg); -void RainmeterToggleMeterGroup(HWND, const char* arg); -void RainmeterUpdateMeterGroup(HWND, const char* arg); -void RainmeterEnableMeasureGroup(HWND, const char* arg); -void RainmeterDisableMeasureGroup(HWND, const char* arg); -void RainmeterToggleMeasureGroup(HWND, const char* arg); -void RainmeterUpdateMeasureGroup(HWND, const char* arg); -void RainmeterDeactivateConfigGroup(HWND, const char* arg); -void RainmeterZPosGroup(HWND, const char* arg); -void RainmeterClickThroughGroup(HWND, const char* arg); -void RainmeterDraggableGroup(HWND, const char* arg); -void RainmeterSnapEdgesGroup(HWND, const char* arg); -void RainmeterKeepOnScreenGroup(HWND, const char* arg); -void RainmeterSetTransparencyGroup(HWND, const char* arg); -void RainmeterSetVariableGroup(HWND, const char* arg); -void RainmeterSetOptionGroup(HWND, const char* arg); - -void RainmeterLsHook(HWND, const char* arg); -void RainmeterAbout(HWND, const char* arg); -void RainmeterManage(HWND, const char* arg); -void RainmeterSkinMenu(HWND, const char* arg); -void RainmeterTrayMenu(HWND, const char* arg); -void RainmeterResetStats(HWND, const char* arg); -void RainmeterWriteKeyValue(HWND, const char* arg); -void RainmeterPluginBang(HWND, const char* arg); -void RainmeterQuit(HWND, const char* arg); - -// Callbacks for Unicode support -void RainmeterActivateConfigWide(const WCHAR* arg); -void RainmeterDeactivateConfigWide(const WCHAR* arg); -void RainmeterToggleConfigWide(const WCHAR* arg); -void RainmeterDeactivateConfigGroupWide(const WCHAR* arg); -void RainmeterRefreshAppWide(); -void RainmeterAboutWide(const WCHAR* arg = NULL); -void RainmeterManageWide(const WCHAR* arg = NULL); -void RainmeterSkinMenuWide(const WCHAR* arg); +// Callbacks +void RainmeterActivateConfig(const WCHAR* arg); +void RainmeterDeactivateConfig(const WCHAR* arg); +void RainmeterToggleConfig(const WCHAR* arg); +void RainmeterDeactivateConfigGroup(const WCHAR* arg); +void RainmeterRefreshApp(); +void RainmeterAbout(const WCHAR* arg = NULL); +void RainmeterManage(const WCHAR* arg = NULL); +void RainmeterSkinMenu(const WCHAR* arg); void RainmeterTrayMenuWide(); -void RainmeterResetStatsWide(); -void RainmeterWriteKeyValueWide(const WCHAR* arg); -void RainmeterQuitWide(); +void RainmeterResetStats(); +void RainmeterWriteKeyValue(const WCHAR* arg); +void RainmeterQuit(); void BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs); void BangGroupWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs); @@ -169,8 +93,8 @@ public: CRainmeter(); ~CRainmeter(); - int Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath); - void Quit(HINSTANCE dllInst); + int Initialize(HWND hParent, HINSTANCE hInstance, LPCWSTR szPath); + static void Quit(); CConfigParser* GetCurrentParser() { return m_CurrentParser; } void SetCurrentParser(CConfigParser* parser) { m_CurrentParser = parser; } @@ -208,13 +132,9 @@ public: HINSTANCE GetInstance() { return m_Instance; } HINSTANCE GetResourceInstance() { return m_ResourceInstance; } - static void SetDummyLitestep(bool Dummy) { c_DummyLitestep = Dummy; } - static bool GetDummyLitestep() { return c_DummyLitestep; } - static void SetCommandLine(LPCTSTR CmdLine) { c_CmdLine = CmdLine;} - static LPCTSTR GetCommandLine() { return c_CmdLine.c_str(); } - static GlobalConfig& GetGlobalConfig() { return c_GlobalConfig; } + bool GetDebug() { return m_Debug; } - static bool GetDebug() { return c_Debug; } + GlobalConfig& GetGlobalConfig() { return m_GlobalConfig; } void ReloadSettings(); @@ -319,6 +239,8 @@ private: std::wstring m_TrayExecuteDR; std::wstring m_TrayExecuteDM; + bool m_Debug; + bool m_DisableVersionCheck; bool m_NewVersion; @@ -349,24 +271,9 @@ private: std::list m_DelayDeleteList; - static bool c_DummyLitestep; // true, if not a Litestep plugin - static std::wstring c_CmdLine; // The command line arguments - static GlobalConfig c_GlobalConfig; - static bool c_Debug; + GlobalConfig m_GlobalConfig; }; -#ifdef LIBRARY_EXPORTS -#define EXPORT_PLUGIN __declspec(dllexport) -#else -#define EXPORT_PLUGIN __declspec(dllimport) -#endif - -extern "C" -{ - EXPORT_PLUGIN int initModuleEx(HWND ParentWnd, HINSTANCE dllInst, LPCSTR szPath); - EXPORT_PLUGIN void quitModule(HINSTANCE dllInst); - EXPORT_PLUGIN void Initialize(bool DummyLS, LPCTSTR CmdLine); - EXPORT_PLUGIN void ExecuteBang(LPCTSTR szBang); -} +void ExecuteBang(LPCTSTR szBang); #endif diff --git a/Library/Res/window.ico b/Library/Res/window.ico index 97bd22c698ddba04f1d0834648044326192ee3c1..cb2e5558cdb998a7b4a4c61223f11420d97eb2e5 100644 GIT binary patch literal 85182 zcmeHQ2V4}#_uo52Of;6L(Vt0#7>zZSSYnNWMvX1@9>rdWkzhv+*n0t$4$`~yUIgr2 zjIlSO(fBusF-8+qVE^CmatFtGr=XxnZa$xPv$Hol<-M6V@4b0DD+n?{U$C|o5E}`N zD#(Q4f*`bPnVa@+AP7I;o{^CvT~!c1X)Y6L*Un9^eM=Bdd?6F6;y$0BUQQ5(_m&Bb zPzH+RP3b-_bwP R_q5&|yG_0UZW(7|>xrhXEZ1bQsWKK!<@cjsa-FP_hL9+Ohym zS$GfdKAlp+3L}@B!d|fEs{Gfbsx6fG)gQ7$ChX1L^>14rvGI4j2p=510b@ z7GMEb0GJQ>9$*IGe`5jt09^nr07ii70FEI!Ko?3M21xTNGMUT>aT`EifGJ=OU=?6n z)vE8gHE-U+&&0$eq(_e);l{=$5lx$Z8djk~vwi!HJ1#D+e|vd( z{}UJ(^dvGeQjCg<5*Y^u20r%m^m^##=JxlF9d>sXEwVf}Wy+M}efsoCMpvOGr8&JPq zz4}uuEf**H`T74#`XnSIh|$r}FGT0Ujt!R2y5i&GL?0iYhx6vmKdq-{5RUfv0=)I~ z^f(SECs0P9e!+373&n#0^3^JOdgc0n?vcU4!A}ws6Q%iCSo#%LKJo>w6Rh9gKOob> zV(yPWevy6|!skmGT~Ns}h6#(ck*l$0o~*+r#ibaa%&BRG$h zYd&M92`{oYuLwC}Wv{kMRj3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!GRYD8x<9YTr~W4$IZjX($Km^^^AXnY1{wPS z%6t#kGWLn%x~PHW14mpBU|sROlz4%U==qSVi*f4^+NdM34zWdT3J zh7B7j=SuVVW!tW78_QD!NhTpZ3&RKajOZd7=iIO|&K5-D$AXpd1EH&NrclfHwklLX zI;@uQgZ^EOA6T|9e%xfd@#FgAjk9Z{7-!c`G0s_LWt@ZOMH9d>fFD2v{3;q#4kPn5 z0u)6KljdDyGo^$#)LRdL^YC^oP!+Or?|tTj9? zVC@f$iwa+TF~M^KpX0iz1j+#@=k(r~U^CQlLDTbLkx}Ol!~`z7mgs&{`J5uYfSBz$ zb|TJi4W57cB@Gma`|0~)g6AV&isHFDh^+w9egXQR2b}arK8=b6`n3_@l^*A7kdd&{ z1kb&v-cH!=rz6jg>i3z({f~fy>&Vko)BlP*Dag0*8UOD>85)focy1WrBB0VUo^OZ$ ze*x52&4V=g;TgaR)%%*Rk;f5GKp;kXJb=$v(e#Y!J>>ZWa2L>>_Yv0wuuTJ1^F8Yt zc`X3P70>^GYrZF5Xq^Lj+24ZzhRc8^&#F(;e|V-NfPU+nH2q(gdw6y@K&!7g%eZG4 xY@AUg*f`Zd1$qS=r~Mjid=T*K!C>PXTY`=M2K%SRuf`02E>n0Ma0S1`7kjIUswxnjYgCf$dQqj43Pt D=DP^G diff --git a/Library/System.cpp b/Library/System.cpp index b282640d..085b22bd 100644 --- a/Library/System.cpp +++ b/Library/System.cpp @@ -99,11 +99,6 @@ void CSystem::Initialize(HINSTANCE instance) instance, NULL); -#ifndef _WIN64 - SetWindowLong(c_Window, GWL_USERDATA, magicDWord); - SetWindowLong(c_HelperWindow, GWL_USERDATA, magicDWord); -#endif - SetWindowPos(c_Window, HWND_BOTTOM, 0, 0, 0, 0, ZPOS_FLAGS); SetWindowPos(c_HelperWindow, HWND_BOTTOM, 0, 0, 0, 0, ZPOS_FLAGS); @@ -172,7 +167,7 @@ BOOL CALLBACK MyInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonit info.cbSize = sizeof(MONITORINFOEX); GetMonitorInfo(hMonitor, &info); - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { Log(LOG_DEBUG, info.szDevice); LogWithArgs(LOG_DEBUG, L" Flags : %s(0x%08X)", (info.dwFlags & MONITORINFOF_PRIMARY) ? L"PRIMARY " : L"", info.dwFlags); @@ -256,7 +251,7 @@ size_t CSystem::GetMonitorCount() void CSystem::SetMultiMonitorInfo() { std::vector& monitors = c_Monitors.monitors; - bool logging = CRainmeter::GetDebug(); + bool logging = Rainmeter->GetDebug(); c_Monitors.vsT = GetSystemMetrics(SM_YVIRTUALSCREEN); c_Monitors.vsL = GetSystemMetrics(SM_XVIRTUALSCREEN); @@ -532,7 +527,7 @@ void CSystem::UpdateWorkareaInfo() monitors[i].work = info.rcWork; - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { LogWithArgs(LOG_DEBUG, L"WorkArea@%i : L=%i, T=%i, R=%i, B=%i (W=%i, H=%i)", (int)i + 1, @@ -651,7 +646,7 @@ bool CSystem::BelongToSameProcess(HWND hwndA, HWND hwndB) */ BOOL CALLBACK MyEnumWindowsProc(HWND hwnd, LPARAM lParam) { - bool logging = CRainmeter::GetDebug() && DEBUG_VERBOSE; + bool logging = Rainmeter->GetDebug() && DEBUG_VERBOSE; WCHAR className[64]; CMeterWindow* Window; WCHAR flag; @@ -703,7 +698,7 @@ void CSystem::ChangeZPosInOrder() { if (Rainmeter) { - bool logging = CRainmeter::GetDebug() && DEBUG_VERBOSE; + bool logging = Rainmeter->GetDebug() && DEBUG_VERBOSE; std::vector windowsInZOrder; if (logging) Log(LOG_DEBUG, L"1: ----- BEFORE -----"); @@ -752,7 +747,7 @@ void CSystem::ChangeZPosInOrder() */ void CSystem::PrepareHelperWindow(HWND WorkerW) { - bool logging = CRainmeter::GetDebug() && DEBUG_VERBOSE; + bool logging = Rainmeter->GetDebug() && DEBUG_VERBOSE; SetWindowPos(c_Window, HWND_BOTTOM, 0, 0, 0, 0, ZPOS_FLAGS); // always on bottom @@ -837,7 +832,7 @@ bool CSystem::CheckDesktopState(HWND WorkerW) { c_ShowDesktop = !c_ShowDesktop; - if (CRainmeter::GetDebug()) + if (Rainmeter->GetDebug()) { LogWithArgs(LOG_DEBUG, L"System: \"Show %s\" has been detected.", c_ShowDesktop ? L"desktop" : L"open windows"); @@ -1049,38 +1044,30 @@ ULONGLONG CSystem::GetTickCount64() ** ** This function is a wrapper function for LoadLibrary(). ** -** Avoids loading a DLL from current directory. ** */ HMODULE CSystem::RmLoadLibrary(LPCWSTR lpLibFileName, DWORD* dwError, bool ignoreErrors) { - HMODULE hLib = NULL; - DWORD err; UINT oldMode; - if (ignoreErrors) { oldMode = SetErrorMode(0); SetErrorMode(oldMode | SEM_FAILCRITICALERRORS); // Prevent the system from displaying message box } - // Remove current directory from DLL search path - SetDllDirectory(L""); - SetLastError(ERROR_SUCCESS); - hLib = LoadLibrary(lpLibFileName); - err = GetLastError(); + HMODULE hLib = LoadLibrary(lpLibFileName); + + if (dwError) + { + *dwError = GetLastError(); + } if (ignoreErrors) { SetErrorMode(oldMode); // Reset } - if (dwError) - { - *dwError = err; - } - return hLib; } diff --git a/Library/TrayWindow.cpp b/Library/TrayWindow.cpp index 18f69de8..f27a2ade 100644 --- a/Library/TrayWindow.cpp +++ b/Library/TrayWindow.cpp @@ -82,10 +82,6 @@ CTrayWindow::CTrayWindow(HINSTANCE instance) : m_Instance(instance), instance, this); -#ifndef _WIN64 - SetWindowLong(m_Window, GWL_USERDATA, magicDWord); -#endif - SetWindowPos(m_Window, HWND_BOTTOM, 0, 0, 0, 0, ZPOS_FLAGS); } @@ -428,11 +424,11 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } else if (wParam == ID_CONTEXT_SHOW_HELP) { - LSExecute(NULL, revision_beta ? RAINMETER_MANUALBETA : RAINMETER_MANUAL, SW_SHOWNORMAL); + RunCommand(NULL, revision_beta ? RAINMETER_MANUALBETA : RAINMETER_MANUAL, SW_SHOWNORMAL); } else if (wParam == ID_CONTEXT_NEW_VERSION) { - LSExecute(NULL, RAINMETER_OFFICIAL, SW_SHOWNORMAL); + RunCommand(NULL, RAINMETER_OFFICIAL, SW_SHOWNORMAL); } else if (wParam == ID_CONTEXT_REFRESH) { @@ -445,7 +441,7 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA if (_waccess(log.c_str(), 0) != -1) { std::wstring command = Rainmeter->GetLogViewer() + log; - LSExecute(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); + RunCommand(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); } } else if (wParam == ID_CONTEXT_STARTLOG) @@ -462,7 +458,7 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } else if (wParam == ID_CONTEXT_DEBUGLOG) { - Rainmeter->SetDebug(!CRainmeter::GetDebug()); + Rainmeter->SetDebug(!Rainmeter->GetDebug()); } else if (wParam == ID_CONTEXT_DISABLEDRAG) { @@ -473,18 +469,18 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA std::wstring command = Rainmeter->GetConfigEditor() + L" \""; command += Rainmeter->GetIniFile(); command += L"\""; - LSExecute(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); + RunCommand(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); } else if (wParam == ID_CONTEXT_QUIT) { - if (Rainmeter->GetDummyLitestep()) PostQuitMessage(0); - quitModule(Rainmeter->GetInstance()); + PostQuitMessage(0); + CRainmeter::Quit(); } else if (wParam == ID_CONTEXT_OPENSKINSFOLDER) { std::wstring command = L"\"" + Rainmeter->GetSkinPath(); command += L"\""; - LSExecute(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); + RunCommand(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); } else if ((wParam & 0x0ffff) >= ID_THEME_FIRST && (wParam & 0x0ffff) <= ID_THEME_LAST) { @@ -590,7 +586,7 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA GetCursorPos(&point); Rainmeter->ShowContextMenu(point, NULL); } - else if (uMouseMsg == WM_LBUTTONDOWN || uMouseMsg == WM_LBUTTONDBLCLK) + else if (uMouseMsg == WM_LBUTTONDOWN) { CDialogManage::Open(); } @@ -674,18 +670,6 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA return 0; } - else if (wParam == RAINMETER_QUERY_ID_COMMAND_LINE) - { - std::wstring commandline = Rainmeter->GetCommandLine(); - - cds.dwData = RAINMETER_QUERY_ID_COMMAND_LINE; - cds.cbData = (DWORD)((commandline.size() + 1) * sizeof(wchar_t)); - cds.lpData = (LPVOID) commandline.c_str(); - - SendMessage((HWND)lParam, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds); - - return 0; - } else if (wParam == RAINMETER_QUERY_ID_VERSION_CHECK) { UINT versioncheck = ((int)Rainmeter->GetDisableVersionCheck() * ((int)Rainmeter->GetDisableVersionCheck() + (int)Rainmeter->GetNewVersion())); @@ -788,9 +772,7 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } else if (wParam == RAINMETER_QUERY_ID_IS_LITESTEP) { - BOOL islitestep = !Rainmeter->GetDummyLitestep(); - - SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)islitestep); + SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)0); return 0; } @@ -842,29 +824,8 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA return 0; case WM_DESTROY: - if (Rainmeter->GetDummyLitestep()) PostQuitMessage(0); + PostQuitMessage(0); break; - - case LM_GETREVID: - if (lParam != NULL) - { - char* Buffer = (char*)lParam; - if (wParam == 0) - { - sprintf(Buffer, "Rainmeter.dll: %s", APPVERSION); - } - else if (wParam == 1) - { - sprintf(Buffer, "Rainmeter.dll: %s %s, Rainy", APPVERSION, __DATE__); - } - else - { - Buffer[0] = 0; - } - - return strlen(Buffer); - } - return 0; } return DefWindowProc(hWnd, uMsg, wParam, lParam); diff --git a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj index 2f16e0b6..31d5cd14 100644 --- a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj +++ b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginAdvancedCPU_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginAdvancedCPU_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/AdvancedCPU.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/AdvancedCPU.pdb .\x32/Release/AdvancedCPU.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginAdvancedCPU_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginAdvancedCPU_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/AdvancedCPU.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/AdvancedCPU.pdb .\x64/Release/AdvancedCPU.lib MachineX64 @@ -210,6 +210,7 @@ .\x32/Debug/AdvancedCPU.pdb .\x32/Debug/AdvancedCPU.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -249,6 +250,7 @@ .\x64/Debug/AdvancedCPU.pdb .\x64/Debug/AdvancedCPU.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj b/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj index 5a364dbe..73681a45 100644 --- a/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj +++ b/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj @@ -116,7 +116,7 @@ ../../TestBench/x32/Debug/Plugins/CoreTemp.dll true - %(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Debug/CoreTemp.pdb .\x32/Debug/CoreTemp.lib @@ -160,6 +160,7 @@ .\x64/Debug/CoreTemp.pdb .\x64/Debug/CoreTemp.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -175,7 +176,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginCoreTemp_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginCoreTemp_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -198,7 +199,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/CoreTemp.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/CoreTemp.pdb .\x32/Release/CoreTemp.lib @@ -222,7 +223,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginCoreTemp_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginCoreTemp_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -244,7 +245,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/CoreTemp.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) false .\x64/Release/CoreTemp.pdb .\x64/Release/CoreTemp.lib diff --git a/Plugins/PluginExample/PluginExample.vcxproj b/Plugins/PluginExample/PluginExample.vcxproj index de4c2e5e..ecb439a1 100644 --- a/Plugins/PluginExample/PluginExample.vcxproj +++ b/Plugins/PluginExample/PluginExample.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGINEXAMPLE_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGINEXAMPLE_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/ExamplePlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/ExamplePlugin.pdb .\x32/Release/ExamplePlugin.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGINEXAMPLE_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGINEXAMPLE_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/ExamplePlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/ExamplePlugin.pdb .\x64/Release/ExamplePlugin.lib MachineX64 @@ -210,6 +210,7 @@ .\x32/Debug/ExamplePlugin.pdb .\x32/Debug/ExamplePlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -249,6 +250,7 @@ .\x64/Debug/ExamplePlugin.pdb .\x64/Debug/ExamplePlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp b/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp index 7d473372..6e192ec6 100644 --- a/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp +++ b/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp @@ -65,7 +65,6 @@ typedef std::map MeasureIdMap; // measure ID -> MeasureInfo static MeasureIdMap sMeasures; typedef std::map FolderInfoMap; // FolderInfo -> ref count static FolderInfoMap sFolderRefCount; -static bool sInitialized = false; static MeasureInfo* GetMeasureInfo(UINT aId) { @@ -109,10 +108,6 @@ static FolderInfo* GetFolderInfo(const wchar_t* aPath, const wchar_t* aIniPath) */ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id) { - if (!sInitialized) { - sInitialized = true; - } - MeasureInfo* measureInfo = new MeasureInfo(section); const wchar_t* strFolder = ReadConfigString(section, L"Folder", L""); @@ -136,17 +131,17 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id) } const wchar_t* strIncludeSubFolders = ReadConfigString(section, L"IncludeSubFolders", L""); - if (_wcsicmp(strIncludeSubFolders, L"1") == 0) { + if (wcscmp(strIncludeSubFolders, L"1") == 0) { measureInfo->Folder->IncludeSubFolders(true); } const wchar_t* strShowHiddenFiles = ReadConfigString(section, L"IncludeHiddenFiles", L""); - if (_wcsicmp(strShowHiddenFiles, L"1") == 0) { + if (wcscmp(strShowHiddenFiles, L"1") == 0) { measureInfo->Folder->IncludeHiddenFiles(true); } const wchar_t* strShowSystemFiles = ReadConfigString(section, L"IncludeSystemFiles", L""); - if (_wcsicmp(strShowSystemFiles, L"1") == 0) { + if (wcscmp(strShowSystemFiles, L"1") == 0) { measureInfo->Folder->IncludeSystemFiles(true); } @@ -176,15 +171,17 @@ double Update2(UINT id) switch (measureInfo->Type) { - case INFOTYPE_FOLDERSIZE: - return (double)measureInfo->Folder->GetSize(); - break; - case INFOTYPE_FILECOUNT: - return measureInfo->Folder->GetFileCount(); - break; - case INFOTYPE_FOLDERCOUNT: - return measureInfo->Folder->GetFolderCount(); - break; + case INFOTYPE_FOLDERSIZE: + return (double)measureInfo->Folder->GetSize(); + break; + + case INFOTYPE_FILECOUNT: + return measureInfo->Folder->GetFileCount(); + break; + + case INFOTYPE_FOLDERCOUNT: + return measureInfo->Folder->GetFolderCount(); + break; } return 0; } diff --git a/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj b/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj index 070513bd..ca59548b 100644 --- a/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj +++ b/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj @@ -119,6 +119,7 @@ .\x32/Debug/FolderInfo.pdb .\x32/Debug/FolderInfo.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -158,6 +159,7 @@ .\x64/Debug/FolderInfo.pdb .\x64/Debug/FolderInfo.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -173,7 +175,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginFolderInfo_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginFolderInfo_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -196,7 +198,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/FolderInfo.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/FolderInfo.pdb .\x32/Release/FolderInfo.lib @@ -220,7 +222,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginFolderInfo_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginFolderInfo_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -242,7 +244,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/FolderInfo.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/FolderInfo.pdb .\x64/Release/FolderInfo.lib MachineX64 diff --git a/Plugins/PluginMediaKey/PluginMediaKey.vcxproj b/Plugins/PluginMediaKey/PluginMediaKey.vcxproj index ca547f4c..66d4fc9a 100644 --- a/Plugins/PluginMediaKey/PluginMediaKey.vcxproj +++ b/Plugins/PluginMediaKey/PluginMediaKey.vcxproj @@ -116,7 +116,7 @@ ../../TestBench/x32/Debug/Plugins/MediaKey.dll true - %(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Debug/MediaKey.pdb .\x32/Debug/MediaKey.lib @@ -160,6 +160,7 @@ .\x64/Debug/MediaKey.pdb .\x64/Debug/MediaKey.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -175,7 +176,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginMediaKey_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginMediaKey_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -198,7 +199,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/MediaKey.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/MediaKey.pdb .\x32/Release/MediaKey.lib @@ -222,7 +223,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginMediaKey_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginMediaKey_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -244,7 +245,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/MediaKey.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) false .\x64/Release/MediaKey.pdb .\x64/Release/MediaKey.lib diff --git a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj b/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj index aef59c00..35ea6fef 100644 --- a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj +++ b/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj @@ -117,12 +117,12 @@ ../../TestBench/x32/Debug/Plugins/NowPlaying.dll true - %(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Debug/NowPlaying.pdb .\x32/Debug/NowPlaying.lib MachineX86 - Psapi.lib;WinInet.lib;%(AdditionalDependencies) + Rainmeter.lib;Psapi.lib;WinInet.lib;%(AdditionalDependencies) @@ -163,7 +163,8 @@ .\x64/Debug/NowPlaying.pdb .\x64/Debug/NowPlaying.lib MachineX64 - Psapi.lib;WinInet.lib;%(AdditionalDependencies) + Rainmeter.lib;Psapi.lib;WinInet.lib;%(AdditionalDependencies) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -179,7 +180,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;PluginNowPlaying_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;PluginNowPlaying_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -204,7 +205,7 @@ Rainmeter.lib;Psapi.lib;WinInet.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/NowPlaying.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/NowPlaying.pdb .\x32/Release/NowPlaying.lib @@ -228,7 +229,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;PluginNowPlaying_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;PluginNowPlaying_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -252,7 +253,7 @@ Rainmeter.lib;Psapi.lib;WinInet.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/NowPlaying.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) false .\x64/Release/NowPlaying.pdb .\x64/Release/NowPlaying.lib diff --git a/Plugins/PluginPerfMon/PluginPerfMon.vcxproj b/Plugins/PluginPerfMon/PluginPerfMon.vcxproj index ecbce59d..89b6c2fb 100644 --- a/Plugins/PluginPerfMon/PluginPerfMon.vcxproj +++ b/Plugins/PluginPerfMon/PluginPerfMon.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPerfMon_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPerfMon_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/PerfMon.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/PerfMon.pdb .\x32/Release/PerfMon.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPerfMon_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPerfMon_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/PerfMon.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/PerfMon.pdb .\x64/Release/PerfMon.lib MachineX64 @@ -210,6 +210,7 @@ .\x32/Debug/PerfMon.pdb .\x32/Debug/PerfMon.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -249,6 +250,7 @@ .\x64/Debug/PerfMon.pdb .\x64/Debug/PerfMon.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginPing/PluginPing.vcxproj b/Plugins/PluginPing/PluginPing.vcxproj index 64dfe856..436c6c86 100644 --- a/Plugins/PluginPing/PluginPing.vcxproj +++ b/Plugins/PluginPing/PluginPing.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPing_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPing_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;Ws2_32.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/PingPlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/PingPlugin.pdb .\x32/Release/PingPlugin.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPing_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPing_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;Ws2_32.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/PingPlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/PingPlugin.pdb .\x64/Release/PingPlugin.lib MachineX64 @@ -204,13 +204,14 @@ 0x0409 - Ws2_32.lib;%(AdditionalDependencies) + Rainmeter.lib;Ws2_32.lib;%(AdditionalDependencies) ../../TestBench/x32/Debug/Plugins/PingPlugin.dll true true .\x32/Debug/PingPlugin.pdb .\x32/Debug/PingPlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -244,13 +245,14 @@ 0x0409 - Ws2_32.lib;%(AdditionalDependencies) + Rainmeter.lib;Ws2_32.lib;%(AdditionalDependencies) ../../TestBench/x64/Debug/Plugins/PingPlugin.dll true true .\x64/Debug/PingPlugin.pdb .\x64/Debug/PingPlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginPower/PluginPower.vcxproj b/Plugins/PluginPower/PluginPower.vcxproj index 54b39c12..674ffcf7 100644 --- a/Plugins/PluginPower/PluginPower.vcxproj +++ b/Plugins/PluginPower/PluginPower.vcxproj @@ -119,6 +119,7 @@ .\x32/Debug/PowerPlugin.pdb .\x32/Debug/PowerPlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -158,6 +159,7 @@ .\x64/Debug/PowerPlugin.pdb .\x64/Debug/PowerPlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -173,7 +175,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPower_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPower_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -196,7 +198,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/PowerPlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/PowerPlugin.pdb .\x32/Release/PowerPlugin.lib @@ -220,7 +222,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPower_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginPower_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -242,7 +244,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/PowerPlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/PowerPlugin.pdb .\x64/Release/PowerPlugin.lib MachineX64 diff --git a/Plugins/PluginQuote/PluginQuote.vcxproj b/Plugins/PluginQuote/PluginQuote.vcxproj index 990a98d7..03e3d3f5 100644 --- a/Plugins/PluginQuote/PluginQuote.vcxproj +++ b/Plugins/PluginQuote/PluginQuote.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginQuote_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginQuote_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/QuotePlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/QuotePlugin.pdb .\x32/Release/QuotePlugin.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginQuote_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginQuote_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/QuotePlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/QuotePlugin.pdb .\x64/Release/QuotePlugin.lib MachineX64 @@ -204,13 +204,14 @@ 0x0409 - shlwapi.lib;%(AdditionalDependencies) + Rainmeter.lib;shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Debug/Plugins/QuotePlugin.dll true true .\x32/Debug/QuotePlugin.pdb .\x32/Debug/QuotePlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -244,13 +245,14 @@ 0x0409 - shlwapi.lib;%(AdditionalDependencies) + Rainmeter.lib;shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Debug/Plugins/QuotePlugin.dll true true .\x64/Debug/QuotePlugin.pdb .\x64/Debug/QuotePlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj b/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj index 9be4bbc8..0a219fdd 100644 --- a/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj +++ b/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginRecycleManager_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/RecycleManager.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/RecycleManager.pdb false @@ -145,7 +145,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginRecycleManager_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginRecycleManager_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -167,7 +167,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/RecycleManager.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/RecycleManager.pdb false @@ -219,6 +219,7 @@ .\x32/Debug/RecycleManager.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -261,6 +262,7 @@ .\x64/Debug/RecycleManager.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginResMon/PluginResMon.vcxproj b/Plugins/PluginResMon/PluginResMon.vcxproj index e9d5256e..693f8749 100644 --- a/Plugins/PluginResMon/PluginResMon.vcxproj +++ b/Plugins/PluginResMon/PluginResMon.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginResMon_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginResMon_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;Psapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/ResMon.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/ResMon.pdb .\x32/Release/ResMon.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginResMon_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginResMon_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;Psapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/ResMon.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/ResMon.pdb .\x64/Release/ResMon.lib MachineX64 @@ -204,13 +204,14 @@ 0x0409 - Psapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Psapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Debug/Plugins/ResMon.dll true true .\x32/Debug/ResMon.pdb .\x32/Debug/ResMon.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -244,13 +245,14 @@ 0x0409 - Psapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Psapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Debug/Plugins/ResMon.dll true true .\x64/Debug/ResMon.pdb .\x64/Debug/ResMon.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj b/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj index e6748db3..c810f1c3 100644 --- a/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj +++ b/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSpeedFan_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSpeedFan_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/SpeedFanPlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/SpeedFanPlugin.pdb .\x32/Release/SpeedFanPlugin.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSpeedFan_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSpeedFan_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/SpeedFanPlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/SpeedFanPlugin.pdb .\x64/Release/SpeedFanPlugin.lib MachineX64 @@ -210,6 +210,7 @@ .\x32/Debug/SpeedFanPlugin.pdb .\x32/Debug/SpeedFanPlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -249,6 +250,7 @@ .\x64/Debug/SpeedFanPlugin.pdb .\x64/Debug/SpeedFanPlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginSysInfo/PluginSysInfo.vcxproj b/Plugins/PluginSysInfo/PluginSysInfo.vcxproj index 256e3b7f..b9864646 100644 --- a/Plugins/PluginSysInfo/PluginSysInfo.vcxproj +++ b/Plugins/PluginSysInfo/PluginSysInfo.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSysInfo_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSysInfo_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/SysInfo.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/SysInfo.pdb .\x32/Release/SysInfo.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSysInfo_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginSysInfo_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/SysInfo.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/SysInfo.pdb .\x64/Release/SysInfo.lib MachineX64 @@ -204,13 +204,14 @@ 0x0409 - Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Debug/Plugins/SysInfo.dll true true .\x32/Debug/SysInfo.pdb .\x32/Debug/SysInfo.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -244,13 +245,14 @@ 0x0409 - Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Debug/Plugins/SysInfo.dll true true .\x64/Debug/SysInfo.pdb .\x64/Debug/SysInfo.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj index 57c41d3e..98b0b9ff 100644 --- a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj +++ b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj @@ -95,7 +95,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginVirtualDesktops_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginVirtualDesktops_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -118,7 +118,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/VirtualDesktops.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/VirtualDesktops.pdb .\x32/Release/VirtualDesktops.lib @@ -142,7 +142,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginVirtualDesktops_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginVirtualDesktops_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -164,7 +164,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/VirtualDesktops.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/VirtualDesktops.pdb .\x64/Release/VirtualDesktops.lib MachineX64 @@ -210,6 +210,7 @@ .\x32/Debug/VirtualDesktops.pdb .\x32/Debug/VirtualDesktops.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -249,6 +250,7 @@ .\x64/Debug/VirtualDesktops.pdb .\x64/Debug/VirtualDesktops.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) diff --git a/Plugins/PluginWebParser/PluginWebParser.vcxproj b/Plugins/PluginWebParser/PluginWebParser.vcxproj index da4d6c46..8cb44a86 100644 --- a/Plugins/PluginWebParser/PluginWebParser.vcxproj +++ b/Plugins/PluginWebParser/PluginWebParser.vcxproj @@ -113,13 +113,14 @@ 0x0409 - Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Debug/Plugins/WebParser.dll true true .\x32/Debug/WebParser.pdb .\x32/Debug/WebParser.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -153,13 +154,14 @@ 0x0409 - Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) + Rainmeter.lib;Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Debug/Plugins/WebParser.dll true true .\x64/Debug/WebParser.pdb .\x64/Debug/WebParser.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -175,7 +177,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWebParser_EXPORTS;_SECURE_SCL=0;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWebParser_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -198,7 +200,7 @@ Rainmeter.lib;Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/WebParser.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/WebParser.pdb .\x32/Release/WebParser.lib @@ -222,7 +224,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWebParser_EXPORTS;_SECURE_SCL=0;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWebParser_EXPORTS;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -244,7 +246,7 @@ Rainmeter.lib;Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/WebParser.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/WebParser.pdb .\x64/Release/WebParser.lib MachineX64 diff --git a/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj b/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj index c96483ab..bc76f4e0 100644 --- a/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj +++ b/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj @@ -109,6 +109,7 @@ .\x32/Debug/WifiStatus.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -145,6 +146,7 @@ .\x64/Debug/WifiStatus.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -160,7 +162,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;WifiStatus_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;WifiStatus_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -183,7 +185,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/WifiStatus.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/WifiStatus.pdb false @@ -210,7 +212,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;WifiStatus_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;WifiStatus_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -234,7 +236,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/WifiStatus.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/WifiStatus.pdb false diff --git a/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj b/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj index 82a99cd0..f007a479 100644 --- a/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj +++ b/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj @@ -116,7 +116,7 @@ ../../TestBench/x32/Debug/Plugins/Win7AudioPlugin.dll true - ../../Library/x32/Debug;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Debug/Win7AudioPlugin.pdb .\x32/Debug/Win7AudioPlugin.lib @@ -160,6 +160,7 @@ .\x64/Debug/Win7AudioPlugin.pdb .\x64/Debug/Win7AudioPlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -175,7 +176,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWin7Audio_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWin7Audio_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -198,7 +199,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/Win7AudioPlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/Win7AudioPlugin.pdb .\x32/Release/Win7AudioPlugin.lib @@ -222,7 +223,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWin7Audio_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWin7Audio_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -244,7 +245,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/Win7AudioPlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) false .\x64/Release/Win7AudioPlugin.pdb .\x64/Release/Win7AudioPlugin.lib diff --git a/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj b/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj index 295a7ca9..318533c2 100644 --- a/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj +++ b/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj @@ -119,6 +119,7 @@ .\x32/Debug/WindowMessagePlugin.pdb .\x32/Debug/WindowMessagePlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -158,6 +159,7 @@ .\x64/Debug/WindowMessagePlugin.pdb .\x64/Debug/WindowMessagePlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -173,7 +175,7 @@ MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWindowMessage_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWindowMessage_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -196,7 +198,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/WindowMessagePlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/WindowMessagePlugin.pdb .\x32/Release/WindowMessagePlugin.lib @@ -220,7 +222,7 @@ /GL %(AdditionalOptions) MaxSpeed OnlyExplicitInline - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWindowMessage_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginWindowMessage_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -242,7 +244,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/WindowMessagePlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) .\x64/Release/WindowMessagePlugin.pdb .\x64/Release/WindowMessagePlugin.lib MachineX64 diff --git a/Plugins/PluginiTunes/PluginiTunes.vcxproj b/Plugins/PluginiTunes/PluginiTunes.vcxproj index eec9b409..48153e34 100644 --- a/Plugins/PluginiTunes/PluginiTunes.vcxproj +++ b/Plugins/PluginiTunes/PluginiTunes.vcxproj @@ -121,6 +121,7 @@ .\x32/Debug/iTunesPlugin.pdb .\x32/Debug/iTunesPlugin.lib MachineX86 + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) @@ -161,6 +162,7 @@ .\x64/Debug/iTunesPlugin.pdb .\x64/Debug/iTunesPlugin.lib MachineX64 + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) @@ -177,7 +179,7 @@ MaxSpeed OnlyExplicitInline iTunesCOMWindowsSDK;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginiTunes_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginiTunes_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -200,7 +202,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x32/Release/Plugins/iTunesPlugin.dll true - ..\..\Library\x32\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x32\$(Configuration);%(AdditionalLibraryDirectories) true .\x32/Release/iTunesPlugin.pdb .\x32/Release/iTunesPlugin.lib @@ -225,7 +227,7 @@ MaxSpeed OnlyExplicitInline iTunesCOMWindowsSDK;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginiTunes_EXPORTS;_SECURE_SCL=0;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PluginiTunes_EXPORTS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -247,7 +249,7 @@ Rainmeter.lib;%(AdditionalDependencies) ../../TestBench/x64/Release/Plugins/iTunesPlugin.dll true - ..\..\Library\x64\Release;%(AdditionalLibraryDirectories) + ..\..\Library\x64\$(Configuration);%(AdditionalLibraryDirectories) true .\x64/Release/iTunesPlugin.pdb .\x64/Release/iTunesPlugin.lib diff --git a/Rainmeter.sln b/Rainmeter.sln index a6f6d632..8b27ec93 100644 --- a/Rainmeter.sln +++ b/Rainmeter.sln @@ -1,11 +1,12 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "Application\Application.vcxproj", "{D2A0903C-E760-4134-AE61-3D55BF8F760C}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "Library\Library.vcxproj", "{BE9D2400-7F1C-49D6-8498-5CE495491AD6}" + ProjectSection(ProjectDependencies) = postProject + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A} = {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Language", "Language\Language.vcxproj", "{6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Library", "Library\Library.vcxproj", "{BE9D2400-7F1C-49D6-8498-5CE495491AD6}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginAdvancedCPU", "Plugins\PluginAdvancedCPU\PluginAdvancedCPU.vcxproj", "{EE8EC522-8430-4B46-86A3-D943D77F9E4B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginExample", "Plugins\PluginExample\PluginExample.vcxproj", "{761BAD94-EA54-4DBD-9FF0-50FDAFECBE93}" @@ -54,22 +55,6 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Debug|Win32.ActiveCfg = Debug|Win32 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Debug|Win32.Build.0 = Debug|Win32 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Debug|x64.ActiveCfg = Debug|x64 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Debug|x64.Build.0 = Debug|x64 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Release|Win32.ActiveCfg = Release|Win32 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Release|Win32.Build.0 = Release|Win32 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Release|x64.ActiveCfg = Release|x64 - {D2A0903C-E760-4134-AE61-3D55BF8F760C}.Release|x64.Build.0 = Release|x64 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|Win32.Build.0 = Debug|Win32 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|x64.ActiveCfg = Release|x64 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|x64.Build.0 = Release|x64 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|Win32.ActiveCfg = Release|Win32 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|Win32.Build.0 = Release|Win32 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|x64.ActiveCfg = Release|x64 - {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|x64.Build.0 = Release|x64 {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Debug|Win32.ActiveCfg = Debug|Win32 {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Debug|Win32.Build.0 = Debug|Win32 {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Debug|x64.ActiveCfg = Debug|x64 @@ -78,6 +63,14 @@ Global {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Release|Win32.Build.0 = Release|Win32 {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Release|x64.ActiveCfg = Release|x64 {BE9D2400-7F1C-49D6-8498-5CE495491AD6}.Release|x64.Build.0 = Release|x64 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|Win32.Build.0 = Debug|Win32 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|x64.ActiveCfg = Release|x64 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Debug|x64.Build.0 = Release|x64 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|Win32.ActiveCfg = Release|Win32 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|Win32.Build.0 = Release|Win32 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|x64.ActiveCfg = Release|x64 + {6BE6F228-B741-4DA9-9FBC-E9F2A7BD483A}.Release|x64.Build.0 = Release|x64 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|Win32.ActiveCfg = Debug|Win32 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|Win32.Build.0 = Debug|Win32 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|x64.ActiveCfg = Debug|x64