Author: tthompson
Date: Wed Jun 1 21:41:53 2016
New Revision: 71494
URL: http://svn.reactos.org/svn/reactos?rev=71494&view=rev
Log:
[CMAKE]
Add some fool-proofing to configure.cmd related to MSVS:
-VSSolution switch now outputs to a dedicated folder if running from source directory.
-Give an error if the user is trying to mix ninja and VSSolution in the same output directory.
-In a MingW environment, give an error on VSSolution switch and give a warning on RTC switch.
Fix -DNEW_STYLE_BUILD=0 option.
Modified:
branches/GSoC_2016/NTFS/configure.cmd
Modified: branches/GSoC_2016/NTFS/configure.cmd
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/configure.cmd?re…
==============================================================================
--- branches/GSoC_2016/NTFS/configure.cmd [iso-8859-1] (original)
+++ branches/GSoC_2016/NTFS/configure.cmd [iso-8859-1] Wed Jun 1 21:41:53 2016
@@ -84,7 +84,7 @@
REM Parse command line parameters
:repeat
- if /I "%1%" == "-DNEW_STYLE_BUILD" (
+ if /I "%1" == "-DNEW_STYLE_BUILD" (
set NEW_STYLE_BUILD=%2
) else if "%BUILD_ENVIRONMENT%" == "MinGW" (
if /I "%1" == "Codeblocks" (
@@ -95,6 +95,13 @@
set CMAKE_GENERATOR="MinGW Makefiles"
) else if /I "%1" == "clang" (
set MINGW_TOOCHAIN_FILE=toolchain-clang.cmake
+ ) else if /I "%1" == "VSSolution" (
+ echo. && echo Error: Creation of VS Solution files is not supported in a MinGW environment.
+ echo Please run this command in a [Developer] Command Prompt for Visual Studio.
+ endlocal
+ exit /b
+ ) else if /I "%1" == "RTC" (
+ echo. && echo Warning: RTC switch is ignored outside of a Visual Studio environment. && echo.
) else (
goto continue
)
@@ -167,13 +174,36 @@
REM Create directories
set REACTOS_OUTPUT_PATH=output-%BUILD_ENVIRONMENT%-%ARCH%
+
+if "%VS_SOLUTION%" == "1" (
+ set REACTOS_OUTPUT_PATH=%REACTOS_OUTPUT_PATH%-sln
+)
+
if "%REACTOS_SOURCE_DIR%" == "%CD%\" (
+ set CD_SAME_AS_SOURCE=1
echo Creating directories in %REACTOS_OUTPUT_PATH%
if not exist %REACTOS_OUTPUT_PATH% (
mkdir %REACTOS_OUTPUT_PATH%
)
cd %REACTOS_OUTPUT_PATH%
+)
+
+if "%VS_SOLUTION%" == "1" (
+
+ if exist build.ninja (
+ echo. && echo Error: This directory has already been configured for ninja.
+ echo An output folder configured for ninja can't be reconfigured for VSSolution.
+ echo Use an empty folder or delete the contents of this folder, then try again.
+ endlocal
+ exit /b
+ )
+) else if exist REACTOS.sln (
+ echo. && echo Error: This directory has already been configured for Visual Studio.
+ echo An output folder configured for VSSolution can't be reconfigured for ninja.
+ echo Use an empty folder or delete the contents of this folder, then try again. && echo.
+ endlocal
+ exit /b
)
if "%NEW_STYLE_BUILD%"=="0" (
@@ -231,7 +261,11 @@
cd..
)
-echo Configure script complete^^! Execute appropriate build commands (ex: ninja, make, nmake, etc...).
+if "%CD_SAME_AS_SOURCE%" == "1" (
+ echo Configure script complete^^! Execute appropriate build commands ^(ex: ninja, make, nmake, etc...^) from %REACTOS_OUTPUT_PATH%.
+) else (
+ echo Configure script complete^^! Execute appropriate build commands ^(ex: ninja, make, nmake, etc...^).
+)
endlocal
exit /b
Author: hbelusca
Date: Wed Jun 1 21:23:37 2016
New Revision: 71493
URL: http://svn.reactos.org/svn/reactos?rev=71493&view=rev
Log:
[DESK.CPL]: Check properly if the StringCbCopy has been copied correctly just by moving the check block to where it belongs.
CID 1322244
Patch by Victor Martinez Calvo
CORE-11212 #resolve
Modified:
trunk/reactos/dll/cpl/desk/background.c
Modified: trunk/reactos/dll/cpl/desk/background.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] Wed Jun 1 21:23:37 2016
@@ -19,7 +19,7 @@
#define PLACEMENT_STRETCH 1
#define PLACEMENT_TILE 2
-/* The values in these macros are dependant on the
+/* The values in these macros are dependent on the
* layout of the monitor image and they must be adjusted
* if that image will be changed.
*/
@@ -348,12 +348,11 @@
if ((result == ERROR_SUCCESS) && (_tcslen(originalWallpaper) > 0))
{
hr = StringCbCopy(wallpaperFilename, sizeof(wallpaperFilename), originalWallpaper);
- }
-
- if (FAILED(hr))
- {
- RegCloseKey(regKey);
- return;
+ if (FAILED(hr))
+ {
+ RegCloseKey(regKey);
+ return;
+ }
}
}