-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
111 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: MinGW | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- '**.cmd' | ||
- '**.md' | ||
- 'AUTHORS' | ||
- 'NEWS' | ||
- 'ChangeLog' | ||
pull_request: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- '**.cmd' | ||
- '**.md' | ||
- 'AUTHORS' | ||
- 'NEWS' | ||
- 'ChangeLog' | ||
|
||
env: | ||
BUILD_OPTIONS: '--enable-toggable-debug --enable-examples-build --disable-debug --disable-shared' | ||
DRIVERS_PATHS: '--with-wdkdir="wdk/Windows Kits/8.0" --with-wdfver=1011 --with-libusb0="libusb0" --with-libusbk="libusbk/bin"' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- { sys: mingw64, env: x86_64 } | ||
- { sys: mingw32, env: i686 } | ||
|
||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
steps: | ||
- name: Install MinGW | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.sys }} | ||
update: true | ||
install: >- | ||
mingw-w64-${{ matrix.env }}-toolchain | ||
base-devel | ||
git | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: Download support files | ||
shell: cmd | ||
run: | | ||
curl -L https://go.microsoft.com/fwlink/p/?LinkID=253170 -o wdk-redist.msi | ||
curl -L https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip/download -o libusb0-redist.zip | ||
curl -L https://github.com/mcuee/libusbk/releases/download/V3.1.0.0/libusbK-3.1.0.0-bin.7z -o libusbk-redist.7z | ||
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk | ||
7z x libusb0-redist.zip | ||
7z x libusbk-redist.7z | ||
del *.zip | ||
del *.7z | ||
move libusb-win32* libusb0 | ||
move libusbK* libusbk | ||
- name: Build | ||
run: | | ||
./bootstrap.sh | ||
[ "${{ matrix.env }}" == "x86_64" ] && EXTRA_OPTION=--disable-32bit | ||
./configure --build=${{ matrix.env }}-w64-mingw32 --host=${{ matrix.env }}-w64-mingw32 ${{ env.BUILD_OPTIONS }} $EXTRA_OPTION ${{ env.DRIVERS_PATHS }} | ||
make | ||
mkdir -p artifacts/${{ matrix.env }} | ||
mv examples/*.exe artifacts/${{ matrix.env }} | ||
- name: Display SHA-256 | ||
if: ${{ github.event_name == 'push' }} | ||
run: sha256sum artifacts/${{ matrix.env }}/*.exe | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
name: MinGW | ||
path: ./artifacts/*/*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
AC_INIT([libwdi], [1.3.1], [[email protected]], [libwdi], [http://libwdi.akeo.ie]) | ||
AC_INIT([libwdi],[1.3.1],[[email protected]],[libwdi],[http://libwdi.akeo.ie]) | ||
AM_INIT_AUTOMAKE([-Wno-portability 1.11 foreign]) | ||
AC_CONFIG_SRCDIR([libwdi/libwdi.c]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
AM_CONFIG_HEADER([config.h]) | ||
AC_CONFIG_HEADERS(config.h) | ||
# Enable silent build rules by default (Automake v1.11 or later). | ||
# Disable by either passing --disable-silent-rules to configure or passing V=1 to make | ||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], | ||
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) | ||
|
||
AC_PREREQ([2.50]) | ||
AC_PREREQ([2.71]) | ||
AC_PROG_CC | ||
AC_PROG_LIBTOOL | ||
LT_INIT | ||
LT_LANG([Windows Resource]) | ||
AC_C_INLINE | ||
AM_PROG_CC_C_O | ||
|
@@ -108,19 +108,17 @@ CFLAGS="${saved_CFLAGS}" | |
LDFLAGS="${saved_LDFLAGS}" | ||
cross_compiling=$saved_cross_compiling | ||
if test "x$cc_for_build_ok" != "xyes"; then | ||
AC_ERROR([The build compiler cannot produce executables for this | ||
AC_MSG_ERROR(The build compiler cannot produce executables for this | ||
platform. You might have to define the CC_FOR_BUILD environment variable. | ||
For instance, on 32 bit Windows, if using a multilib MinGW-w64 that defaults | ||
to 64 bit executables, you would need: export CC_FOR_BUILD="gcc -m32"]) | ||
to 64 bit executables, you would need: export CC_FOR_BUILD="gcc -m32") | ||
fi | ||
|
||
# 32 bit support | ||
saved_CFLAGS="${CFLAGS}" | ||
CFLAGS="${CFLAGS} -m32" | ||
AC_MSG_CHECKING([whether the compiler can produce 32 bit binaries]) | ||
AC_TRY_COMPILE([], [;], | ||
[compiler_has_m32=yes], | ||
[compiler_has_m32=no]) | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])],[compiler_has_m32=yes],[compiler_has_m32=no]) | ||
if test "x$compiler_has_m32" == "xyes"; then | ||
AC_MSG_RESULT([yes]) | ||
else | ||
|
@@ -132,9 +130,7 @@ CFLAGS="${saved_CFLAGS}" | |
saved_CFLAGS="${CFLAGS}" | ||
CFLAGS="${CFLAGS} -m64" | ||
AC_MSG_CHECKING([whether the compiler can produce 64 bit binaries]) | ||
AC_TRY_COMPILE([], [;], | ||
[compiler_has_m64=yes], | ||
[compiler_has_m64=no]) | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])],[compiler_has_m64=yes],[compiler_has_m64=no]) | ||
if test "x$compiler_has_m64" == "xyes"; then | ||
AC_MSG_RESULT([yes]) | ||
else | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters