Author: dquintana
Date: Sun Feb 23 16:44:54 2014
New Revision: 62307
URL:
http://svn.reactos.org/svn/reactos?rev=62307&view=rev
Log:
[CMAKE]
* Take MSVC workaround from trunk.
[RSHELL]
* Fix GCC build.
* Add a couple error checks.
Modified:
branches/shell-experiments/base/applications/CMakeLists.txt
branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
branches/shell-experiments/base/shell/rshell/CStartMenu.cpp
branches/shell-experiments/cmake/msvc.cmake
Modified: branches/shell-experiments/base/applications/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/applicat…
==============================================================================
--- branches/shell-experiments/base/applications/CMakeLists.txt [iso-8859-1] (original)
+++ branches/shell-experiments/base/applications/CMakeLists.txt [iso-8859-1] Sun Feb 23
16:44:54 2014
@@ -16,6 +16,7 @@
add_subdirectory(logoff)
add_subdirectory(magnify)
add_subdirectory(mmc)
+add_subdirectory(mplay32)
add_subdirectory(msconfig)
add_subdirectory(mscutils)
add_subdirectory(mstsc)
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Sun Feb 23
16:44:54 2014
@@ -1118,7 +1118,9 @@
tbb.fsStyle = 0;
CComPtr<IShellItem> psi;
- SHCreateShellItem(NULL, m_shellFolder, item, &psi);
+ hr = SHCreateShellItem(NULL, m_shellFolder, item, &psi);
+ if (FAILED(hr))
+ return hr;
hr = psi->GetDisplayName(SIGDN_NORMALDISPLAY, &MenuString);
if (FAILED(hr))
@@ -1150,7 +1152,7 @@
if (i == 0)
{
TBBUTTON tbb = { 0 };
- PWSTR MenuString = L"(Empty)";
+ PCWSTR MenuString = L"(Empty)";
tbb.fsState = 0/*TBSTATE_DISABLED*/;
tbb.fsStyle = 0;
@@ -1301,7 +1303,9 @@
{
HRESULT hr;
CComPtr<IShellItem> psi;
- SHCreateShellItem(NULL, m_shellFolder, GetPidlFromId(uItem), &psi);
+ hr = SHCreateShellItem(NULL, m_shellFolder, GetPidlFromId(uItem), &psi);
+ if (FAILED(hr))
+ return S_FALSE;
SFGAOF attrs;
hr = psi->GetAttributes(SFGAO_FOLDER, &attrs);
@@ -1312,14 +1316,14 @@
}
CMenuBand::CMenuBand() :
+ m_staticToolbar(NULL),
+ m_SFToolbar(NULL),
m_site(NULL),
m_psmc(NULL),
- m_staticToolbar(NULL),
- m_SFToolbar(NULL),
+ m_subMenuChild(NULL),
m_useBigIcons(FALSE),
m_hotBar(NULL),
- m_hotItem(-1),
- m_subMenuChild(NULL)
+ m_hotItem(-1)
{
m_focusManager = CMenuFocusManager::AcquireManager();
}
Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Sun Feb 23
16:44:54 2014
@@ -266,7 +266,7 @@
};
extern "C"
-HRESULT
+HRESULT WINAPI
CStartMenu_Constructor(REFIID riid, void **ppv)
{
IShellMenu* pShellMenu;
Modified: branches/shell-experiments/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/cmake/msvc.cm…
==============================================================================
--- branches/shell-experiments/cmake/msvc.cmake [iso-8859-1] (original)
+++ branches/shell-experiments/cmake/msvc.cmake [iso-8859-1] Sun Feb 23 16:44:54 2014
@@ -121,7 +121,14 @@
if(PCH)
macro(add_pch _target _pch _sources)
- set(_gch ${CMAKE_CURRENT_BINARY_DIR}/${_target}.pch)
+
+ # Workaround for the MSVC toolchain (MSBUILD) /MP bug
+ set(_temp_gch ${CMAKE_CURRENT_BINARY_DIR}/${_target}.pch)
+ if(MSVC_IDE)
+ file(TO_NATIVE_PATH ${_temp_gch} _gch)
+ else()
+ set(_gch ${_temp_gch})
+ endif()
if(IS_CPP)
set(_pch_language CXX)