#!/bin/bash #squidf: - do not use bin files from deploy folder # - add debug build flags # - set ELEVATED_SPECIAL="NOLZMA" instead of "STANDARD" set -e # Check args if [ "$1" == "" ]; then echo First arg must be Output directory exit 1 fi if [ ! -d "$1" ]; then echo Output directory not exists exit 1 fi if [ "$2" == "" ]; then echo Second arg must be project - cli/ui/ui3 exit 1 fi if [ "$3" == "" ]; then echo Third arg must be architecture exit 1 fi if [ "$4" == "" ]; then echo Fourty arg must be config - Debug/Relese exit 1 fi # 2020-04-20: Forced 'static'. We build official packages from Debian8, and there is too much issues libcurl3 vs libcurl4 and packages dependencies on every linux distro supported. # Note: we need to use a debian-lintian exception for 'static'. # if [ "$5" == "" ]; then # echo Fifty arg must be mode - shared/static # exit 1 # fi BASEPATH=$(dirname $(realpath -s $0)) OUTPATH=$1 PROJECT=$2 ARCH=$3 CONFIG=$4 MODE=shared echo BasePath: $BASEPATH echo TargetDir: $OUTPATH echo Project: $PROJECT echo Arch: $ARCH echo Config: $CONFIG #echo Mode: $MODE # Not used anymore #if [ $PROJECT = "ui" ]; then # # Copy Tray # cp "$BASEPATH/../deploy/linux_$ARCH/eddie-tray" "$OUTPATH" #fi # Compile and Copy Elevated ELEVATED_SPECIAL="NOLZMA" chmod +x "$BASEPATH/App.CLI.Linux.Elevated/build.sh" "$BASEPATH/App.CLI.Linux.Elevated/build.sh" "$CONFIG" "$ELEVATED_SPECIAL" cp "$BASEPATH/App.CLI.Linux.Elevated/bin/eddie-cli-elevated" "$OUTPATH" # Compile and Copy Native chmod +x "${BASEPATH}/Lib.Platform.Linux.Native/build.sh" "${BASEPATH}/Lib.Platform.Linux.Native/build.sh" "$CONFIG" "$MODE" cp "$BASEPATH/Lib.Platform.Linux.Native/bin/libLib.Platform.Linux.Native.so" "$OUTPATH" # Compile and Copy eddie-tray if [ $PROJECT = "ui" ]; then chmod +x "${BASEPATH}/UI.GTK.Linux.Tray/build.sh" "${BASEPATH}/UI.GTK.Linux.Tray/build.sh" "$CONFIG" # If not build (it's optional), skip if [ -f "$BASEPATH/UI.GTK.Linux.Tray/bin/eddie-tray" ]; then cp "$BASEPATH/UI.GTK.Linux.Tray/bin/eddie-tray" "$OUTPATH" fi fi