diff options
-rw-r--r-- | plugins/CountryFlags/flags_11.vcxproj | 23 | ||||
-rw-r--r-- | plugins/CountryFlags/flags_11.vcxproj.filters | 10 | ||||
-rw-r--r-- | plugins/CountryFlags/res/version.rc | 33 | ||||
-rw-r--r-- | plugins/CountryFlags/src/extraimg.cpp | 4 | ||||
-rw-r--r-- | plugins/CountryFlags/src/flags.h | 30 | ||||
-rw-r--r-- | plugins/CountryFlags/src/huffman.cpp | 2 | ||||
-rw-r--r-- | plugins/CountryFlags/src/icons.cpp | 8 | ||||
-rw-r--r-- | plugins/CountryFlags/src/main.cpp | 19 | ||||
-rw-r--r-- | plugins/CountryFlags/src/stdafx.cpp | 18 | ||||
-rw-r--r-- | plugins/CountryFlags/src/version.h | 45 |
10 files changed, 94 insertions, 98 deletions
diff --git a/plugins/CountryFlags/flags_11.vcxproj b/plugins/CountryFlags/flags_11.vcxproj index 427de0fd08..102e1cae05 100644 --- a/plugins/CountryFlags/flags_11.vcxproj +++ b/plugins/CountryFlags/flags_11.vcxproj @@ -80,10 +80,12 @@ <Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>flags.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
@@ -107,9 +109,11 @@ <Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>flags.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
@@ -134,9 +138,11 @@ <Optimization>Full</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>flags.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
@@ -164,9 +170,11 @@ <Optimization>Full</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>flags.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
@@ -192,6 +200,12 @@ <ClCompile Include="src\icons.cpp" />
<ClCompile Include="src\ip2country.cpp" />
<ClCompile Include="src\main.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="src\utils.cpp" />
</ItemGroup>
<ItemGroup>
@@ -200,7 +214,6 @@ <ClInclude Include="src\version.h" />
</ItemGroup>
<ItemGroup>
- <CustomBuild Include="res\flags.bmp" />
<CustomBuild Include="docs\Flags-Developer.txt" />
<CustomBuild Include="docs\Flags-License.txt" />
<CustomBuild Include="docs\Flags-Readme.txt" />
diff --git a/plugins/CountryFlags/flags_11.vcxproj.filters b/plugins/CountryFlags/flags_11.vcxproj.filters index df80d2c68b..a52cbc5ae7 100644 --- a/plugins/CountryFlags/flags_11.vcxproj.filters +++ b/plugins/CountryFlags/flags_11.vcxproj.filters @@ -37,16 +37,19 @@ <ClCompile Include="src\utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\flags.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\resource.h">
- <Filter>Resource Files</Filter>
+ <Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\version.h">
- <Filter>Resource Files</Filter>
+ <Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
@@ -58,9 +61,6 @@ </ResourceCompile>
</ItemGroup>
<ItemGroup>
- <CustomBuild Include="res\flags.bmp">
- <Filter>Resource Files</Filter>
- </CustomBuild>
<CustomBuild Include="docs\Flags-Developer.txt">
<Filter>Documentation</Filter>
</CustomBuild>
diff --git a/plugins/CountryFlags/res/version.rc b/plugins/CountryFlags/res/version.rc index ee301c8ea8..5bfbab4754 100644 --- a/plugins/CountryFlags/res/version.rc +++ b/plugins/CountryFlags/res/version.rc @@ -1,39 +1,34 @@ +// Microsoft Visual C++ generated resource script.
+//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
-#include <..\src\version.h>
+#include "afxres.h"
+#include "..\src\version.h"
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
VS_VERSION_INFO VERSIONINFO
- FILEVERSION FILE_VERSION
- PRODUCTVERSION FILE_VERSION
- FILEFLAGSMASK 0x0L
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
+ FILEOS 0x4L
+ FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
- VALUE "Comments", "Licensed under the terms of the GNU General Public License"
- VALUE "FileDescription", "Country Flags Plugin for Miranda NG"
- VALUE "FileVersion", FILE_VERSION_STR
- VALUE "InternalName", "CountryUtils"
- VALUE "LegalCopyright", "Copyright © 2006-2007 H. Herkenrath"
- VALUE "OriginalFilename", "flags.dll"
- VALUE "ProductName", "Country Flags"
- VALUE "ProductVersion", FILE_VERSION_STR
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
END
END
BLOCK "VarFileInfo"
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 3883b8bf71..94af170dc3 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -101,7 +101,7 @@ static int ExtraImageApply(WPARAM wParam,LPARAM lParam) #define STATUSICON_REFRESHDELAY 100 /* time for which setting changes are buffered */
// always call in context of main thread
-static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber)
+static void __fastcall SetStatusIcon(HANDLE hContact,int countryNumber)
{
HICON hIcon = NULL;
@@ -136,7 +136,7 @@ static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber) }
// always call in context of main thread
-static void FASTCALL UnsetStatusIcon(HANDLE hContact,int countryNumber)
+static void __fastcall UnsetStatusIcon(HANDLE hContact,int countryNumber)
{
StatusIconData sid;
sid.cbSize=sizeof(sid);
diff --git a/plugins/CountryFlags/src/flags.h b/plugins/CountryFlags/src/flags.h index e5a693cd07..66308023a0 100644 --- a/plugins/CountryFlags/src/flags.h +++ b/plugins/CountryFlags/src/flags.h @@ -19,39 +19,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CRT_SECURE_NO_WARNINGS
#define WIN32_LEAN_AND_MEAN
+
#include <windows.h>
-#define NONAMELESSUNION
#include <commctrl.h> /* for ImageList functions */
-#define NOWIN2K
+
#include <win2k.h>
-#define MIRANDA_VER 0x0A00
-#include <stdio.h>
#include <newpluginapi.h>
-#include <m_system.h>
-#include <m_utils.h>
#include <m_langpack.h>
#include <m_icolib.h>
-#include <m_clui.h>
-#include <m_cluiframes.h>
#include <m_message.h>
#include <m_database.h>
#include <m_options.h>
-#include <m_contacts.h>
#include <m_protocols.h>
#include <m_extraicons.h>
+
#define FLAGS_NOHELPERFUNCTIONS
-#include "m_flags.h"
-#include "resource.h"
+#include <m_flags.h>
-#if defined(_MSC_VER) && !defined(FASTCALL)
- #define FASTCALL __fastcall
-#else
- #define FASTCALL
-#endif
-#if defined(_DEBUG)
- #undef FASTCALL
- #define FASTCALL
-#endif
+#include "resource.h"
+#include "version.h"
/* huffman.c */
#ifdef HUFFMAN_ENCODE
@@ -60,8 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void Huffman_Uncompress(unsigned char *in,unsigned char *out,unsigned int insize,unsigned int outsize);
/* icons.c */
-HICON FASTCALL LoadFlagIcon(int countryNumber);
-int FASTCALL CountryNumberToIndex(int countryNumber);
+HICON __fastcall LoadFlagIcon(int countryNumber);
+int __fastcall CountryNumberToIndex(int countryNumber);
void InitIcons(void);
void UninitIcons(void);
diff --git a/plugins/CountryFlags/src/huffman.cpp b/plugins/CountryFlags/src/huffman.cpp index ee8680f558..da02e9f97d 100644 --- a/plugins/CountryFlags/src/huffman.cpp +++ b/plugins/CountryFlags/src/huffman.cpp @@ -60,6 +60,8 @@ * Types used for Huffman coding
*************************************************************************/
+#include "flags.h"
+
typedef struct {
unsigned char *BytePtr;
unsigned int BitPos;
diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 5e2bcae8a7..34324005ad 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -44,7 +44,7 @@ const int BitmapIndexMap[232]={ 974, 975, 976, 977, 994, 995,1141,2691,3811,4101,6101,6722
};
-static int FASTCALL CountryNumberToBitmapIndex(int countryNumber)
+static int __fastcall CountryNumberToBitmapIndex(int countryNumber)
{
/* shared flags by multiple countries */
switch(countryNumber) {
@@ -94,7 +94,7 @@ static int FASTCALL CountryNumberToBitmapIndex(int countryNumber) // return value needs to be released using DestroyIcon()
// only operates on color icons, which isn't a problem here
-static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy)
+static HICON __fastcall ResizeIconCentered(HICON hIcon,int cx,int cy)
{
HICON hResIcon=NULL;
HDC hdc = CreateCompatibleDC(NULL);
@@ -143,7 +143,7 @@ static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy) /************************* Utils **********************************/
-HICON FASTCALL LoadFlagIcon(int countryNumber)
+HICON __fastcall LoadFlagIcon(int countryNumber)
{
/* create identifier */
char *szCountry = (char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, countryNumber, 0);
@@ -155,7 +155,7 @@ HICON FASTCALL LoadFlagIcon(int countryNumber) return Skin_GetIcon(szId);
}
-int FASTCALL CountryNumberToIndex(int countryNumber)
+int __fastcall CountryNumberToIndex(int countryNumber)
{
int nf=0;
for(int i=0; i < nCountriesCount; ++i) {
diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp index d418828192..4bd819143a 100644 --- a/plugins/CountryFlags/src/main.cpp +++ b/plugins/CountryFlags/src/main.cpp @@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "flags.h"
-#include "version.h"
HINSTANCE hInst;
int nCountriesCount;
@@ -27,16 +26,16 @@ int hLangpack; static PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
- "Country Flags",
- PLUGIN_VERSION,
- "Service offering misc country utilities as flag icons and a IP-to-Country database.", /* autotranslated */
- "H. Herkenrath",
- "hrathh@users.sourceforge.net",
- "© 2006-2007 H. Herkenrath",
- PLUGIN_WEBSITE,
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
- // {68C36842-3D95-4f4a-AB81-014D6593863B}
- {0x68c36842,0x3d95,0x4f4a,{0xab,0x81,0x1,0x4d,0x65,0x93,0x86,0x3b}}
+ // {68C36842-3D95-4F4A-AB81-014D6593863B}
+ {0x68c36842, 0x3d95, 0x4f4a, {0xab, 0x81, 0x1, 0x4d, 0x65, 0x93, 0x86, 0x3b}}
};
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
diff --git a/plugins/CountryFlags/src/stdafx.cpp b/plugins/CountryFlags/src/stdafx.cpp new file mode 100644 index 0000000000..e1b76ab747 --- /dev/null +++ b/plugins/CountryFlags/src/stdafx.cpp @@ -0,0 +1,18 @@ +/*
+Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
+
+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 version 2
+of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "flags.h"
\ No newline at end of file diff --git a/plugins/CountryFlags/src/version.h b/plugins/CountryFlags/src/version.h index 571e48ee3e..722fb5abbc 100644 --- a/plugins/CountryFlags/src/version.h +++ b/plugins/CountryFlags/src/version.h @@ -1,31 +1,14 @@ -/*
-Miranda IM Country Flags Plugin
-Copyright (C) 2006-2007 H. Herkenrath
-
-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 (Flags-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#define NEEDED_MIRANDA_VERSION PLUGIN_MAKE_VERSION(0,7,0,10)
-#define NEEDED_MIRANDA_VERSION_STR "0.7 alpha build #10"
-#define PLUGIN_VERSION PLUGIN_MAKE_VERSION(0,1,0,3)
-#define FILE_VERSION 0,1,0,3
-
-#ifdef _DEBUG
- #define FILE_VERSION_STR "0.1.0.4 alpha"
-#else
- #define FILE_VERSION_STR "0.1.0.3"
-#endif
-
-#define PLUGIN_WEBSITE "http://miranda-ng.org/"
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 1
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 3
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+
+#define __PLUGIN_NAME "Country flags"
+#define __FILENAME "Flags.dll"
+#define __DESCRIPTION "Service offering misc country utilities as flag icons and a IP-to-Country database."
+#define __AUTHOR "H. Herkenrath"
+#define __AUTHOREMAIL "hrathh@users.sourceforge.net"
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2006-2007 H. Herkenrath"
|