Merge pull request #184 from abakum/abakum-msys2

create an msys2 rebuild script that people can use
master
Dan 2020-03-05 11:30:40 +00:00 committed by GitHub
commit 3f423ec697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 14 deletions

View File

@ -205,7 +205,13 @@ Common:
pacman -Syu
pacman -Sy --needed base-devel \
flex \
zlib-devel
zlib-devel \
git
```
Or just run:
```
./rebuild_msys2.sh
```
Close the Msys2 prompt and then open either a Mingw32 or a Mingw64 prompt, depending on whether you want to build for 32 or 64 bit.
@ -216,34 +222,37 @@ $MINGW_PACKAGE_PREFIX-freetype \
$MINGW_PACKAGE_PREFIX-zlib \
$MINGW_PACKAGE_PREFIX-ninja
```
Browse to the location of the tsMuxer repo and then run:
```
./rebuild_linux.sh
```
This will create statically compiled versions of tsMuxer - so no external DLL files are required.
If you intend to build the GUI as well you need to also install these, depending on your platform (please note Qt5 takes up a LOT of disk space!):
```
pacman -Sy --needed $MINGW_PACKAGE_PREFIX-qt5-static
```
Before we compile anything we have to alter a file to work around [this bug](https://bugreports.qt.io/browse/QTBUG-76660). Run the following commands to fix that:
```
echo 'load(win32/windows_vulkan_sdk)' > $MINGW_PREFIX/qt5-static/share/qt5/mkspecs/common/windows-vulkan.conf
echo 'QMAKE_LIBS_VULKAN =' >> $MINGW_PREFIX/qt5-static/share/qt5/mkspecs/common/windows-vulkan.conf
```
With that fixed then run:
Download tsMuxer repo and browse to the it location by run:
```
./rebuild_linux_with_gui.sh
cd ~
git clone https://github.com/justdan96/tsMuxer.git
cd tsMuxer
```
Compile tsMuxer by run:
```
./rebuild_linux.sh
```
This will create statically compiled versions of tsMuxer and tsMuxerGUI - so no external DLL files are required.
This will create in tsMuxer/bin statically compiled versions of tsMuxer - so no external DLL files are required.
Or just run:
```
./rebuild_msys2.sh
```
This will create in tsMuxer/bin statically compiled versions of tsMuxer and tsMuxerGUI - so no external DLL files are required.
## MacOS (osxcross on Linux)

40
rebuild_msys2.sh Normal file
View File

@ -0,0 +1,40 @@
#!/usr/bin/bash
cd ~
if [ "$MSYSTEM" == "MSYS" ] ; then
pacman -Syu
pacman -Sy --needed base-devel \
flex \
zlib-devel \
git
if [ ! -d tsmuxer ] ; then
git clone https://github.com/justdan96/tsMuxer.git
fi
else
cd tsmuxer
if [ ! -d build ] ; then
pacman -Sy --needed $MINGW_PACKAGE_PREFIX-toolchain \
$MINGW_PACKAGE_PREFIX-cmake \
$MINGW_PACKAGE_PREFIX-freetype \
$MINGW_PACKAGE_PREFIX-zlib \
$MINGW_PACKAGE_PREFIX-ninja
if [ ! -d $MINGW_PREFIX/qt5-static ] ; then
echo If you intend to build the tsMuxerGUI enter Y
pacman -S --needed $MINGW_PACKAGE_PREFIX-qt5-static
fi
if [ -d $MINGW_PREFIX/qt5-static ] ; then
echo 'load(win32/windows_vulkan_sdk)' > $MINGW_PREFIX/qt5-static/share/qt5/mkspecs/common/windows-vulkan.conf
echo 'QMAKE_LIBS_VULKAN =' >> $MINGW_PREFIX/qt5-static/share/qt5/mkspecs/common/windows-vulkan.conf
fi
mkdir build
fi
git pull
cd build
cmake ../ -G Ninja -DTSMUXER_STATIC_BUILD=true
ninja && cp -u tsMuxer/tsmuxer.exe ../bin/
if [ -d $MINGW_PREFIX/qt5-static ] ; then
$MINGW_PREFIX/qt5-static/bin/qmake ../tsMuxerGUI
make && cp -u tsMuxerGUI.exe ../bin/
fi
cd ..
fi