win: Run make check when bundling

This commit is contained in:
Alexander Kojevnikov 2013-10-24 16:52:18 -07:00
parent 91bb390bdb
commit 2e48240d07
4 changed files with 105 additions and 6 deletions

4
dist/win/README.md vendored
View File

@ -8,9 +8,9 @@ This is done in two steps:
For the first step you can use any Unix-y environment. Set up
[MXE](http://mxe.cc/#tutorial).
Build Spek dependencies:
Apply `mxe.diff` and build Spek dependencies:
make pthreads ffmpeg wxwidgets
make pthreads ffmpeg wxwidgets -j4 JOBS=4
Build Spek, adjusting `bundle.sh` variables as necessary:

6
dist/win/bundle.bat vendored
View File

@ -3,9 +3,13 @@ rem Check README.md in this directory for instructions.
set WIX_PATH=c:\Program Files\Windows Installer XML v3.5\bin
del spek.msi
cd tests
test.exe
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..
rem Generate a wxs for files in Spek
del spek.msi
move Spek\spek.exe .\
"%WIX_PATH%"\heat dir Spek -gg -ke -srd -cg Files -dr INSTALLLOCATION -template fragment -o files.wxs
move spek.exe Spek\

21
dist/win/bundle.sh vendored
View File

@ -24,17 +24,27 @@ rm -fr dist/win/build && mkdir dist/win/build
rm -f dist/win/spek.res
"$WINDRES" dist/win/spek.rc -O coff -o dist/win/spek.res
mkdir -p src/dist/win && cp dist/win/spek.res src/dist/win/
mkdir -p tests/dist/win && cp dist/win/spek.res tests/dist/win/
# Compile and strip spek.exe
LDFLAGS="dist/win/spek.res" ./autogen.sh \
LDFLAGS="-mwindows dist/win/spek.res" ./autogen.sh \
--host="$HOST" \
--disable-valgrind \
--with-wx-config="$WX_CONFIG" \
--prefix=${PWD}/dist/win/build && \
"$MAKE" && \
"$MAKE" -j8 && \
"$MAKE" install || exit 1
"$STRIP" dist/win/build/bin/spek.exe
"$UPX" dist/win/build/bin/spek.exe
# Compile test.exe
LDFLAGS="-mconsole" ./autogen.sh \
--host="$HOST" \
--disable-valgrind \
--with-wx-config="$WX_CONFIG" \
--prefix=${PWD}/dist/win/build && \
"$MAKE" check -j8
# Copy files to the bundle
cd dist/win
rm -fr Spek && mkdir Spek
@ -50,6 +60,11 @@ for lang in $LANGUAGES; do
done
rm -fr build
# Copy tests
rm -fr tests && mkdir tests
cp ../../tests/.libs/test.exe tests/
cp -a ../../tests/samples tests/
# Create a zip archive
rm -f spek.zip
"$ZIP" -r spek.zip Spek
@ -57,5 +72,5 @@ rm -f spek.zip
cd ../..
# Clean up
rm -fr src/dist
rm -fr src/dist tests/dist
rm dist/win/spek.res

80
dist/win/mxe.diff vendored Normal file
View File

@ -0,0 +1,80 @@
diff --git a/src/ffmpeg.mk b/src/ffmpeg.mk
index 8b90d69..fab1a73 100644
--- a/src/ffmpeg.mk
+++ b/src/ffmpeg.mk
@@ -3,13 +3,13 @@
PKG := ffmpeg
$(PKG)_IGNORE := 2%
-$(PKG)_VERSION := 1.2.3
-$(PKG)_CHECKSUM := f083c92075fe010f17416bc880dfca101535276d
+$(PKG)_VERSION := 2.0.2
+$(PKG)_CHECKSUM := 47d3b3d172ae81f0571549e4dfaadfe5b4fe06cc
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://www.ffmpeg.org/releases/$($(PKG)_FILE)
$(PKG)_URL_2 := http://launchpad.net/ffmpeg/main/$($(PKG)_VERSION)/+download/$($(PKG)_FILE)
-$(PKG)_DEPS := gcc bzip2 lame libass libnut libvpx opencore-amr opus sdl speex theora vo-aacenc vo-amrwbenc vorbis x264 xvidcore zlib
+$(PKG)_DEPS := gcc bzip2 opus zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.ffmpeg.org/download.html' | \
@@ -31,26 +31,20 @@ define $(PKG)_BUILD
--disable-pthreads \
--enable-w32threads \
--disable-doc \
+ --disable-programs \
--enable-gpl \
--enable-version3 \
--disable-nonfree \
- --enable-avisynth \
- --enable-libass \
- --disable-libfaac \
- --enable-libmp3lame \
- --enable-libnut \
- --enable-libopencore-amrnb \
- --enable-libopencore-amrwb \
- --enable-libopus \
- --enable-libspeex \
- --enable-libtheora \
- --enable-libvo-aacenc \
- --enable-libvo-amrwbenc \
- --enable-libvorbis \
- --enable-libvpx \
- --enable-libx264 \
- --enable-libxvid \
- --enable-postproc
+ --disable-avdevice \
+ --disable-swresample \
+ --disable-swscale \
+ --disable-postproc \
+ --disable-avfilter \
+ --disable-encoders \
+ --disable-muxers \
+ --disable-devices \
+ --disable-filters \
+ --enable-libopus
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
endef
diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk
index db37a9a..8f37ffd 100644
--- a/src/wxwidgets.mk
+++ b/src/wxwidgets.mk
@@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 0bab57ecd6d065a3672ec5fbb09d287456727ea4
$(PKG)_SUBDIR := wxWidgets-$($(PKG)_VERSION)
$(PKG)_FILE := wxWidgets-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE)
-$(PKG)_DEPS := gcc libiconv libpng jpeg tiff sdl zlib expat
+$(PKG)_DEPS := gcc libiconv libpng jpeg tiff zlib expat
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/wxwindows/files/' | \
@@ -39,7 +39,6 @@ define $(PKG)_CONFIGURE_OPTS
--with-regex=yes \
--with-zlib=sys \
--with-expat=sys \
- --with-sdl \
--without-gtk \
--without-motif \
--without-mac \