Skip to content

Commit

Permalink
Merge pull request #870 from slyshykO/develop
Browse files Browse the repository at this point in the history
add win32 travis build
  • Loading branch information
Nightwalker-87 authored Mar 11, 2020
2 parents 85f212f + 83a31a0 commit 92dda7a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .travis-lin-mingw.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

DIR=$PWD

if [ "$TRAVIS_OS_NAME" == "linux" ]; then
echo "WORK DIR:$DIR"
mkdir -p $DIR/build/linux-mingw32-release
cd $DIR/build/linux-mingw32-release
echo "cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./cmake/linux-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$PWD/_install $DIR"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./cmake/linux-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$PWD/_install $DIR
echo "make"
make
fi

3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ addons:
- g++-6
- gcc-6
- libusb-1.0.0-dev
- p7zip
- mingw-w64

script:
- git fetch --tags
- printenv
- cmake --version
- ./.travis.sh
- ./.travis-lin-mingw.sh
3 changes: 2 additions & 1 deletion cmake/modules/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ if(NOT LIBUSB_FOUND)
file(MAKE_DIRECTORY ${LIBUSB_WIN_OUTPUT_FOLDER})

if(${ZIP_EXECUTABLE} MATCHES "p7zip")
execute_process(COMMAND ${ZIP_EXECUTABLE} -d --keep -f ${LIBUSB_WIN_ARCHIVE_PATH} WORKING_DIRECTORY ${LIBUSB_WIN_OUTPUT_FOLDER})
#execute_process(COMMAND ${ZIP_EXECUTABLE} -d --keep -f ${LIBUSB_WIN_ARCHIVE_PATH} WORKING_DIRECTORY ${LIBUSB_WIN_OUTPUT_FOLDER})
execute_process(COMMAND ${ZIP_EXECUTABLE} -d ${LIBUSB_WIN_ARCHIVE_PATH} WORKING_DIRECTORY ${LIBUSB_WIN_OUTPUT_FOLDER})
else()
execute_process(COMMAND ${ZIP_EXECUTABLE} x -y ${LIBUSB_WIN_ARCHIVE_PATH} -o${LIBUSB_WIN_OUTPUT_FOLDER})
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int _stlink_usb_version(stlink_t *sl) {
cmd[i++] = STLINK_APIV3_GET_VERSION_EX;

size = send_recv(slu, 1, cmd, slu->cmd_len, data, rep_len);
if (size != rep_len) {
if (size != (ssize_t)rep_len) {
printf("[!] send_recv STLINK_APIV3_GET_VERSION_EX\n");
return (int) size;
}
Expand Down

0 comments on commit 92dda7a

Please sign in to comment.