🎉 Build different effect packages for plasma5 and plasma6
This commit is contained in:
+24
-3
@@ -38,14 +38,24 @@ for file in ../po/*.po; do
|
||||
msgfmt "$file" -o "$BUILD_DIR/locale/$lang/LC_MESSAGES/burn-my-windows.mo"
|
||||
done
|
||||
|
||||
# This method is called one for each effect. The parameters are as follows:
|
||||
# This method is called once for each effect. The parameters are as follows:
|
||||
# $1: The nick of the effect (e.g. "energize-a")
|
||||
# $2: The name of the effect (e.g. "Energize A")
|
||||
# $3: A short description of the effect (e.g. "Beam your windows away")
|
||||
generate() {
|
||||
generate_impl "$1" "$2" "$3" "kwin5"
|
||||
generate_impl "$1" "$2" "$3" "kwin6"
|
||||
}
|
||||
|
||||
# This method is called twice for each effect. The parameters are as follows:
|
||||
# $1: The nick of the effect (e.g. "energize-a")
|
||||
# $2: The name of the effect (e.g. "Energize A")
|
||||
# $3: A short description of the effect (e.g. "Beam your windows away")
|
||||
# #4: Either "kwin5" or "kwin6".
|
||||
generate_impl() {
|
||||
|
||||
# We use the nick for the effect's directory name by replacing dashes with underscoares.
|
||||
DIR_NAME="kwin4_effect_$(echo "$1" | tr '-' '_')"
|
||||
DIR_NAME="${4}_effect_$(echo "$1" | tr '-' '_')"
|
||||
|
||||
# We transform the nick to CamelCase for the JavaScript class name.
|
||||
EFFECT_CLASS="BurnMyWindows$(sed -r 's/(^|-)(\w)/\U\2/g' <<<"$1")Effect"
|
||||
@@ -106,6 +116,11 @@ generate() {
|
||||
{
|
||||
echo "#version 140"
|
||||
echo "#define KWIN"
|
||||
|
||||
if [ "$4" == "kwin6" ]; then
|
||||
echo "#define PLASMA6"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "// This file is automatically generated during the build process."
|
||||
echo ""
|
||||
@@ -115,6 +130,11 @@ generate() {
|
||||
|
||||
{
|
||||
echo "#define KWIN_LEGACY"
|
||||
|
||||
if [ "$4" == "kwin6" ]; then
|
||||
echo "#define PLASMA6"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "// This file is automatically generated during the build process."
|
||||
echo ""
|
||||
@@ -153,4 +173,5 @@ generate "wisps" "Wisps [Burn-My-Windows]" "Let your windows be carr
|
||||
|
||||
# Finally, create an archive for the effects.
|
||||
# shellcheck disable=SC2046
|
||||
tar -czf "burn_my_windows_kwin4.tar.gz" -C "$BUILD_DIR" $(ls "$BUILD_DIR")
|
||||
tar -czf "burn_my_windows_kwin5.tar.gz" -C "$BUILD_DIR" $(ls "$BUILD_DIR" | grep kwin5)
|
||||
tar -czf "burn_my_windows_kwin6.tar.gz" -C "$BUILD_DIR" $(ls "$BUILD_DIR" | grep kwin6)
|
||||
|
||||
Reference in New Issue
Block a user