|
|
938576 |
DEPS="synfigstudio-master"
|
|
|
938576 |
|
|
|
785d4a |
PK_PYTHON_DIRNAME="python"
|
|
|
785d4a |
PK_PYTHON_ARCHIVE="portable-python-3.2.5.1.zip"
|
|
|
785d4a |
PK_PYTHON_URL="https://download.tuxfamily.org/synfig/packages/sources/$PK_PYTHON_ARCHIVE"
|
|
|
785d4a |
|
|
|
785d4a |
# download portable python and pass downloaded files through all build phases
|
|
|
785d4a |
pkdownload() {
|
|
|
785d4a |
wget -c --no-check-certificate "$PK_PYTHON_URL" -O "$PK_PYTHON_ARCHIVE" || return 1
|
|
|
785d4a |
}
|
|
|
785d4a |
|
|
|
785d4a |
pkunpack() {
|
|
|
785d4a |
unzip "$DOWNLOAD_PACKET_DIR/$PK_PYTHON_ARCHIVE" || return 1
|
|
|
785d4a |
}
|
|
|
785d4a |
|
|
|
785d4a |
pkinstall() {
|
|
|
785d4a |
copy "$BUILD_PACKET_DIR" "$INSTALL_PACKET_DIR" || return 1
|
|
|
785d4a |
}
|
|
|
785d4a |
|
|
|
938576 |
pkinstall_release() {
|
|
|
938576 |
# create temporary dir
|
|
|
938576 |
rm -rf "$INSTALL_RELEASE_PACKET_DIR/portable"
|
|
|
938576 |
mkdir -p "$INSTALL_RELEASE_PACKET_DIR/portable"
|
|
|
938576 |
cd "$INSTALL_RELEASE_PACKET_DIR/portable" || return 1
|
|
|
938576 |
|
|
|
938576 |
# copy files
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/bin/lib/" "./bin/lib/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/bin/share/" "./bin/share/" || return 1
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/bin/"*.dll "./bin/" || return 1
|
|
|
1119bc |
for FILE in animate composite convert ffmpeg ffprobe gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders gio-querymodules melt sox synfig synfigstudio; do
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/bin/${FILE}.exe" "./bin/" || return 1
|
|
|
1119bc |
done
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/etc/" "./etc/" || return 1
|
|
|
1119bc |
[ -d "./lib/gdk-pixbuf-2.0/2.10.0/loaders" ] || mkdir -p "./lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/lib/gdk-pixbuf-2.0/2.10.0/loaders/"*.dll "./lib/gdk-pixbuf-2.0/2.10.0/loaders" || return 1
|
|
|
09a11a |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" "./lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" || return 1
|
|
|
1119bc |
[ -d "./lib/gtk-3.0/3.0.0/immodules" ] || mkdir -p "./lib/gtk-3.0/3.0.0/immodules"
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/lib/gtk-3.0/3.0.0/immodules/"*.dll "./lib/gtk-3.0/3.0.0/immodules" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/lib/ImageMagick-6.8.7/" "./lib/ImageMagick-6.8.7/" || return 1
|
|
|
1119bc |
[ -d "./lib/synfig/modules" ] || mkdir -p "./lib/synfig/modules"
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/lib/synfig/modules/"*.dll "./lib/synfig/modules" || return 1
|
|
|
1119bc |
cp -rf "$ENVDEPS_RELEASE_PACKET_DIR/lib/"*.dll "./lib" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/license/" "./license/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/fontconfig/" "./share/fontconfig/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/glib-2.0/schemas/" "./share/glib-2.0/schemas/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/gtk-3.0/" "./share/gtk-3.0/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/icons/" "./share/icons/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/ImageMagick-6/" "./share/ImageMagick-6/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/locale/" "./share/locale/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/mime/" "./share/mime/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/mime-info/" "./share/mime-info/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/pixmaps/" "./share/pixmaps/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/synfig/" "./share/synfig/" || return 1
|
|
|
1119bc |
copy "$ENVDEPS_RELEASE_PACKET_DIR/share/themes/" "./share/xml/" || return 1
|
|
|
938576 |
|
|
|
938576 |
# move examples
|
|
|
938576 |
mv "./share/synfig/examples" "./" || return 1
|
|
|
938576 |
|
|
|
938576 |
# add portable python
|
|
|
938576 |
copy "$INSTALL_PACKET_DIR/$PK_PYTHON_DIRNAME" "./python" || return 1
|
|
|
bbc390 |
|
|
|
bbc390 |
#config directory
|
|
|
bbc390 |
mkdir "./config"
|
|
|
938576 |
|
|
|
938576 |
# get version
|
|
|
938576 |
local LOCAL_VERSION_FULL=$(cat $ENVDEPS_RELEASE_PACKET_DIR/version-synfigstudio-*)
|
|
|
938576 |
local LOCAL_VERSION=$(echo "$LOCAL_VERSION_FULL" | cut -d - -f 1)
|
|
|
938576 |
local LOCAL_VERSION2=$(echo "$LOCAL_VERSION" | cut -d . -f -2)
|
|
|
938576 |
local LOCAL_COMMIT=$(echo "$LOCAL_VERSION_FULL" | cut -d - -f 2)
|
|
|
938576 |
|
|
|
938576 |
# copy NSIS configuration
|
|
|
938576 |
cp "$FILES_PACKET_DIR/synfigstudio.bat" "./" || return 1
|
|
|
938576 |
|
|
|
938576 |
# let's go
|
|
|
938576 |
zip -r "../synfigstudio-${LOCAL_VERSION}-${LOCAL_COMMIT:0:5}.zip" ./ || return 1
|
|
|
938576 |
|
|
|
938576 |
# remove temporary dir
|
|
|
938576 |
cd "$INSTALL_RELEASE_PACKET_DIR" || return 1
|
|
|
938576 |
rm -rf "portable"
|
|
|
938576 |
}
|