]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/mingw/sigrok-cross-mingw
sigrok-cross-mingw: Enable decoder support (works on Windows now).
[sigrok-util.git] / cross-compile / mingw / sigrok-cross-mingw
index c2cf88baafbc04638a8da6ef4abc654d06b0b1bf..27b849402d11122a3449253e9e465844a07badbf 100755 (executable)
@@ -19,6 +19,8 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+set -e
+
 # The path where your MXE directory is located.
 MXE=$HOME/mxe-git
 
@@ -89,6 +91,7 @@ cd ..
 # libsigrok
 git clone git://sigrok.org/libsigrok
 cd libsigrok
+patch -p1 < ../../libsigrok_firmwaredir.patch
 ./autogen.sh
 PKG_CONFIG_PATH_i686_pc_mingw32=$P ./configure $C $L && make install
 cd ..
@@ -100,9 +103,29 @@ cd libsigrokdecode
 PYTHON3_CONFIG=$PREFIX/bin/python3-config PKG_CONFIG_PATH_i686_pc_mingw32=$P ./configure $C $L && make install
 cd ..
 
+# sigrok-firmware
+git clone git://sigrok.org/sigrok-firmware
+cd sigrok-firmware
+./autogen.sh
+# Nothing gets cross-compiled here, we just need 'make install' basically.
+./configure --prefix=$PREFIX
+make install
+cd ..
+
+# sigrok-firmware-fx2lafw
+git clone git://sigrok.org/sigrok-firmware-fx2lafw
+cd sigrok-firmware-fx2lafw
+./autogen.sh
+# We're building the fx2lafw firmware on the host, no need to cross-compile.
+./configure --prefix=$PREFIX
+make
+make install
+cd ..
+
 # sigrok-cli
 git clone git://sigrok.org/sigrok-cli
 cd sigrok-cli
+patch -p1 < ../../sigrok_cli_decodersdir.patch
 ./autogen.sh
 PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 ./configure $C && make install
 makensis -DHOME=$HOME contrib/sigrok-cli_cross.nsi
@@ -111,8 +134,9 @@ cd ..
 # PulseView
 git clone git://sigrok.org/pulseview
 cd pulseview
-patch -p1 < ../../pulseview.patch
-PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y . && make install VERBOSE=1
+patch -p1 < ../../pulseview_linkfix.patch
+patch -p1 < ../../pulseview_decodersdir.patch
+PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_DECODE=y . && make install VERBOSE=1
 makensis -DHOME=$HOME contrib/pulseview_cross.nsi
 cd ..