From 84db198b221e4f3f973a015768ce327fbe6811f3 Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Jun 07 2018 06:53:30 +0000 Subject: Build portable version of OpenToonz --- diff --git a/build-opentoonz-testing.sh b/build-opentoonz-testing.sh index d7b6932..f4dc072 100755 --- a/build-opentoonz-testing.sh +++ b/build-opentoonz-testing.sh @@ -47,7 +47,8 @@ run_nsis() { echo "" PLATFORM=win ARCH=32 $SCRIPT clean_before_do env zlib-1.2.11 # for NSIS $SCRIPT chain update opentoonz-testing \ - chain clean_before_do install_release opentoonz-testingnsis + chain clean_before_do install_release opentoonz-testingnsis \ + chain clean_before_do install_release opentoonz-testingportable local TEMPLATE=`gen_name_template "OpenToonz" "$OPENTOONZ_TESTING_TAG" "$PLATFORM" "$ARCH" ".exe"` "$PUBLISH_DIR/publish.sh" \ @@ -56,6 +57,14 @@ run_nsis() { "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-testingnsis/install_release" \ "*.exe" \ "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-testingnsis/envdeps_release/version-opentoonz-testing" + + local TEMPLATE=`gen_name_template "OpenToonz" "$OPENTOONZ_TESTING_TAG" "$PLATFORM" "$ARCH" ".zip"` + "$PUBLISH_DIR/publish.sh" \ + "opentoonz-testing" \ + "$TEMPLATE" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-testingportable/install_release" \ + "*.zip" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-testingportable/envdeps_release/version-opentoonz-testing" } run_appimage linux 64 diff --git a/build-opentoonz.sh b/build-opentoonz.sh index aa20500..f430931 100755 --- a/build-opentoonz.sh +++ b/build-opentoonz.sh @@ -46,7 +46,8 @@ run_nsis() { echo "" PLATFORM=win ARCH=32 $SCRIPT clean_before_do env zlib-1.2.11 # for NSIS $SCRIPT chain update opentoonz-master \ - chain clean_before_do install_release opentoonz-nsis + chain clean_before_do install_release opentoonz-nsis \ + chain clean_before_do install_release opentoonz-portable local TEMPLATE=`gen_name_template "OpenToonz" "" "$PLATFORM" "$ARCH" ".exe"` "$PUBLISH_DIR/publish.sh" \ @@ -55,6 +56,14 @@ run_nsis() { "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/install_release" \ "*.exe" \ "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/envdeps_release/version-opentoonz-master" + + local TEMPLATE=`gen_name_template "OpenToonz" "" "$PLATFORM" "$ARCH" ".zip"` + "$PUBLISH_DIR/publish.sh" \ + "opentoonz" \ + "$TEMPLATE" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-portable/install_release" \ + "*.zip" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-portable/envdeps_release/version-opentoonz-master" } run_appimage linux 64 diff --git a/docker-builder-data/build/script/packet/opentoonz-portable.files/opentoonz.bat b/docker-builder-data/build/script/packet/opentoonz-portable.files/opentoonz.bat new file mode 100755 index 0000000..72979a3 --- /dev/null +++ b/docker-builder-data/build/script/packet/opentoonz-portable.files/opentoonz.bat @@ -0,0 +1,2 @@ +cd "%~dp0\" +start "" "%~dp0\bin\OpenToonz_1.2.exe" diff --git a/docker-builder-data/build/script/packet/opentoonz-portable.sh b/docker-builder-data/build/script/packet/opentoonz-portable.sh new file mode 100644 index 0000000..584feb4 --- /dev/null +++ b/docker-builder-data/build/script/packet/opentoonz-portable.sh @@ -0,0 +1,30 @@ +DEPS="opentoonz-master" + +pkinstall_release() { + # create temporary dir + rm -rf "$INSTALL_RELEASE_PACKET_DIR/portable" + mkdir -p "$INSTALL_RELEASE_PACKET_DIR/portable" + cd "$INSTALL_RELEASE_PACKET_DIR/portable" || return 1 + + # copy files + copy "$ENVDEPS_RELEASE_PACKET_DIR" "./" || return 1 + + # get version + local LOCAL_VERSION_FULL=$(cat $ENVDEPS_RELEASE_PACKET_DIR/version-opentoonz-*) + local LOCAL_VERSION=$(echo "$LOCAL_VERSION_FULL" | cut -d - -f 1) + local LOCAL_VERSION2=$(echo "$LOCAL_VERSION" | cut -d . -f -2) + local LOCAL_COMMIT=$(echo "$LOCAL_VERSION_FULL" | cut -d - -f 2) + + # copy NSIS configuration + cp "$FILES_PACKET_DIR/opentoonz.bat" "./" || return 1 + + # portable stuff + mv "./share/opentoonz/stuff" "./portablestuff" || return 1 + + # let's go + zip -r "../opentoonz-${LOCAL_VERSION}-${LOCAL_COMMIT:0:5}.zip" ./ || return 1 + + # remove temporary dir + cd "$INSTALL_RELEASE_PACKET_DIR" || return 1 + rm -rf "portable" +} diff --git a/docker-builder-data/build/script/packet/opentoonz-testingportable.sh b/docker-builder-data/build/script/packet/opentoonz-testingportable.sh new file mode 100644 index 0000000..c5a48df --- /dev/null +++ b/docker-builder-data/build/script/packet/opentoonz-testingportable.sh @@ -0,0 +1,3 @@ +source "$PACKET_SCRIPT_DIR/opentoonz-portable.sh" + +DEPS=`echo "$DEPS" | sed "s|opentoonz-master|opentoonz-testing|g"`