diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 517bdfb9..4b58202a 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -17,6 +17,7 @@ _LIB;%(PreprocessorDefinitions) + Use true @@ -44,6 +45,9 @@ + + Create + @@ -69,6 +73,7 @@ + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 1948370f..5b54aacc 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -53,6 +53,7 @@ Gfx\Util + @@ -110,6 +111,7 @@ Gfx\Util + diff --git a/Common/ControlTemplate.cpp b/Common/ControlTemplate.cpp index 4a258d68..c6cc6142 100644 --- a/Common/ControlTemplate.cpp +++ b/Common/ControlTemplate.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "ControlTemplate.h" namespace ControlTemplate diff --git a/Common/Dialog.cpp b/Common/Dialog.cpp index 469112e0..2a5714ce 100644 --- a/Common/Dialog.cpp +++ b/Common/Dialog.cpp @@ -16,9 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "Dialog.h" -#include -#include HWND Dialog::c_ActiveDialogWindow = nullptr; diff --git a/Common/Gfx/Canvas.cpp b/Common/Gfx/Canvas.cpp index a1efd504..176a10ad 100644 --- a/Common/Gfx/Canvas.cpp +++ b/Common/Gfx/Canvas.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "Canvas.h" #include "CanvasD2D.h" #include "CanvasGDIP.h" diff --git a/Common/Gfx/Canvas.h b/Common/Gfx/Canvas.h index 226ef5fe..c330a363 100644 --- a/Common/Gfx/Canvas.h +++ b/Common/Gfx/Canvas.h @@ -21,9 +21,6 @@ #include "FontCollection.h" #include "TextFormat.h" -#include -#include // For Gdiplus.h. -#include namespace Gfx { diff --git a/Common/Gfx/CanvasD2D.cpp b/Common/Gfx/CanvasD2D.cpp index e8ecf6d1..5f41ff5f 100644 --- a/Common/Gfx/CanvasD2D.cpp +++ b/Common/Gfx/CanvasD2D.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "../Platform.h" #include "CanvasD2D.h" #include "TextFormatD2D.h" diff --git a/Common/Gfx/CanvasGDIP.cpp b/Common/Gfx/CanvasGDIP.cpp index 23404759..d4adc185 100644 --- a/Common/Gfx/CanvasGDIP.cpp +++ b/Common/Gfx/CanvasGDIP.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "CanvasGDIP.h" namespace Gfx { diff --git a/Common/Gfx/FontCollection.cpp b/Common/Gfx/FontCollection.cpp index dee01f1b..60dd314c 100644 --- a/Common/Gfx/FontCollection.cpp +++ b/Common/Gfx/FontCollection.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "FontCollection.h" namespace Gfx { diff --git a/Common/Gfx/FontCollectionD2D.cpp b/Common/Gfx/FontCollectionD2D.cpp index 33c4f3c4..764512f4 100644 --- a/Common/Gfx/FontCollectionD2D.cpp +++ b/Common/Gfx/FontCollectionD2D.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "FontCollectionD2D.h" #include "CanvasD2D.h" #include "Util/DWriteFontCollectionLoader.h" diff --git a/Common/Gfx/FontCollectionGDIP.cpp b/Common/Gfx/FontCollectionGDIP.cpp index 9e5dcc32..6a3c33f2 100644 --- a/Common/Gfx/FontCollectionGDIP.cpp +++ b/Common/Gfx/FontCollectionGDIP.cpp @@ -16,9 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "FontCollectionGDIP.h" -#include // For Gdiplus.h. -#include namespace Gfx { diff --git a/Common/Gfx/TextFormat.cpp b/Common/Gfx/TextFormat.cpp index bac19d52..71049dd6 100644 --- a/Common/Gfx/TextFormat.cpp +++ b/Common/Gfx/TextFormat.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "TextFormat.h" namespace Gfx { diff --git a/Common/Gfx/TextFormatD2D.cpp b/Common/Gfx/TextFormatD2D.cpp index 04e4f482..57f4b45b 100644 --- a/Common/Gfx/TextFormatD2D.cpp +++ b/Common/Gfx/TextFormatD2D.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "TextFormatD2D.h" #include "CanvasD2D.h" #include "Util/DWriteHelpers.h" diff --git a/Common/Gfx/TextFormatGDIP.cpp b/Common/Gfx/TextFormatGDIP.cpp index ecb0edb8..29854c6b 100644 --- a/Common/Gfx/TextFormatGDIP.cpp +++ b/Common/Gfx/TextFormatGDIP.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "TextFormatGDIP.h" #include "FontCollectionGDIP.h" diff --git a/Common/Gfx/Util/DWriteFontCollectionLoader.cpp b/Common/Gfx/Util/DWriteFontCollectionLoader.cpp index cfb9020f..0afd4a5c 100644 --- a/Common/Gfx/Util/DWriteFontCollectionLoader.cpp +++ b/Common/Gfx/Util/DWriteFontCollectionLoader.cpp @@ -16,9 +16,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "DWriteFontCollectionLoader.h" #include "DWriteFontFileEnumerator.h" -#include namespace Gfx { namespace Util { diff --git a/Common/Gfx/Util/DWriteFontFileEnumerator.cpp b/Common/Gfx/Util/DWriteFontFileEnumerator.cpp index dba428af..4a036279 100644 --- a/Common/Gfx/Util/DWriteFontFileEnumerator.cpp +++ b/Common/Gfx/Util/DWriteFontFileEnumerator.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "DWriteFontFileEnumerator.h" namespace Gfx { diff --git a/Common/Gfx/Util/DWriteHelpers.cpp b/Common/Gfx/Util/DWriteHelpers.cpp index e4b1601c..0676167f 100644 --- a/Common/Gfx/Util/DWriteHelpers.cpp +++ b/Common/Gfx/Util/DWriteHelpers.cpp @@ -16,9 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "DWriteHelpers.h" -#include -#include namespace Gfx { namespace Util { diff --git a/Common/Gfx/Util/WICBitmapDIB.cpp b/Common/Gfx/Util/WICBitmapDIB.cpp index 6c09abf5..b3c8aef9 100644 --- a/Common/Gfx/Util/WICBitmapDIB.cpp +++ b/Common/Gfx/Util/WICBitmapDIB.cpp @@ -16,9 +16,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "WICBitmapDIB.h" #include "WICBitmapLockDIB.h" -#include namespace Gfx { namespace Util { diff --git a/Common/Gfx/Util/WICBitmapLockDIB.cpp b/Common/Gfx/Util/WICBitmapLockDIB.cpp index c43410c3..9d551664 100644 --- a/Common/Gfx/Util/WICBitmapLockDIB.cpp +++ b/Common/Gfx/Util/WICBitmapLockDIB.cpp @@ -16,8 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "WICBitmapLockDIB.h" -#include namespace Gfx { namespace Util { diff --git a/Common/Gfx/Util/WICBitmapLockGDIP.cpp b/Common/Gfx/Util/WICBitmapLockGDIP.cpp index f3e25fc2..adfa2e74 100644 --- a/Common/Gfx/Util/WICBitmapLockGDIP.cpp +++ b/Common/Gfx/Util/WICBitmapLockGDIP.cpp @@ -16,8 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "WICBitmapLockGDIP.h" -#include namespace Gfx { namespace Util { diff --git a/Common/MathParser.cpp b/Common/MathParser.cpp index 5b0e11b5..4c69d0f7 100644 --- a/Common/MathParser.cpp +++ b/Common/MathParser.cpp @@ -18,8 +18,7 @@ // Heavily based on ccalc 0.5.1 by Walery Studennikov -#include -#include +#include "StdAfx.h" #include "MathParser.h" namespace MathParser { diff --git a/Common/MenuTemplate.cpp b/Common/MenuTemplate.cpp index e47fe522..a95059e6 100644 --- a/Common/MenuTemplate.cpp +++ b/Common/MenuTemplate.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "MenuTemplate.h" HMENU MenuTemplate::CreateMenu(const MenuTemplate* items, UINT itemCount, GetStringFunc getString) diff --git a/Common/PathUtil.cpp b/Common/PathUtil.cpp index df9c7d2f..7662019b 100644 --- a/Common/PathUtil.cpp +++ b/Common/PathUtil.cpp @@ -16,8 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "PathUtil.h" -#include namespace PathUtil { diff --git a/Common/Platform.cpp b/Common/Platform.cpp index 4c442546..777d5855 100644 --- a/Common/Platform.cpp +++ b/Common/Platform.cpp @@ -16,8 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "Platform.h" -#include namespace Platform { diff --git a/Common/StdAfx.cpp b/Common/StdAfx.cpp new file mode 100644 index 00000000..d5f5f8d4 --- /dev/null +++ b/Common/StdAfx.cpp @@ -0,0 +1,20 @@ +/* + Copyright (C) 2014 Rainmeter Team + + 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. +*/ + +#include "StdAfx.h" +#include "StdAfx.h" diff --git a/Common/StdAfx.h b/Common/StdAfx.h new file mode 100644 index 00000000..0580642e --- /dev/null +++ b/Common/StdAfx.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2014 Rainmeter Team + + 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. +*/ + +#ifndef __STDAFX_H__ +#define __STDAFX_H__ + +#define _CRTDBG_MAP_ALLOC +#include + +#include +#include +#include +#include +#include +#include // For Gdiplus.h. +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Common/StringUtil.cpp b/Common/StringUtil.cpp index 01398a9e..48961382 100644 --- a/Common/StringUtil.cpp +++ b/Common/StringUtil.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "StdAfx.h" #include "StringUtil.h" namespace StringUtil {