From 28bf05e265228a886be986d6c424df3fe806f104 Mon Sep 17 00:00:00 2001 From: David Quintana Date: Sat, 1 Mar 2014 11:46:04 +0000 Subject: [PATCH] [RSHELL] * Move dependency copying to the target script, so that the target properly depends on the source and not the other way around. * Make all the custom constructors WINAPI. * Add all the custom constructors to the spec file. CORE-7596 svn path=/branches/shell-experiments/; revision=62365 --- base/shell/explorer-new/CMakeLists.txt | 6 ++++++ base/shell/filebrowser/CMakeLists.txt | 13 ++++++++++++- base/shell/rshell/CMakeLists.txt | 6 ------ base/shell/rshell/CMenuBand.cpp | 2 +- base/shell/rshell/CMenuDeskBar.cpp | 2 +- base/shell/rshell/CMenuSite.cpp | 2 +- base/shell/rshell/CMergedFolder.cpp | 2 +- base/shell/rshell/logging/CMenuBandWrap.cpp | 2 +- base/shell/rshell/logging/CMenuDeskBarWrap.cpp | 2 +- base/shell/rshell/logging/CMenuSiteWrap.cpp | 2 +- .../rshell/logging/CStartMenuSiteWrap.cpp | 2 +- base/shell/rshell/precomp.h | 18 ++++++++++-------- base/shell/rshell/rshell.spec | 3 +++ dll/win32/browseui/CMakeLists.txt | 1 + 14 files changed, 40 insertions(+), 23 deletions(-) diff --git a/base/shell/explorer-new/CMakeLists.txt b/base/shell/explorer-new/CMakeLists.txt index 0653b33c13b..20518f20e2e 100644 --- a/base/shell/explorer-new/CMakeLists.txt +++ b/base/shell/explorer-new/CMakeLists.txt @@ -39,3 +39,9 @@ add_importlibs(explorer_new ntdll) add_pch(explorer_new precomp.h SOURCE) add_cd_file(TARGET explorer_new DESTINATION reactos FOR all) + +add_custom_command(TARGET explorer_new POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy + "$" + "$/$" + COMMENT "Copying $ to output") diff --git a/base/shell/filebrowser/CMakeLists.txt b/base/shell/filebrowser/CMakeLists.txt index 81209bcf006..fda8e7710a1 100644 --- a/base/shell/filebrowser/CMakeLists.txt +++ b/base/shell/filebrowser/CMakeLists.txt @@ -11,4 +11,15 @@ add_importlibs(filebrowser shell32 msvcrt kernel32) - \ No newline at end of file + +add_custom_command(TARGET filebrowser POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy + "$" + "$/$" + COMMENT "Copying $ to output") + +add_custom_command(TARGET filebrowser POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy + "$" + "$/$" + COMMENT "Copying $ to output") diff --git a/base/shell/rshell/CMakeLists.txt b/base/shell/rshell/CMakeLists.txt index ae88c160fd8..08917e91fd6 100644 --- a/base/shell/rshell/CMakeLists.txt +++ b/base/shell/rshell/CMakeLists.txt @@ -43,9 +43,3 @@ add_importlibs(rshell ntdll) add_cd_file(TARGET rshell DESTINATION reactos FOR all) - -add_custom_command(TARGET rshell POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy - "$" - "$/$" - COMMENT "Copying to output directory") diff --git a/base/shell/rshell/CMenuBand.cpp b/base/shell/rshell/CMenuBand.cpp index 09afc7f432f..5f27441592d 100644 --- a/base/shell/rshell/CMenuBand.cpp +++ b/base/shell/rshell/CMenuBand.cpp @@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(CMenuBand); extern "C" -HRESULT CMenuBand_Constructor(REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuBand_Constructor(REFIID riid, LPVOID *ppv) { *ppv = NULL; diff --git a/base/shell/rshell/CMenuDeskBar.cpp b/base/shell/rshell/CMenuDeskBar.cpp index 80079950657..bbacac028fb 100644 --- a/base/shell/rshell/CMenuDeskBar.cpp +++ b/base/shell/rshell/CMenuDeskBar.cpp @@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(CMenuDeskBar); const static GUID CGID_MenuDeskBar = { 0x5C9F0A12, 0x959E, 0x11D0, { 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x08, 0x26, 0x36 } }; extern "C" -HRESULT CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv) { *ppv = NULL; diff --git a/base/shell/rshell/CMenuSite.cpp b/base/shell/rshell/CMenuSite.cpp index a03955769da..beba7ba5d36 100644 --- a/base/shell/rshell/CMenuSite.cpp +++ b/base/shell/rshell/CMenuSite.cpp @@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(menusite); extern "C" -HRESULT CMenuSite_Constructor(REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuSite_Constructor(REFIID riid, LPVOID *ppv) { *ppv = NULL; diff --git a/base/shell/rshell/CMergedFolder.cpp b/base/shell/rshell/CMergedFolder.cpp index 42125821eac..02d708cef47 100644 --- a/base/shell/rshell/CMergedFolder.cpp +++ b/base/shell/rshell/CMergedFolder.cpp @@ -124,7 +124,7 @@ public: }; extern "C" -HRESULT CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv) { *ppv = NULL; diff --git a/base/shell/rshell/logging/CMenuBandWrap.cpp b/base/shell/rshell/logging/CMenuBandWrap.cpp index af651221fa2..d0559976078 100644 --- a/base/shell/rshell/logging/CMenuBandWrap.cpp +++ b/base/shell/rshell/logging/CMenuBandWrap.cpp @@ -170,7 +170,7 @@ public: }; extern "C" -HRESULT CMenuBand_Wrapper(IShellMenu * shellMenu, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuBand_Wrapper(IShellMenu * shellMenu, REFIID riid, LPVOID *ppv) { HRESULT hr; diff --git a/base/shell/rshell/logging/CMenuDeskBarWrap.cpp b/base/shell/rshell/logging/CMenuDeskBarWrap.cpp index ed293819dab..44c1e044001 100644 --- a/base/shell/rshell/logging/CMenuDeskBarWrap.cpp +++ b/base/shell/rshell/logging/CMenuDeskBarWrap.cpp @@ -110,7 +110,7 @@ public: }; extern "C" -HRESULT CMenuDeskBar_Wrapper(IDeskBar * deskBar, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuDeskBar_Wrapper(IDeskBar * deskBar, REFIID riid, LPVOID *ppv) { HRESULT hr; diff --git a/base/shell/rshell/logging/CMenuSiteWrap.cpp b/base/shell/rshell/logging/CMenuSiteWrap.cpp index fc34b9bb4ef..c852c885797 100644 --- a/base/shell/rshell/logging/CMenuSiteWrap.cpp +++ b/base/shell/rshell/logging/CMenuSiteWrap.cpp @@ -104,7 +104,7 @@ public: }; extern "C" -HRESULT CMenuSite_Wrapper(IBandSite * bandSite, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMenuSite_Wrapper(IBandSite * bandSite, REFIID riid, LPVOID *ppv) { HRESULT hr; diff --git a/base/shell/rshell/logging/CStartMenuSiteWrap.cpp b/base/shell/rshell/logging/CStartMenuSiteWrap.cpp index 7efd82d1262..11babdb118f 100644 --- a/base/shell/rshell/logging/CStartMenuSiteWrap.cpp +++ b/base/shell/rshell/logging/CStartMenuSiteWrap.cpp @@ -70,7 +70,7 @@ public: }; extern "C" -HRESULT CStartMenuSite_Wrapper(ITrayPriv * trayPriv, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CStartMenuSite_Wrapper(ITrayPriv * trayPriv, REFIID riid, LPVOID *ppv) { HRESULT hr; diff --git a/base/shell/rshell/precomp.h b/base/shell/rshell/precomp.h index 7836d0d1843..46aa47a82c1 100644 --- a/base/shell/rshell/precomp.h +++ b/base/shell/rshell/precomp.h @@ -41,14 +41,16 @@ #define SMC_EXEC 4 extern "C" INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc); -extern "C" HRESULT CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMenuSite_Constructor(REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMenuBand_Constructor(REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMenuDeskBar_Wrapper(IDeskBar * db, REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMenuSite_Wrapper(IBandSite * bs, REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMenuBand_Wrapper(IShellMenu * sm, REFIID riid, LPVOID *ppv); -extern "C" HRESULT CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv); -extern "C" HRESULT CStartMenuSite_Wrapper(ITrayPriv * trayPriv, REFIID riid, LPVOID *ppv); + +extern "C" HRESULT WINAPI CStartMenu_Constructor(REFIID riid, void **ppv); +extern "C" HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMenuSite_Constructor(REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMenuBand_Constructor(REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMenuDeskBar_Wrapper(IDeskBar * db, REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMenuSite_Wrapper(IBandSite * bs, REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMenuBand_Wrapper(IShellMenu * sm, REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CStartMenuSite_Wrapper(ITrayPriv * trayPriv, REFIID riid, LPVOID *ppv); static __inline ULONG Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...) diff --git a/base/shell/rshell/rshell.spec b/base/shell/rshell/rshell.spec index 49da9fcc6f4..e0b5934882c 100644 --- a/base/shell/rshell/rshell.spec +++ b/base/shell/rshell/rshell.spec @@ -1,4 +1,7 @@ @ stdcall CStartMenu_Constructor(ptr ptr) +@ stdcall CMenuDeskBar_Constructor(ptr ptr); +@ stdcall CMenuSite_Constructor(ptr ptr); +@ stdcall CMenuBand_Constructor(ptr ptr); @ stdcall SHDesktopMessageLoop(ptr) @ stdcall SHCreateDesktop(ptr) @ stdcall WinList_Init() \ No newline at end of file diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt index b9966066e02..8305bd8b37d 100644 --- a/dll/win32/browseui/CMakeLists.txt +++ b/dll/win32/browseui/CMakeLists.txt @@ -1,3 +1,4 @@ +PROJECT(SHELL) set_cpp(WITH_RUNTIME)