-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-opentoonz-me.sh
executable file
·81 lines (66 loc) · 2.47 KB
/
build-opentoonz-me.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
set -e
BASE_DIR=$(cd `dirname "$0"`; pwd)
DATA_DIR="$BASE_DIR/env-builder-data"
BUILD_DIR=$DATA_DIR/build
PUBLISH_DIR=$BASE_DIR/publish
CONFIG_FILE="$BASE_DIR/config.sh"
PACKET_BUILD_DIR="$BUILD_DIR/packet"
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
OPENTOONZ_TESTING_TAG="testing"
source "$BASE_DIR/gen-name.sh"
if [ -f $CONFIG_FILE ]; then
source $CONFIG_FILE
fi
SCRIPT="$BASE_DIR/run.sh"
run_appimage() {
export PLATFORM="$1"
export ARCH="$2"
echo ""
echo "Update and build opentoonz for $PLATFORM-$ARCH"
echo ""
$SCRIPT chain update opentoonz-me \
chain clean_before_do install_release opentoonz-me-appimage
local TEMPLATE=`gen_name_template "OpenToonz" "$OPENTOONZ_TESTING_TAG" "$PLATFORM" "$ARCH" ".appimage"`
"$PUBLISH_DIR/publish.sh" \
"opentoonz-me" \
"$TEMPLATE" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-appimage/install_release" \
"*.appimage" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-appimage/envdeps_release/version-opentoonz-me"
}
run_nsis() {
export PLATFORM="$1"
export ARCH="$2"
echo ""
echo "Update and build opentoonz for $PLATFORM-$ARCH"
echo ""
PLATFORM=win ARCH=32 $SCRIPT clean_before_do env zlib-1.2.13 # for NSIS
$SCRIPT chain update opentoonz-me \
chain clean_before_do install_release opentoonz-me-nsis \
chain clean_before_do install_release opentoonz-me-portable
local TEMPLATE=`gen_name_template "OpenToonz" "$OPENTOONZ_TESTING_TAG" "$PLATFORM" "$ARCH" ".exe"`
"$PUBLISH_DIR/publish.sh" \
"opentoonz-me" \
"$TEMPLATE" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-nsis/install_release" \
"*.exe" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-nsis/envdeps_release/version-opentoonz-me"
local TEMPLATE=`gen_name_template "OpenToonz" "$OPENTOONZ_TESTING_TAG" "$PLATFORM" "$ARCH" ".zip"`
"$PUBLISH_DIR/publish.sh" \
"opentoonz-me" \
"$TEMPLATE" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-portable/install_release" \
"*.zip" \
"$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-me-portable/envdeps_release/version-opentoonz-me"
}
linux64() { run_appimage linux 64; }
linux32() { run_appimage linux 32; }
win64() { run_nsis win 64; }
win32() { run_nsis win 32; }
COMMANDS="$@"
if [ -z "$COMMANDS" ]; then COMMANDS="linux64 linux32 win64 win32"; fi
for COMMAND in $COMMANDS; do
echo "Command: $COMMAND"
$COMMAND
done