Blame build-synfigstudio-debug.sh

67b73f
#!/bin/bash
67b73f
67b73f
set -e
67b73f
67b73f
BASE_DIR=$(cd `dirname "$0"`; pwd)
a1747c
DATA_DIR="$BASE_DIR/env-builder-data"
67b73f
BUILD_DIR=$DATA_DIR/build
67b73f
PUBLISH_DIR=$BASE_DIR/publish
67b73f
CONFIG_FILE="$BASE_DIR/config.sh"
67b73f
PACKET_BUILD_DIR="$BUILD_DIR/packet"
67b73f
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
67b73f
SYNFIGSTUDIO_DEBUG_TAG="debug"
67b73f
67b73f
source "$BASE_DIR/gen-name.sh"
67b73f
67b73f
if [ -f $CONFIG_FILE ]; then
67b73f
    source $CONFIG_FILE
67b73f
fi
67b73f
a1747c
SCRIPT="$BASE_DIR/env/run.sh"
67b73f
67b73f
run_appimage() {
67b73f
    export PLATFORM="$1"
67b73f
    export ARCH="$2"
67b73f
67b73f
    echo ""
67b73f
    echo "Update and build synfigstudio-debug for $PLATFORM-$ARCH"
67b73f
    echo ""
67b73f
    $SCRIPT chain native update synfigetl-debug \
67b73f
            chain native update synfigcore-debug \
67b73f
            chain update synfigetl-debug \
67b73f
            chain update synfigcore-debug \
67b73f
            chain update synfigstudio-debug \
67b73f
            chain clean_before_do install_release synfigstudio-debugappimage
67b73f
67b73f
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_DEBUG_TAG" "$PLATFORM" "$ARCH" ".appimage"`
67b73f
    "$PUBLISH_DIR/publish.sh" \
67b73f
        "synfigstudio-debug" \
67b73f
        "$TEMPLATE" \
67b73f
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugappimage/install_release" \
67b73f
        "*.appimage" \
67b73f
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugappimage/envdeps_release/version-synfigstudio-debug"
67b73f
}
67b73f
67b73f
run_nsis() {
67b73f
    export PLATFORM="$1"
67b73f
    export ARCH="$2"
67b73f
67b73f
    echo ""
67b73f
    echo "Update synfigstudio-debug for $PLATFORM-$ARCH"
67b73f
    echo ""
f0ec65
    PLATFORM=win ARCH=32 $SCRIPT clean_before_do env zlib-1.2.11 # for NSIS
67b73f
    $SCRIPT chain native update synfigetl-debug \
67b73f
            chain native update synfigcore-debug \
67b73f
            chain update synfigetl-debug \
67b73f
            chain update synfigcore-debug \
67b73f
            chain update synfigstudio-debug \
059f12
            chain clean_before_do install_release synfigstudio-debugnsis \
bd5341
            chain clean_before_do install_release synfigstudio-debugportable
67b73f
67b73f
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_DEBUG_TAG" "$PLATFORM" "$ARCH" ".exe"`
67b73f
    "$PUBLISH_DIR/publish.sh" \
67b73f
        "synfigstudio-debug" \
67b73f
        "$TEMPLATE" \
67b73f
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugnsis/install_release" \
67b73f
        "*.exe" \
67b73f
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugnsis/envdeps_release/version-synfigstudio-debug"
059f12
059f12
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_DEBUG_TAG" "$PLATFORM" "$ARCH" ".zip"`
059f12
    "$PUBLISH_DIR/publish.sh" \
059f12
        "synfigstudio-debug" \
059f12
        "$TEMPLATE" \
059f12
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugportable/install_release" \
059f12
        "*.zip" \
059f12
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-debugportable/envdeps_release/version-synfigstudio-debug"
67b73f
}
67b73f
102811
linux64() { run_appimage linux 64; }
102811
linux32() { run_appimage linux 32; }
102811
win64()   { run_nsis win 64; }
102811
win32()   { run_nsis win 32; }
102811
102811
COMMANDS="$@"
102811
if [ -z "$COMMANDS" ]; then COMMANDS="linux64 linux32 win64 win32"; fi
102811
for COMMAND in $COMMANDS; do
102811
    echo "Command: $COMMAND"
102811
    $COMMAND
102811
done