Cleanup archive script.

This commit is contained in:
casey langen 2023-02-04 12:59:54 -08:00
parent 9e4b52960d
commit 4a823deecb

View File

@ -7,50 +7,31 @@ if [ -z "$VERSION" ]; then
exit exit
fi fi
# function archive {
# 32-bit 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" archive "32"
rm -rf "$WIN32" archive "64"
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