From 4a823deecbde4424b73d93d8b16a3cfc9a124b91 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 4 Feb 2023 12:59:54 -0800 Subject: [PATCH] Cleanup archive script. --- script/archive-win.sh | 73 ++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/script/archive-win.sh b/script/archive-win.sh index de2a5aa69..a8fdfa26f 100755 --- a/script/archive-win.sh +++ b/script/archive-win.sh @@ -7,50 +7,31 @@ if [ -z "$VERSION" ]; then exit fi -# -# 32-bit -# +function archive { + ARCH=$1 + FILENAME="musikcube_win${ARCH}_${VERSION}" + echo "Processing $FILENAME..." + SRC_DIR="bin$ARCH" + DST_DIR="dist/$FILENAME" + rm -rf "$DST_DIR" + mkdir -p "$DST_DIR/plugins" + mkdir -p "$DST_DIR/themes" + mkdir -p "$DST_DIR/locales" + mkdir -p "$DST_DIR/fonts" + cp $SRC_DIR/release/musikcube.exe $DST_DIR + cp $SRC_DIR/release/musikcube-cmd.exe $DST_DIR + cp $SRC_DIR/release/*.dll $DST_DIR + cp $SRC_DIR/release/plugins/*.dll $DST_DIR/plugins + cp $SRC_DIR/release/themes/*.json $DST_DIR/themes + cp $SRC_DIR/release/locales/*.json $DST_DIR/locales + cp $SRC_DIR/release/fonts/*.ttf $DST_DIR/fonts + cp -rfp $SRC_DIR/release/plugins/Milkdrop2 $DST_DIR/plugins + rm $DST_DIR/musikcore.dll 2> /dev/null + pushd $DST_DIR + 7z a -tzip "$FILENAME.zip" ./* -mx=9 + mv "$FILENAME.zip" .. + popd +} -WIN32="dist/musikcube_win32_$VERSION" -rm -rf "$WIN32" -mkdir -p "$WIN32/plugins" -mkdir -p "$WIN32/themes" -mkdir -p "$WIN32/locales" -mkdir -p "$WIN32/fonts" -cp bin32/release/musikcube.exe "$WIN32" -cp bin32/release/musikcube-cmd.exe "$WIN32" -cp bin32/release/*.dll "$WIN32" -cp bin32/release/plugins/*.dll "$WIN32/plugins" -cp bin32/release/themes/*.json "$WIN32/themes" -cp bin32/release/locales/*.json "$WIN32/locales" -cp bin32/release/fonts/*.ttf "$WIN32/fonts" -cp -rfp bin32/release/plugins/Milkdrop2 "$WIN32/plugins" -rm "$WIN32/musikcore.dll" -pushd $WIN32 -7z a -tzip "musikcube_win32_$VERSION.zip" ./* -mx=9 -mv "musikcube_win32_$VERSION.zip" .. -popd - -# -# 64-bit -# - -WIN64="dist/musikcube_win64_$VERSION" -rm -rf "$WIN64" -mkdir -p "$WIN64/plugins" -mkdir -p "$WIN64/themes" -mkdir -p "$WIN64/locales" -mkdir -p "$WIN64/fonts" -cp bin64/release/musikcube.exe "$WIN64" -cp bin64/release/musikcube-cmd.exe "$WIN64" -cp bin64/release/*.dll "$WIN64" -cp bin64/release/plugins/*.dll "$WIN64/plugins" -cp bin64/release/themes/*.json "$WIN64/themes" -cp bin64/release/locales/*.json "$WIN64/locales" -cp bin64/release/fonts/*.ttf "$WIN64/fonts" -cp -rfp bin64/release/plugins/Milkdrop2 "$WIN64/plugins" -rm "$WIN64/musikcore.dll" -pushd $WIN64 -7z a -tzip "musikcube_win64_$VERSION.zip" ./* -mx=9 -mv "musikcube_win64_$VERSION.zip" .. -popd +archive "32" +archive "64"