Win32 icons on template

Added icon to HelloCpp template, renamed the icon resource (so GLFW can
read it and put on window and taskbar), and removed unnecessary files
from projects.
This commit is contained in:
Bruno Assarisse 2013-09-09 00:42:36 -03:00
parent cd6b50811a
commit 71c1e10fd8
11 changed files with 130 additions and 14 deletions

View File

@ -162,6 +162,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\libwebsockets\win32\lib\*.*" "$(OutD
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="game.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@ -7,6 +7,9 @@
<Filter Include="Classes"> <Filter Include="Classes">
<UniqueIdentifier>{bb6c862e-70e9-49d9-81b7-3829a6f50471}</UniqueIdentifier> <UniqueIdentifier>{bb6c862e-70e9-49d9-81b7-3829a6f50471}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="resource">
<UniqueIdentifier>{715254bc-d70b-4ec5-bf29-467dd3ace079}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
@ -30,4 +33,9 @@
<Filter>Classes</Filter> <Filter>Classes</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="game.rc">
<Filter>resource</Filter>
</ResourceCompile>
</ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,86 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
GLFW_ICON ICON "res\\game.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "game Module\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "game\0"
VALUE "LegalCopyright", "Copyright \0"
VALUE "OriginalFilename", "game.exe\0"
VALUE "ProductName", "game Module\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END
/////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,20 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by game.RC
//
#define IDS_PROJNAME 100
#define IDR_TESTJS 100
#define ID_FILE_NEW_WINDOW 32771
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 32775
#endif
#endif

View File

@ -175,12 +175,8 @@ xcopy "$(ProjectDir)..\Resources" "$(OutDir)\HelloJavascriptRes\" /e /Y</Command
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="main.h" /> <ClInclude Include="main.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="..\Classes\AppDelegate.h" /> <ClInclude Include="..\Classes\AppDelegate.h" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="res\game.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="game.rc" /> <ResourceCompile Include="game.rc" />
</ItemGroup> </ItemGroup>

View File

@ -21,9 +21,6 @@
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="resource.h">
<Filter>win32</Filter>
</ClInclude>
<ClInclude Include="..\Classes\AppDelegate.h"> <ClInclude Include="..\Classes\AppDelegate.h">
<Filter>Classes</Filter> <Filter>Classes</Filter>
</ClInclude> </ClInclude>
@ -31,11 +28,6 @@
<Filter>win32</Filter> <Filter>win32</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="res\game.ico">
<Filter>resource</Filter>
</None>
</ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="game.rc"> <ResourceCompile Include="game.rc">
<Filter>resource</Filter> <Filter>resource</Filter>

View File

@ -42,7 +42,7 @@ END
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDR_MAINFRAME ICON "res\\game.ico" GLFW_ICON ICON "res\\game.ico"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

View File

@ -168,6 +168,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\libwebsockets\win32\lib\*.*" "$(OutD
<ClCompile Include="..\Classes\AppDelegate.cpp" /> <ClCompile Include="..\Classes\AppDelegate.cpp" />
<ClCompile Include="main.cpp" /> <ClCompile Include="main.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="game.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@ -7,6 +7,9 @@
<Filter Include="win32"> <Filter Include="win32">
<UniqueIdentifier>{037a9a02-b906-4cc5-ad98-304acd4e25ee}</UniqueIdentifier> <UniqueIdentifier>{037a9a02-b906-4cc5-ad98-304acd4e25ee}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="resource">
<UniqueIdentifier>{2d1d0979-58cd-4ab6-b91c-13650158f1fa}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\Classes\AppDelegate.h"> <ClInclude Include="..\Classes\AppDelegate.h">
@ -24,4 +27,9 @@
<Filter>win32</Filter> <Filter>win32</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="game.rc">
<Filter>resource</Filter>
</ResourceCompile>
</ItemGroup>
</Project> </Project>

View File

@ -42,7 +42,7 @@ END
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDR_MAINFRAME ICON "res\\game.ico" GLFW_ICON ICON "res\\game.ico"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //