summaryrefslogtreecommitdiff
path: root/plugins/SplashScreen
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-03-09 19:25:58 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-03-09 19:25:58 +0000
commit4fb814b906f54b18bcfa56654f019ed1ef36b98e (patch)
treeb536248b6372940decde6d6395b148b56da3b244 /plugins/SplashScreen
parentac2acb9980932ed028b8a31d2add76a4b2b9b56b (diff)
added precompiled header
git-svn-id: http://svn.miranda-ng.org/main/trunk@3946 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SplashScreen')
-rw-r--r--plugins/SplashScreen/res/splash.rc11
-rw-r--r--plugins/SplashScreen/res/version.rc4
-rw-r--r--plugins/SplashScreen/splashscreen_10.vcxproj11
-rw-r--r--plugins/SplashScreen/splashscreen_10.vcxproj.filters5
-rw-r--r--plugins/SplashScreen/splashscreen_11.vcxproj11
-rw-r--r--plugins/SplashScreen/splashscreen_11.vcxproj.filters3
-rw-r--r--plugins/SplashScreen/src/headers.h5
-rw-r--r--plugins/SplashScreen/src/main.cpp12
-rw-r--r--plugins/SplashScreen/src/options.cpp16
-rw-r--r--plugins/SplashScreen/src/services.cpp6
-rw-r--r--plugins/SplashScreen/src/stdafx.cpp18
-rw-r--r--plugins/SplashScreen/src/version.h2
12 files changed, 72 insertions, 32 deletions
diff --git a/plugins/SplashScreen/res/splash.rc b/plugins/SplashScreen/res/splash.rc
index 933d72393a..e14c3da3f3 100644
--- a/plugins/SplashScreen/res/splash.rc
+++ b/plugins/SplashScreen/res/splash.rc
@@ -18,7 +18,7 @@
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO MOVEABLE PURE
+GUIDELINES DESIGNINFO
BEGIN
IDD_SPLASH_OPT, DIALOG
BEGIN
@@ -101,14 +101,15 @@ BEGIN
"..\\src\\resource.h\0"
END
-3 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
- "\r\n"
+ "#include ""afxres.h""\r\n"
+ "\0"
END
-2 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
- "#include ""afxres.h""\r\n"
+ "\0"
END
#endif // APSTUDIO_INVOKED
diff --git a/plugins/SplashScreen/res/version.rc b/plugins/SplashScreen/res/version.rc
index d741488c4f..5bfbab4754 100644
--- a/plugins/SplashScreen/res/version.rc
+++ b/plugins/SplashScreen/res/version.rc
@@ -7,10 +7,6 @@
#include "afxres.h"
#include "..\src\version.h"
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#endif //_WIN32
-
VS_VERSION_INFO VERSIONINFO
FILEVERSION __FILEVERSION_STRING
PRODUCTVERSION __FILEVERSION_STRING
diff --git a/plugins/SplashScreen/splashscreen_10.vcxproj b/plugins/SplashScreen/splashscreen_10.vcxproj
index 51cecacd52..35d57a26d3 100644
--- a/plugins/SplashScreen/splashscreen_10.vcxproj
+++ b/plugins/SplashScreen/splashscreen_10.vcxproj
@@ -81,6 +81,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -111,6 +113,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -140,6 +144,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -164,6 +170,8 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -185,6 +193,9 @@
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\services.cpp" />
<ClCompile Include="src\splash.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\bitmap_funcs.h" />
diff --git a/plugins/SplashScreen/splashscreen_10.vcxproj.filters b/plugins/SplashScreen/splashscreen_10.vcxproj.filters
index 1328973588..9997a8ad8d 100644
--- a/plugins/SplashScreen/splashscreen_10.vcxproj.filters
+++ b/plugins/SplashScreen/splashscreen_10.vcxproj.filters
@@ -30,6 +30,9 @@
<ClCompile Include="src\splash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\bitmap_funcs.h">
@@ -45,7 +48,7 @@
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\resource.h">
- <Filter>Resource Files</Filter>
+ <Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
diff --git a/plugins/SplashScreen/splashscreen_11.vcxproj b/plugins/SplashScreen/splashscreen_11.vcxproj
index 13b46c431d..32b51bab6f 100644
--- a/plugins/SplashScreen/splashscreen_11.vcxproj
+++ b/plugins/SplashScreen/splashscreen_11.vcxproj
@@ -85,6 +85,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -115,6 +117,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -144,6 +148,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -168,6 +174,8 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -189,6 +197,9 @@
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\services.cpp" />
<ClCompile Include="src\splash.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\bitmap_funcs.h" />
diff --git a/plugins/SplashScreen/splashscreen_11.vcxproj.filters b/plugins/SplashScreen/splashscreen_11.vcxproj.filters
index f85cc9490e..9997a8ad8d 100644
--- a/plugins/SplashScreen/splashscreen_11.vcxproj.filters
+++ b/plugins/SplashScreen/splashscreen_11.vcxproj.filters
@@ -30,6 +30,9 @@
<ClCompile Include="src\splash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\bitmap_funcs.h">
diff --git a/plugins/SplashScreen/src/headers.h b/plugins/SplashScreen/src/headers.h
index 8942202679..8211b3eaff 100644
--- a/plugins/SplashScreen/src/headers.h
+++ b/plugins/SplashScreen/src/headers.h
@@ -23,7 +23,6 @@
#define _WIN32_WINNT 0x0500
#define WINVER 0x0400
#define AC_SRC_ALPHA 0x01
-#define OEMRESOURCE
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
@@ -31,7 +30,6 @@
#include <time.h>
#include <dshow.h>
-// Miranda API headers
#include <win2k.h>
#include <newpluginapi.h>
#include <m_database.h>
@@ -39,9 +37,8 @@
#include <m_langpack.h>
#include <m_png.h>
-#include "m_splash.h"
+#include <m_splash.h>
-// Common headers
#include "version.h"
#include "resource.h"
#include "bitmap_funcs.h"
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index 4a18a103c1..96054f39f6 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -155,14 +155,14 @@ void SplashMain()
TCHAR szExpandedSplashFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, SIZEOF(szExpandedSplashFile));
- lstrcpy(inBuf, szExpandedSplashFile);
+ _tcscpy_s(inBuf, szExpandedSplashFile);
TCHAR *pos3 = 0;
pos3 = _tcsrchr(inBuf, _T(':'));
if (pos3 == NULL)
mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, inBuf);
else
- lstrcpy(szSplashFile, inBuf);
+ _tcscpy_s(szSplashFile, inBuf);
DBGetContactSettingTString(NULL, MODNAME, "Sound", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
@@ -175,14 +175,14 @@ void SplashMain()
TCHAR szExpandedSoundFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, SIZEOF(szExpandedSoundFile));
- lstrcpy(inBuf, szExpandedSoundFile);
+ _tcscpy_s(inBuf, szExpandedSoundFile);
TCHAR *pos2;
pos2 = _tcschr(inBuf, _T(':'));
if (pos2 == NULL)
mir_sntprintf(szSoundFile, SIZEOF(szSoundFile), _T("%s\\%s"), szMirDir, inBuf);
else
- lstrcpy(szSoundFile, inBuf);
+ _tcscpy_s(szSoundFile, inBuf);
#ifdef _DEBUG
logMessage(_T("SoundFilePath"), szSoundFile);
@@ -197,8 +197,8 @@ void SplashMain()
TCHAR* p = 0;
TCHAR files [255][50]; //TODO: make memory allocation dynamic
- lstrcpy(szSplashDir, szSplashFile);
- lstrcpy(szOldPath, szSplashFile);
+ _tcscpy_s(szSplashDir, szSplashFile);
+ _tcscpy_s(szOldPath, szSplashFile);
// find the last \ and null it out, this leaves no trailing slash
p = _tcsrchr(szSplashDir, _T('\\'));
if (p) *p = 0;
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index c604d305f0..8c0248985b 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -172,14 +172,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (Exists(szSplashFile))
{
- lstrcpy(initDir, szSplashFile);
+ _tcscpy_s(initDir, szSplashFile);
pos = _tcsrchr(initDir, _T('\\'));
if(pos != NULL) *pos = 0;
}
else
{
szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
- lstrcpy(initDir, szMirDir);
+ _tcscpy_s(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -199,7 +199,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (GetOpenFileName(&ofn))
{
- lstrcpy(szSplashFile, szTempPath);
+ _tcscpy_s(szSplashFile, szTempPath);
#ifdef _DEBUG
logMessage(_T("Set path"), szSplashFile);
@@ -216,7 +216,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (pos != NULL)
{
*pos = 0;
- lstrcat(szPath2Spash, _T("\\"));
+ _tcscat_s(szPath2Spash, _T("\\"));
}
}
@@ -236,14 +236,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (Exists(szSoundFile))
{
- lstrcpy(initDir, szSoundFile);
+ _tcscpy_s(initDir, szSoundFile);
pos = _tcsrchr(initDir, _T('\\'));
if(pos != NULL) *pos = 0;
}
else
{
szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
- lstrcpy(initDir, szMirDir);
+ _tcscpy_s(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -263,7 +263,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (GetOpenFileName(&ofn))
{
- lstrcpy(szSoundFile,szTempPath);
+ _tcscpy_s(szSoundFile,szTempPath);
#ifdef _DEBUG
logMessage(_T("Set sound path"), szSoundFile);
@@ -308,7 +308,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
GetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), tmp, MAX_PATH);
DBWriteContactSettingTString(NULL, MODNAME, "VersionPrefix", tmp);
- lstrcpy(szPrefix, tmp);
+ _tcscpy_s(szPrefix, tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), tmp, MAX_PATH);
DBWriteContactSettingDword(NULL, MODNAME, "TimeToShow", _ttoi(tmp));
diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp
index 44ee1861b3..def64f0684 100644
--- a/plugins/SplashScreen/src/services.cpp
+++ b/plugins/SplashScreen/src/services.cpp
@@ -27,18 +27,18 @@ INT_PTR ShowSplashService(WPARAM wparam,LPARAM lparam)
TCHAR* filename = (TCHAR*) wparam;
int timetoshow = (int) lparam;
- lstrcpy(szOldfn, szSplashFile);
+ _tcscpy_s(szOldfn, szSplashFile);
options.showtime = timetoshow;
pos = _tcsrchr(filename, _T(':'));
if (pos == NULL)
mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, filename);
else
- lstrcpy(szSplashFile, filename);
+ _tcscpy_s(szSplashFile, filename);
ShowSplash(false);
- lstrcpy(szSplashFile, szOldfn);
+ _tcscpy_s(szSplashFile, szOldfn);
return 0;
}
diff --git a/plugins/SplashScreen/src/stdafx.cpp b/plugins/SplashScreen/src/stdafx.cpp
new file mode 100644
index 0000000000..48d92d3d56
--- /dev/null
+++ b/plugins/SplashScreen/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 "headers.h" \ No newline at end of file
diff --git a/plugins/SplashScreen/src/version.h b/plugins/SplashScreen/src/version.h
index 1431bbe216..9e8a1f4e88 100644
--- a/plugins/SplashScreen/src/version.h
+++ b/plugins/SplashScreen/src/version.h
@@ -5,7 +5,7 @@
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define __PLUGIN_NAME "Splash Screen"
+#define __PLUGIN_NAME "Splash screen"
#define __FILENAME "SplashScreen.dll"
#define __DESCRIPTION "Shows a splash at Miranda startup."
#define __AUTHOR "nullbie, Thief"