Deleted rainmeter Application project

This commit is contained in:
Tiberiu Chibici 2014-07-23 13:51:14 +03:00
parent 8541cce5f4
commit 1cf00049d2
8 changed files with 0 additions and 338 deletions

View File

@ -1,161 +0,0 @@
/*
Copyright (C) 2001 Kimmo Pekkola
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#include <Windows.h>
#include <ShellAPI.h>
#include <Shlwapi.h>
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
typedef int (*RainmeterMainFunc)(LPWSTR cmdLine);
WCHAR* GetCommandLineArguments()
{
WCHAR* args = GetCommandLine();
// Skip past (quoted) application path in cmdLine.
if (*args == L'"')
{
++args; // Skip leading quote.
while (*args && *args != L'"')
{
++args;
}
++args; // Skip trailing quote.
}
else
{
while (*args && *args != L' ')
{
++args;
}
}
// Skip leading whitespace (similar to CRT implementation).
while (*args && *args <= L' ')
{
++args;
}
return args;
}
/*
** Attempts to load Rainmeter.dll. If it fails, retries after loading our own copies of the CRT
** DLLs in the Runtime directory.
*/
HINSTANCE LoadRainmeterLibrary()
{
HINSTANCE rmDll = LoadLibrary(L"Rainmeter.dll");
if (!rmDll)
{
WCHAR path[MAX_PATH];
if (GetModuleFileName(nullptr, path, MAX_PATH) > 0)
{
PathRemoveFileSpec(path);
PathAppend(path, L"Runtime");
SetDllDirectory(path);
PathAppend(path, L"msvcp120.dll");
// Loading msvcpNNN.dll will load msvcrNNN.dll as well.
HINSTANCE msvcrDll = LoadLibrary(path);
SetDllDirectory(L"");
if (msvcrDll)
{
rmDll = LoadLibrary(L"Rainmeter.dll");
FreeLibrary(msvcrDll);
}
}
}
return rmDll;
}
/*
** Entry point. In Release builds, the entry point is Main() since the CRT is not used.
**
*/
int APIENTRY wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
{
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
//_CrtSetBreakAlloc(000);
// Prevent system error message boxes.
UINT oldMode = SetErrorMode(0);
SetErrorMode(oldMode | SEM_FAILCRITICALERRORS);
HINSTANCE instance = (HINSTANCE)&__ImageBase;
WCHAR* args = GetCommandLineArguments();
HRSRC iconResource = FindResource(instance, MAKEINTRESOURCE(1), RT_ICON);
if (iconResource)
{
HINSTANCE rmDll = LoadRainmeterLibrary();
if (rmDll)
{
auto rainmeterMain = (RainmeterMainFunc)GetProcAddress(rmDll, MAKEINTRESOURCEA(1));
if (rainmeterMain)
{
return rainmeterMain(args);
}
}
WCHAR message[128];
wsprintf(
message,
L"Rainmeter.dll load error %ld.",
GetLastError());
MessageBox(nullptr, message, L"Rainmeter", MB_OK | MB_ICONERROR);
}
else
{
// Stub prodecure. If icon resources have been removed, try to launch the actual Rainmeter.exe.
HKEY hKey;
const REGSAM desiredSam = KEY_QUERY_VALUE | KEY_WOW64_32KEY;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Rainmeter", 0, desiredSam, &hKey) == ERROR_SUCCESS)
{
const DWORD size = MAX_PATH;
WCHAR buffer[size];
DWORD type = 0;
if (RegQueryValueEx(hKey, nullptr , nullptr, &type, (LPBYTE)buffer, (LPDWORD)&size) == ERROR_SUCCESS &&
type == REG_SZ)
{
SetCurrentDirectory(buffer);
lstrcat(buffer, L"\\Rainmeter.exe");
ShellExecute(nullptr, L"open", buffer, args, nullptr, SW_SHOWNORMAL);
}
RegCloseKey(hKey);
}
return 0;
}
return 1;
}
#ifndef _DEBUG
EXTERN_C int WINAPI Main()
{
int result = wWinMain(nullptr, nullptr, nullptr, 0);
ExitProcess(result);
return 0; // Never reached.
}
#endif

View File

@ -1,14 +0,0 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><!-- 7 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><!-- 8 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><!-- 8.1 -->
</application>
</compatibility>
</assembly>

View File

@ -1,55 +0,0 @@
#include <Windows.h>
#include "../Library/resource.h"
#include "../Version.h"
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// 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
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "FileVersion", STRFILEVER
VALUE "LegalCopyright", "© 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
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1252
}
}
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_RAINMETER ICON DISCARDABLE "Rainmeter.ico"
IDI_TRAY ICON DISCARDABLE "Tray.ico"

View File

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)Build\VS\Rainmeter.Cpp.Default.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{D2A0903C-E760-4134-AE61-3D55BF8F760C}</ProjectGuid>
<ConfigurationType>Application</ConfigurationType>
<TargetName>Rainmeter</TargetName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(SolutionDir)Build\VS\Rainmeter.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EntryPointSymbol>wWinMainCRTStartup</EntryPointSymbol>
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>if not exist "$(OutDir)Skins" xcopy /Q /S /Y ..\Build\Skins "$(OutDir)Skins\"
if not exist "$(OutDir)Layouts" xcopy /Q /S /Y ..\Build\Layouts "$(OutDir)Layouts\"</Command>
</PostBuildEvent>
<Manifest>
<AdditionalManifestFiles>Application.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<EntryPointSymbol>Main</EntryPointSymbol>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Application.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Application.rc" />
</ItemGroup>
<ItemGroup>
<Content Include="Rainmeter.exe.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="Rainmeter.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Library\Library.vcxproj">
<Project>{be9d2400-7f1c-49d6-8498-5ce495491ad6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{22670730-eb79-4df9-bed9-27fff1350132}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{774a1827-ac91-40b9-ad18-8a3d68983c64}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{a4963a10-e359-400f-86fa-bdce98dd5dc2}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Application.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Rainmeter.ico">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Application.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.5.1" />
<supportedRuntime version="v4.5" />
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB