Blame build-synfigstudio.sh

32f8ef
#!/bin/bash
32f8ef
32f8ef
set -e
32f8ef
32f8ef
BASE_DIR=$(cd `dirname "$0"`; pwd)
32f8ef
DATA_DIR="$BASE_DIR/docker-builder-data"
32f8ef
BUILD_DIR=$DATA_DIR/build
32f8ef
PUBLISH_DIR=$BASE_DIR/publish
32f8ef
CONFIG_FILE="$BASE_DIR/config.sh"
32f8ef
PACKET_BUILD_DIR="$BUILD_DIR/packet"
32f8ef
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
91875d
SYNFIGSTUDIO_TESTING_TAG="testing"
91875d
91875d
source "$BASE_DIR/gen-name.sh"
91875d
32f8ef
if [ -f $CONFIG_FILE ]; then
6dca2e
    source $CONFIG_FILE
32f8ef
fi
32f8ef
6dca2e
SCRIPT="$BASE_DIR/docker/run.sh"
6dca2e
6dca2e
run_appimage() {
6dca2e
    export PLATFORM="$1"
6dca2e
    export ARCH="$2"
6dca2e
6dca2e
    echo ""
5ef601
    echo "Update and build synfigstudio for $PLATFORM-$ARCH"
6dca2e
    echo ""
5ef601
    $SCRIPT chain native update synfigetl-master \
5ef601
            chain native update synfigcore-master \
5ef601
            chain update synfigetl-master \
5ef601
            chain update synfigcore-master \
5ef601
            chain update synfigstudio-master \
5ef601
            chain clean_before_do install_release synfigstudio-appimage
6dca2e
91875d
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_TESTING_TAG" "$PLATFORM" "$ARCH" ".appimage"`
6dca2e
    "$PUBLISH_DIR/publish.sh" \
6dca2e
        "synfigstudio" \
91875d
        "$TEMPLATE" \
6dca2e
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-appimage/install_release" \
6dca2e
        "*.appimage" \
6dca2e
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-appimage/envdeps_release/version-synfigstudio-master"
6dca2e
}
6dca2e
6dca2e
run_nsis() {
6dca2e
    export PLATFORM="$1"
6dca2e
    export ARCH="$2"
6dca2e
6dca2e
    echo ""
5ef601
    echo "Update and build synfigstudio for $PLATFORM-$ARCH"
6dca2e
    echo ""
606960
    #PLATFORM=win ARCH=32 $SCRIPT clean_before_do env zlib-1.2.11 # for NSIS
5ef601
    $SCRIPT chain native update synfigetl-master \
5ef601
            chain native update synfigcore-master \
5ef601
            chain update synfigetl-master \
5ef601
            chain update synfigcore-master \
5ef601
            chain update synfigstudio-master \
938576
            chain clean_before_do install_release synfigstudio-nsis \
938576
            chain clean_before_do install_release synfigstudio-portable
6dca2e
91875d
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_TESTING_TAG" "$PLATFORM" "$ARCH" ".exe"`
6dca2e
    "$PUBLISH_DIR/publish.sh" \
6dca2e
        "synfigstudio" \
91875d
        "$TEMPLATE" \
6dca2e
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-nsis/install_release" \
6dca2e
        "*.exe" \
6dca2e
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-nsis/envdeps_release/version-synfigstudio-master"
1bbfad
1bbfad
    local TEMPLATE=`gen_name_template "SynfigStudio" "$SYNFIGSTUDIO_TESTING_TAG" "$PLATFORM" "$ARCH" ".zip"`
1bbfad
    "$PUBLISH_DIR/publish.sh" \
1bbfad
        "synfigstudio" \
1bbfad
        "$TEMPLATE" \
1bbfad
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-portable/install_release" \
1bbfad
        "*.zip" \
1bbfad
        "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/synfigstudio-portable/envdeps_release/version-synfigstudio-master"
32f8ef
}
32f8ef
6dca2e
run_appimage linux 64
6dca2e
run_appimage linux 32
a8518c
run_nsis win 64
a8518c
run_nsis win 32