| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #!/bin/bash
- set -e
- set -x
- tag="$1"; shift
- [ -n "$tag" ] || exit 1
- sw="$1"; shift || true
- [ -n "$sw" ] || sw="$tag"
- IDIR="$PWD"
- ZIPNAME="${sw}-win32"
- OUTDIR="$PWD/w32zip/$ZIPNAME"
- TMPDIR="${OUTDIR}-tmp"
- set -e
- mkdir -v "$OUTDIR"
- cp -v \
- -L \
- pdcurses.dll \
- libcurl-4.dll \
- pthreadGC2.dll \
- libusb-1.0.dll \
- "$OUTDIR/"
- git branch TMP "$tag"
- git clone . "$TMPDIR" -b TMP --depth 1
- git branch -D TMP
- cd "$TMPDIR"
- git archive --prefix "$sw"/ --format tar "$tag" | tar xvp
- cd "$sw"
- ./autogen.sh
- cd ..
- zip -r "$IDIR/${sw}.zip" "$sw"
- tar cjvpf "$IDIR/${sw}.tbz2" "$sw"
- SRCDIR="$TMPDIR/$sw"
- for txt in AUTHORS COPYING NEWS README API-README FPGA-README; do
- cp -v "$txt" "$OUTDIR/${txt}.txt"
- done
- cp -av "bitstreams" "$OUTDIR/"
- cp -av "$IDIR/"ADL_SDK/adl_{defines,sdk,structures}.h "ADL_SDK/"
- ./autogen.sh
- ./configure \
- --prefix='C:\\Program Files\\BFGMiner\' \
- CFLAGS='-march=i686 -Wall' \
- --disable-cpumining \
- --enable-opencl \
- --enable-adl \
- --enable-bitforce \
- --enable-icarus \
- --enable-modminer \
- --enable-ztex \
- --build=i686-pc-linux-gnu \
- --host=i686-pc-mingw32
- make -j4
- cp -v \
- bfgminer.exe \
- *.cl \
- example.conf \
- windows-build.txt \
- API.class \
- miner.php \
- "$OUTDIR/" -v
- cd "$OUTDIR"
- cd ..
- zip -r "$IDIR/${ZIPNAME}.zip" "${ZIPNAME}"
- cd "$IDIR"
|