$ git clone http://tcclient.ion.nu/tc_client.git
commit 05b6b548353115e411f43f45cd180cbecaaaa5a5
Author: Alicia <...>
Date:   Wed Oct 12 19:36:25 2016 +0200

    Added scripts for generating binary packages on GNU/Linux and windows.

diff --git a/ChangeLog b/ChangeLog
index b004f5f..8af605b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Improved the RTMP acknowledgement code: counting the format 3 headers which were
 Interpret the "from_owner" subcommand "_close" to tell if our media stream was closed.
 Fixed a bug that caused tc_client to not know the nickname if the chosen one wasn't available at startup, manifesting as broadcasting not working unless the initial nickname was free.
 Added support for sending audio packets with "/audio <length>", followed by the binary data.
+Added scripts for generating binary packages on GNU/Linux and windows.
 tc_client-gtk: merged camera_remove() and camera_removebynick() into a single function, merged the deallocation of camera data into camera_free()
 tc_client-gtk: moved the postprocessing code into its own source file.
 tc_client-gtk: added greenscreen postprocessor.
diff --git a/dist/appimage.sh b/dist/appimage.sh
new file mode 100755
index 0000000..cb41a8a
--- /dev/null
+++ b/dist/appimage.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+# This script has been tested on xubuntu 14.04, the resulting appimage has been successfully tested on:
+# xubuntu 14.04
+# xubuntu 16.04
+# ubuntu 14.04
+# archbang 100816
+
+# Build our own recent and minimal ffmpeg. Distro-provided ffmpeg is old (because we build appimage on an old distro for backward-compatibility) and buggy, caused segfaults
+rootdir="`pwd`"
+mkdir -p deps/src
+(
+  cd deps/src
+  wget -c https://www.ffmpeg.org/releases/ffmpeg-3.1.4.tar.xz
+  tar -xJf ffmpeg-3.1.4.tar.xz
+  cd ffmpeg-3.1.4
+  mkdir -p build
+  cd build
+  ../configure --prefix="${rootdir}/deps" --enable-gpl --disable-programs --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-avdevice --disable-avformat --disable-postproc --disable-avfilter --disable-encoders --enable-encoder="flv" --disable-decoders --enable-decoder="flv" --disable-parsers --disable-bsfs --disable-devices --disable-sdl --disable-libxcb --disable-xlib --enable-static --disable-shared
+  make
+  make install
+)
+export PKG_CONFIG_PATH="`pwd`/deps/lib/pkgconfig"
+# Then build tc_client
+./configure --prefix='.'
+make utils || exit
+make install PREFIX="appdir/usr" || exit
+strip appdir/usr/bin/*
+cat > appdir/AppRun << 'END'
+#!/bin/sh
+HERE="`readlink -f "$0"`"
+HERE="`dirname "$HERE"`"
+# echo "$HERE"
+export PATH="${HERE}/usr/bin:${PATH}"
+export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
+cd "${HERE}/usr"
+bin/tc_client-gtk
+END
+chmod +x appdir/AppRun
+cat > appdir/app.desktop << 'END'
+[Desktop Entry]
+Name=tc_client
+Exec=usr/bin/tc_client-gtk
+Icon=tc_client
+END
+convert -font /usr/share/fonts/truetype/*/DejaVuSans.ttf -size 32x32 'label:tc_c\nlient' appdir/tc_client.png
+# Find library dependencies for the executables
+mkdir -p appdir/usr/lib
+ldd appdir/usr/bin/* | while read dep; do
+  if ! echo "$dep" | grep -q ' => '; then continue;fi
+  name="`echo "$dep" | sed -e 's/ => .*//; s/^[\t ]*//'`"
+  path="`echo "$dep" | sed -e 's/.* => //; s/ (.*//'`"
+  # Exclude stable ABI libraries
+  case "$name" in
+    libc.so.*|\
+    libdl.so.*|\
+    libm.so.*|\
+    libz.so.*|\
+    libresolv.so.*|\
+    libpthread.so.*|\
+    libfontconfig.so.*|\
+    libfreetype.so.*|\
+    libharfbuzz.so.*|\
+    libffi.so.*|\
+    libexpat.so.*|\
+    libgdk_pixbuf-2.0.so.*|\
+    libX*|\
+    libxcb*|\
+    libSM.so.*|\
+    libICE.so.*|\
+    libpango-1.0.so.*|\
+    libpangocairo-1.0.so.*|\
+    libpangoft2-1.0.so.*|\
+    libatk-1.0.so.*|\
+    libatk-bridge-2.0.so.*|\
+    libatspi.so.*|\
+    libgdk-3.so.*|\
+    libgtk-3.so.*|\
+    libgio-2.0.so.*|\
+    libgobject-2.0.so.*|\
+    libglib-2.0.so.*|\
+    libgthread-2.0.so.*|\
+    libgmodule-2.0.so.*|\
+    libv4l2.so.*|\
+    libv4lconvert.so.*|\
+    libcairo.so.*|\
+    libcairo-gobject.so.*|\
+    libssl.so.*|\
+    libcrypto.so.*|\
+    libxkbcommon.so.*|\
+    libgpg-error.so.*) continue;;
+  esac
+  cp -L "$path" appdir/usr/lib
+done
+version="`sed -n -e 's/^VERSION=//p' Makefile`"
+arch="`uname -m | sed -e 's/^i[3-7]86$/x86/'`"
+AppImageAssistant appdir "tc_client-${version}-gnulinux-${arch}.appimage"
diff --git a/dist/w32.sh b/dist/w32.sh
new file mode 100755
index 0000000..5adfde5
--- /dev/null
+++ b/dist/w32.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+# Note: this script is written for msys2 and is unlikely to work with anything else
+getdlls()
+{
+  objdump -p "$1" | sed -n -e 's/.*DLL Name: //p' | while read name; do
+    if ! grep -q -x -F "$name" .handleddeps; then
+      echo "$name" >> .handleddeps
+      file="`which "$name"`"
+      # Skip windows system files
+      if echo "$file" | grep -q '^/[a-z]/'; then continue; fi
+      if echo "$file" | grep -q '^/cygdrive/'; then continue; fi
+      echo "$file"
+      getdlls "$file"
+    fi
+  done
+}
+finddeps()
+{
+  rm -f .handleddeps
+  touch .handleddeps
+  getdlls "$1"
+  rm -f .handleddeps
+}
+
+rm -rf escapi*
+# Find and download the latest version of ESCAPI
+curl -s 'http://sol.gfxile.net/zip/?C=M;O=D' | sed -n -e 's|.*<a [^>]*>\(escapi[^<]*\)<.*|http://sol.gfxile.net/zip/\1|p' | head -n 1 | xargs wget
+mkdir escapi
+(cd escapi; unzip ../escapi*.zip)
+version="`sed -n -e 's/^VERSION=//p' Makefile`"
+mkdir -p "tc_client-${version}-w32/bin"
+here="`pwd`"
+
+# Build the core first
+export MSYSTEM='MSYS'
+. /etc/profile
+cd "$here"
+./configure
+# make tc_client modbot irchack cursedchat
+make tc_client cursedchat CURL_LIBS='-lcurl' || exit 1 # (curl's pkg-config data seems to pull in unnecessary libraries)
+
+# Erase objects used both in msys and mingw32
+find . -name '*.o' -delete
+
+# Then the GUI
+export MSYSTEM='MINGW32'
+. /etc/profile
+cd "$here"
+./configure
+make || exit 1
+
+cp *.exe gtkgui.glade "tc_client-${version}-w32/bin"
+mkdir -p "tc_client-${version}-w32/share/glib-2.0/schemas"
+cp /mingw32/share/glib-2.0/schemas/gschemas.compiled "tc_client-${version}-w32/share/glib-2.0/schemas"
+. /etc/profile
+cd "$here"
+(
+  finddeps tc_client.exe
+  finddeps tc_client-gtk.exe
+  finddeps cursedchat.exe
+) | while read file; do cp "$file" "tc_client-${version}-w32/bin"; done
+cp escapi/bin/Win32/escapi.dll "tc_client-${version}-w32/bin"
+echo "cd bin" > "tc_client-${version}-w32/TC Client.cmd"
+echo "start tc_client-gtk" >> "tc_client-${version}-w32/TC Client.cmd"
+# Some good defaults
+echo 'youtubecmd: http://youtube.com/watch?v=%i' > "tc_client-${version}-w32/bin/config.txt"
+echo 'youtuberadio_cmd: True' >> "tc_client-${version}-w32/bin/config.txt"
+zip -r "tc_client-${version}-w32.zip" "tc_client-${version}-w32"