Fix appveyor scripts for Cygwin and MinGW to build as intended
authorChris Dickens <christopher.a.dickens@gmail.com>
Tue, 9 Jan 2018 04:41:50 +0000 (20:41 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Tue, 9 Jan 2018 05:03:50 +0000 (21:03 -0800)
The sub-directory created to store the generated files and build objects
was not being used as intended, because each invocation of the bash
starts in the home directory. Fix this by changing to the intended
directory prior to each command invocation.

Also replace the invocation of autogen.sh with bootstrap.sh, since using
autogen.sh calls ./configure and we weren't using the results of that
work. Instead we call configure directly from the sub-directory while
enabling the examples and test builds (for Cygwin) as autogen.sh would do.

Also fix the invalid value for the --build option provided to the x64
build of MinGW.

Finally, propagate errors from each script command so that failures are
caught and reported.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
appveyor_cygwin.bat
appveyor_minGW.bat
libusb/version_nano.h
msvc/appveyor.bat

index 5e30794a6d53fb3e3fc824a28f14532dabbd1b70..a6fed52a199f2f6472428a7f18835bfea291132e 100644 (file)
@@ -1,14 +1,11 @@
 echo on
 SetLocal EnableDelayedExpansion
 
-if [%Configuration%] NEQ [Debug] goto releaseWin32
-
-:releaseWin32
-if [%Platform%] NEQ [Win32] exit 0
 if [%Configuration%] NEQ [Release] exit 0
-C:\cygwin\bin\bash -e -l -c "mkdir build-Win32-cygwin"
-C:\cygwin\bin\bash -e -l -c ./autogen.sh
-C:\cygwin\bin\bash -e -l -c "cd build-Win32-cygwin"
-C:\cygwin\bin\bash -e -l -c "build-Win32-cygwin/../configure"
-C:\cygwin\bin\bash -e -l -c "make -j4"
-C:\cygwin\bin\bash -e -l -c "make install"
\ No newline at end of file
+if [%Platform%] NEQ [Win32] exit 0
+
+C:\cygwin\bin\bash -e -l -c "./bootstrap.sh" || exit /B
+C:\cygwin\bin\bash -e -l -c "mkdir build-Win32-cygwin" || exit /B
+C:\cygwin\bin\bash -e -l -c "cd build-Win32-cygwin && ../configure --enable-examples-build --enable-tests-build" || exit /B
+C:\cygwin\bin\bash -e -l -c "cd build-Win32-cygwin && make -j4" || exit /B
+C:\cygwin\bin\bash -e -l -c "cd build-Win32-cygwin && make install" || exit /B
index 70aa30d346663d6383d658a81a0be6146be0389e..bdb475001545acb33d2a808dae02e480e289975d 100644 (file)
@@ -1,24 +1,19 @@
 echo on
 SetLocal EnableDelayedExpansion
 
-if [%Configuration%] NEQ [Debug] goto releasex64
-
-:releasex64
-if [%Platform%] NEQ [x64] goto releaseWin32
 if [%Configuration%] NEQ [Release] exit 0
-C:\msys64\usr\bin\bash -e -l -c "mkdir build-x64"
-C:\msys64\usr\bin\bash -e -l -c ./autogen.sh
-C:\msys64\usr\bin\bash -e -l -c "cd build-x64"
-C:\msys64\usr\bin\bash -e -l -c "build-x64/../configure --prefix=/mingw64 --build=--build= --host=x86_64-w64-mingw32"
-C:\msys64\usr\bin\bash -e -l -c "make -j4"
-C:\msys64\usr\bin\bash -e -l -c "make install"
 
-:releaseWin32
+if [%Platform%] NEQ [x64] goto Win32
+C:\msys64\usr\bin\bash -e -l -c "./bootstrap.sh" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "mkdir build-x64" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-x64 && ../configure --prefix=/mingw64 --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-x64 && make -j4" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-x64 && make install" || exit /B
+
+:Win32
 if [%Platform%] NEQ [Win32] exit 0
-if [%Configuration%] NEQ [Release] exit 0
-C:\msys64\usr\bin\bash -e -l -c "mkdir build-Win32"
-C:\msys64\usr\bin\bash -e -l -c ./autogen.sh
-C:\msys64\usr\bin\bash -e -l -c "cd build-Win32"
-C:\msys64\usr\bin\bash -e -l -c "build-Win32/../configure --prefix=/mingw32 --build=i686-w64-mingw32 --host=i686-w64-mingw32"
-C:\msys64\usr\bin\bash -e -l -c "make -j4"
-C:\msys64\usr\bin\bash -e -l -c "make install"
\ No newline at end of file
+C:\msys64\usr\bin\bash -e -l -c "./bootstrap.sh" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "mkdir build-Win32" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-Win32 && ../configure --prefix=/mingw32 --build=i686-w64-mingw32 --host=i686-w64-mingw32" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-Win32 && make -j4" || exit /B
+C:\msys64\usr\bin\bash -e -l -c "cd build-Win32 && make install" || exit /B
index 796ce88e57bb1683f02f27a0842bc935f730aa0f..203581d1222a4b4c677e7b8d028f4d22e1f9b061 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11285
+#define LIBUSB_NANO 11286
index 779af59d9fa949a41203d683192b4020664e11a8..b70343597deac65e5b53558f5df4046e5143b950 100644 (file)
@@ -7,22 +7,21 @@ if [%Configuration%] NEQ [Release] goto debugx64
 :debugx64
 if [%Platform%] NEQ [x64] goto debugWin32
 if [%Configuration%] NEQ [Debug] exit 0
-call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Debug /x64
-msbuild %libusb_2010% /p:Configuration=Debug,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Debug /x64 || exit /B
+msbuild %libusb_2010% /p:Configuration=Debug,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
 
 :releasex64
 if [%Platform%] NEQ [x64] goto releaseWin32
 if [%Configuration%] NEQ [Release] exit 0
-call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /x64
-msbuild %libusb_2010% /p:Configuration=Release,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /x64 || exit /B
+msbuild %libusb_2010% /p:Configuration=Release,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
 
 :debugWin32
 if [%Platform%] NEQ [Win32] exit 0
 if [%Configuration%] NEQ [Debug] exit 0
-msbuild %libusb_2010% /p:Configuration=Debug,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+msbuild %libusb_2010% /p:Configuration=Debug,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
 
 :releaseWin32
 if [%Platform%] NEQ [Win32] exit 0
 if [%Configuration%] NEQ [Release] exit 0
-msbuild %libusb_2010% /p:Configuration=Release,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
+msbuild %libusb_2010% /p:Configuration=Release,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B