Build Script

Feature requests not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Pvt_Ryan
Posts: 15
Joined: Tue Sep 09, 2008 9:22 am

Build Script

Post by Pvt_Ryan »

Dunno if this is the right place for this but if not sorry..

Code: Select all

#!/bin/bash
#
# buildTransmission.sh
#
# Copyright 2009 Ryan McLean <ryanm _at_ ninet _dot_ org>
#
# libssl-dev
# gettext
# intltool


if [ $# -lt 2 ]; then
echo "Usage:";
echo "$0 <srcDir> <[all|headless|beos|wx|cli|nodaemon|default]>";
echo "all = everything (inc wx and beos)";
echo "default = gtk (if available), daemon, cli, mac (if available)";
echo "nodaemon = default without daemon";
echo "headless = just the Webui, dameon & remote with embedded, without nls";
echo "wx = just the daemon & wx";
echo "beos = just beos & the daemon";
echo "cli = cli, daemon, webui & remote";
echo "$0 ~/src/transmission-1.52 all";
exit;
fi

srcDir=$1;
buildType=$2;

cd ${srcDir};

if [ "${buildType}" == "default" ]; then
  # Dameon & CLI if GTK dev files not installed, also Mac if on one.
  ./configure
elif [ "${buildType}" == "all" ]; then
  ./configure --enable-beos --enable-wx 
elif [ "${buildType}" == "headless" ]; then
  # Just the Daemon, remote & webui
  ./configure --disable-gtk --disable-mac --disable-beos --disable-wx --disable-cli --disable-nls CPPFLAGS=-DTR_EMBEDDED
elif [ "${buildType}" == "nodaemon" ]; then
  ./configure --disable-daemon
elif [ "${buildType}" == "beos" ]; then
  ./configure --disable-gtk --disable-mac --enable-beos --disable-wx --disable-cli
elif [ "${buildType}" == "wx" ]; then
  ./configure --disable-gtk --disable-mac --enable-wx --disable-beos --disable-cli
elif [ "${buildType}" == "cli" ]; then
  ./configure --disable-gtk --disable-mac --disable-beos --disable-wx
fi

make
Small bash script that anyone that wants to can modify..

I just default mine to headless by replacing

Code: Select all

buildType=$2;
with

Code: Select all

if [ "$2" != "" ]; then
  buildType=$2;
else
  buildType="headless";
fi
Hope someone finds it useful.
Post Reply