tachiyomi-extensions-inspector/scripts/windows64-bundler.sh

43 lines
1.2 KiB
Bash
Raw Normal View History

2021-05-17 08:50:24 +02:00
#!/bin/bash
# Copyright (C) Contributors to the Suwayomi project
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
echo "Downloading jre..."
jre="OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip"
2021-05-18 19:05:57 +02:00
if [ ! -f $jre ]; then
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip" -o $jre
fi
2021-05-17 08:50:24 +02:00
echo "creating windows bundle"
jar=$(ls ../server/build/Tachidesk-*.jar)
jar_name=$(echo $jar | cut -d'/' -f4)
2021-05-17 09:24:33 +02:00
release_name=$(echo $jar_name | cut -d'.' -f4 --complement)-win64
2021-05-17 08:50:24 +02:00
# make release dir
mkdir $release_name
2021-05-17 21:03:54 +02:00
unzip $jre
# move jre
mv jdk8u292-b10-jre $release_name/jre
2021-05-17 08:50:24 +02:00
cp $jar $release_name/Tachidesk.jar
2021-05-17 08:50:24 +02:00
2021-05-18 23:56:29 +02:00
cp "resources/Tachidesk Launcher-win64.exe" "$release_name/Tachidesk Launcher.exe"
cp "resources/Tachidesk Launcher.bat" $release_name
cp "resources/Tachidesk Debug Launcher.bat" $release_name
2021-05-23 19:40:04 +02:00
cp "resources/Tachidesk Webview Launcher.bat" $release_name
2021-05-17 08:50:24 +02:00
2021-05-17 09:24:33 +02:00
zip_name=$release_name.zip
2021-05-17 08:50:24 +02:00
zip -9 -r $zip_name $release_name
2021-05-18 19:05:57 +02:00
rm -rf $release_name
mv $zip_name ../server/build/