From e8461790a83f272c70af5bc9b27d27cd6937d80a Mon Sep 17 00:00:00 2001 From: Mikhail Zolotukhin Date: Mon, 1 Nov 2021 20:28:22 +0300 Subject: [PATCH] chore: merge package step with build --- package.json | 4 +- scripts/build.sh | 17 +- src/kwinscript/{res => }/metadata.desktop | 1 - src/kwinscript/res/config/main.xml | 183 ------- src/kwinscript/res/ui/config.ui | 605 ---------------------- src/kwinscript/res/ui/config.ui.license | 3 - src/kwinscript/{res => }/ui/TrayItem.qml | 0 src/kwinscript/{res => }/ui/main.qml | 0 src/kwinscript/{res => }/ui/popup.qml | 2 +- 9 files changed, 16 insertions(+), 799 deletions(-) rename src/kwinscript/{res => }/metadata.desktop (99%) delete mode 100644 src/kwinscript/res/config/main.xml delete mode 100644 src/kwinscript/res/ui/config.ui delete mode 100644 src/kwinscript/res/ui/config.ui.license rename src/kwinscript/{res => }/ui/TrayItem.qml (100%) rename src/kwinscript/{res => }/ui/main.qml (100%) rename src/kwinscript/{res => }/ui/popup.qml (99%) diff --git a/package.json b/package.json index 980449a1..fc1831fd 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,7 @@ "clean": "scripts/clean.sh", "build": "scripts/build.sh", "prestart": "npm run build", - "prepackage": "npm run build", - "package": "scripts/package.sh", - "prescript-install": "npm run package", + "prescript-install": "npm run build", "script-install": "scripts/install.sh", "script-uninstall": "scripts/uninstall.sh", "preinstall-and-restart-kwin-x11": "npm run script-install", diff --git a/scripts/build.sh b/scripts/build.sh index 322cb5d8..b717b472 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -26,15 +26,26 @@ npx esbuild \ # Copy resources to the build directory with correct paths echo "📑 Preparing UI and metadata files..." -cp -r "$KWINSCRIPT_SOURCEDIR/res/ui" "$KWINSCRIPT_BUILDDIR/contents" -cp -r "$KWINSCRIPT_SOURCEDIR/res/config" "$KWINSCRIPT_BUILDDIR/contents" +cp -r "$KWINSCRIPT_SOURCEDIR/ui" "$KWINSCRIPT_BUILDDIR/contents" # Copy and update metadata METADATA_FILE="$KWINSCRIPT_BUILDDIR/metadata.desktop" -cp "$KWINSCRIPT_SOURCEDIR/res/metadata.desktop" "$METADATA_FILE" +cp "$KWINSCRIPT_SOURCEDIR/metadata.desktop" "$METADATA_FILE" sed -i "s/\$VER/${npm_package_version:-1.0}/" "$METADATA_FILE" +echo "📦 Zipping KWin Script..." +KWINPKG_NAME="bismuth.kwinscript" + +# Temporary change directory for archive tools +cd "$KWINSCRIPT_BUILDDIR" +# Remove old packages +rm -f "$KWINPKG_NAME" +# Create new .kwinscript package +zip -qr "$KWINPKG_NAME" ./contents/ ./metadata.desktop +# Get back to the original directory +cd - > /dev/null + echo "🏗️ Building KCM..." diff --git a/src/kwinscript/res/metadata.desktop b/src/kwinscript/metadata.desktop similarity index 99% rename from src/kwinscript/res/metadata.desktop rename to src/kwinscript/metadata.desktop index c597a146..d2ecefee 100644 --- a/src/kwinscript/res/metadata.desktop +++ b/src/kwinscript/metadata.desktop @@ -1,5 +1,4 @@ # SPDX-FileCopyrightText: none -# # SPDX-License-Identifier: MIT [Desktop Entry] diff --git a/src/kwinscript/res/config/main.xml b/src/kwinscript/res/config/main.xml deleted file mode 100644 index 8a9a7339..00000000 --- a/src/kwinscript/res/config/main.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - false - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - false - - - - - false - - - - - - - - - - yakuake,spectacle,Conky - - - - - quake - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - true - - - - - true - - - - - false - - - - - true - - - - - false - - - - - true - - - - - false - - - - - false - - - - - true - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - false - - - - - 1.6 - - - - - false - - - diff --git a/src/kwinscript/res/ui/config.ui b/src/kwinscript/res/ui/config.ui deleted file mode 100644 index 643d0991..00000000 --- a/src/kwinscript/res/ui/config.ui +++ /dev/null @@ -1,605 +0,0 @@ - - - KrohnkiteConfigForm - - - - 0 - 0 - 440 - 547 - - - - - 440 - 0 - - - - Form - - - - - - 0 - - - - Layout - - - - - - - - - - - - Use different layouts for each activity. Can be combined with "Use separate layout per Desktop" option. - - - Use separate layouts for each Activity - - - - - - - Use different layouts for each virtual desktop. Can be combined with "Use separate layout per Activity" option. - - - Use separate layouts for each Desktop - - - - - - - - - - Layouts - - - - - - Enable Tile layout - - - Tile Layout - - - false - - - - - - - Enable Monocle layout - - - Monocle Layout - - - - - - - 20 - - - 20 - - - - - - - - - - - All windows will be maximized in Monocle layout - - - Fully maximize windows (no borders, no gaps) - - - - - - - Minimize unfocused windows - - - - - - - - - - - - Enable Three Column layout - - - Three Column Layout - - - - - - - Spiral Layout - - - - - - - Enable Quarter layout - - - Quarter Layout - - - - - - - Enable Spread layout - - - Spread Layout - - - - - - - Enable Stair layout - - - Stair Layout - - - - - - - Floating Layout - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Geometry - - - - - - Screen Gaps (pixels) - - - - - - 999 - - - - - - - 999 - - - - - - - 999 - - - - - - - Top - - - Qt::AlignCenter - - - - - - - 999 - - - - - - - Bottom - - - Qt::AlignCenter - - - - - - - Left - - - Qt::AlignCenter - - - - - - - Right - - - Qt::AlignCenter - - - - - - - - - - Maximum Tile Width - - - - - - Limit the width of tiled windows - - - - - - - - - - 0 - 0 - - - - Ratio of the max width to screen height - - - - - - - - - - - - - - - - - Gaps between tiles (pixels) - - - - - - - 9999 - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Rules - - - - - - Ignore Windows - - - - - - By Title - - - - - - - By Class - - - - - - - Comma-separated list of window classes. Matching windows will not be tiled. - - - - - - - Comma-separated list of keywords(or substrings). Any windows with matching title will not be tiled. - - - - - - - By Role - - - - - - - - - - - - - Float Windows - - - - - - By Class - - - - - - - Comma-separated list of window classes. Matching windows will become float automatically. - - - - - - - By Title - - - - - - - Comma-separated list of keywords(or substrings). Any windows with matching title will become float automatically - - - - - - - This is mainly for debugging purpose, but can also be used to meet some specific requirements. - - - Float utility windows -(applies to window type Dialog, Splash, Utility) - - - true - - - - - - - - - - Disable Tiling - - - - - - Comma-separated list of activity names. Windows in corresponding activities will not be tiled. - - - - - - - On Activity (name) - - - - - - - On Screen (number) - - - - - - - Comma-separated list of screen numbers. Windows in corresponding screens will not be tiled. - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Behavior - - - - - - Put new window as master - - - - - - - <p>If there's only one window to be tiled, the window will be maximized with its borders removed to maximize usable screen space.</p><p>When using this option it's advisable to enable the &quot;Allow resizing maximized windows from window edges&quot; in &quot;Breeze Window Decoration&quot; settings, as this will often leave windows maximized, preventing borders from returning when windows are no longer sole otherwise.</p> - - - Maximize the sole window - - - - - - - All tiled windows will have no borders. Borders will be added back if window become float. - - - Remove borders of tiled windows - - - - - - - Keep floating windows above tiled windows - - - - - - - Prevent windows from minimizing (experimental) - - - - - - - Prevent window from protruding from its screen - - - - - - - Qt::Vertical - - - QSizePolicy::Maximum - - - - 20 - 10 - - - - - - - - Use this option to debug the script or submit detailed bug report. - - - Enable logging - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - diff --git a/src/kwinscript/res/ui/config.ui.license b/src/kwinscript/res/ui/config.ui.license deleted file mode 100644 index fe801746..00000000 --- a/src/kwinscript/res/ui/config.ui.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2018-2019 Eon S. Jeon - -SPDX-License-Identifier: MIT diff --git a/src/kwinscript/res/ui/TrayItem.qml b/src/kwinscript/ui/TrayItem.qml similarity index 100% rename from src/kwinscript/res/ui/TrayItem.qml rename to src/kwinscript/ui/TrayItem.qml diff --git a/src/kwinscript/res/ui/main.qml b/src/kwinscript/ui/main.qml similarity index 100% rename from src/kwinscript/res/ui/main.qml rename to src/kwinscript/ui/main.qml diff --git a/src/kwinscript/res/ui/popup.qml b/src/kwinscript/ui/popup.qml similarity index 99% rename from src/kwinscript/res/ui/popup.qml rename to src/kwinscript/ui/popup.qml index fe456c0e..3bf7d950 100644 --- a/src/kwinscript/res/ui/popup.qml +++ b/src/kwinscript/ui/popup.qml @@ -10,7 +10,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore; import org.kde.plasma.components 3.0 as PC3 import org.kde.kwin 2.0; -/* +/* * Component Documentation * - PlasmaCore global `theme` object: * https://api.kde.org/frameworks/plasma-framework/html/classPlasma_1_1Theme.html