Rainmeter.dll now shares icon with Rainmeter.exe to reduce binary size.

This commit is contained in:
Birunthan Mohanathas 2011-11-11 09:38:00 +00:00
parent 73d71b1284
commit 9f629fac62
14 changed files with 9 additions and 116 deletions

View File

@ -21,7 +21,6 @@
#include <crtdbg.h>
#include <string>
#include <algorithm>
#include "resource.h"
#include "../Library/Rainmeter.h"
#if defined _M_IX86

View File

@ -1,23 +1,9 @@
// Microsoft Developer Studio generated resource script.
// Caution! Do not modify this file without changing \install\UpdateApplicationRC.au3
//
#include "resource.h"
//
#include <Windows.h>
#include "../Library/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)
@ -72,44 +58,3 @@ END
// 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

View File

@ -313,9 +313,6 @@ xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x32\release\
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<None Include="Rainmeter.ico" />
</ItemGroup>

View File

@ -19,11 +19,6 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Rainmeter.ico">
<Filter>Resource Files</Filter>

View File

@ -1,21 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Host.rc
//
#define IDI_RAINMETER 103
#define IDR_TRAYMENU 104
#define ID_TRAYMENU_REFRESH 40001
#define ID_TRAYMENU_QUIT 40002
#define ID_TRAYMENU_SHOW 40003
#define ID_TRAYMENU_HIDE 40010
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40011
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -245,7 +245,7 @@ INT_PTR CALLBACK CDialogAbout::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
{
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED);
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)
@ -1030,7 +1030,7 @@ void CDialogAbout::CTabVersion::Initialize()
m_Initialized = true;
HWND item = GetDlgItem(m_Window, IDC_ABOUTVERSION_RAINMETER_ICON);
HICON icon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_WINDOW));
HICON icon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 32, 32, LR_SHARED);
Static_SetIcon(item, icon);
item = GetDlgItem(m_Window, IDC_ABOUTVERSION_VERSION_TEXT);

View File

@ -226,7 +226,7 @@ INT_PTR CALLBACK CDialogManage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
{
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED);
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0)

View File

@ -49,13 +49,3 @@ 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_TRAY ICON DISCARDABLE "res\\tray.ico"
IDI_WINDOW ICON DISCARDABLE "res\\window.ico"

View File

@ -924,10 +924,6 @@
<ClInclude Include="lua\lua\lvm.h" />
<ClInclude Include="lua\lua\lzio.h" />
</ItemGroup>
<ItemGroup>
<None Include="Res\tray.ico" />
<None Include="res\window.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -597,14 +597,6 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Res\tray.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="res\window.ico">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Library.rc">
<Filter>Resource Files</Filter>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -264,7 +264,7 @@ HICON CTrayWindow::CreateTrayIcon(double value)
}
// Return the default icon if there is no valid measure
return LoadIcon(m_Instance, MAKEINTRESOURCE(IDI_TRAY));
return (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED);
}
void CTrayWindow::ReadConfig(CConfigParser& parser)

View File

@ -3,8 +3,8 @@
// Used by Library.rc
//
#define IDC_STATIC -1
#define IDI_TRAY 100
#define IDI_WINDOW 101
#define IDI_RAINMETER 100
#define IDI_TRAY 101
#define IDR_CONTEXT_MENU 102
#define IDR_SKIN_MENU 103
#define IDR_MANAGESKINS_MENU 104