# peony-extensions

[中文版](README_zh.md)

peony-extensions is a collection of Qt6 plugins for the Peony file manager, the official file manager for the UKUI desktop environment. These plugins extend Peony with features such as file sharing, archive management, Bluetooth file transfer, intelligent data management, and more.

## Features

- **peony-open-terminal** — Open a terminal in the current directory via right-click menu
- **peony-share** — Share folders via Samba with a properties page integration
- **parchives** — Compress and extract files using engrampa
- **peony-extension-computer-view** — Enhanced view for computer:///
- **peony-send-to-device** — Send files to mounted devices via right-click menu
- **peony-bluetooth** — Send files via Bluetooth (depends on ukui-bluetooth)
- **peony-set-wallpaper** — Set desktop wallpaper from the right-click menu
- **peony-device-rename** — Rename block devices directly from Peony
- **peony-intelligent-data-management-service** — Intelligent data management backend service
- **peony-intelligent-plugin** — VFS and custom view plugins for the intelligent data manager
- **peony-spaceview-plugin** — Space view for empty spaces in the intelligent data manager

## Build Dependencies

- Qt 6 (qt6-base-dev, qt6-remoteobjects-dev, qt6-tools-dev-tools)
- qmake6, qtchooser
- libglib2.0-dev
- libgsettings-qt6-dev
- libgudev-1.0-dev
- libkysdk-ai-private-dev, libkysdk-ai-common-dev, libkysdk-base-dev, libkysdk-applications-dev, libkysdk-system-dev
- libnotify-dev
- libpeony-dev
- libpolkit-gobject-1-dev
- libpoppler-qt6-dev
- libudisks2-dev
- libukui-common-dev, libukui-file-metadata-dev, libukui-log4qt-dev, libukui-search-dev, libukui-service-interface-dev
- pkgconf
- debhelper-compat (= 13)

## Building from Source

```shell
cd peony-extensions
mkdir build && cd build
qmake6 ..
make -j$(nproc)
sudo make install
```

## Debian Packaging

This project supports Debian packaging with git-buildpackage and Salsa CI.

```shell
# Build the Debian package
gbp buildpackage

# Import a new upstream release
gbp import-orig --pristine-tar ../peony-extensions_<version>.orig.tar.gz
```

## Project Structure

```
peony-extensions/
├── debian/                                 # Debian packaging files
├── man/                                    # Manual pages
├── peony-admin/                            # Admin plugin (deprecated)
├── peony-bluetooth-plugin/                 # Bluetooth file transfer plugin
├── peony-drive-rename/                     # Block device rename plugin
├── peony-engrampa-menu-plugin/             # Archive compress/extract plugin
├── peony-extension-computer-view/          # Enhanced computer:/// view
├── peony-intelligent-data-management-service/  # Intelligent data management service
├── peony-intelligent-plugin/               # Intelligent data manager plugins
├── peony-menu-plugin-mate-terminal/        # Terminal plugin
├── peony-send-to-device/                   # Send to device plugin
├── peony-set-wallpaper/                    # Set wallpaper plugin
├── peony-share/                            # Samba share plugin
├── peony-spaceview-plugin/                 # Space view plugin
├── test-computer-view/                     # Computer view test
├── tests/                                  # Test suite
├── common.json                             # Plugin version info
├── common.pri                              # Shared qmake include
├── COPYING                                 # License text
├── NEWS                                    # Release notes
└── peony-extensions.pro                    # Top-level qmake project file
```

## Binary Compatibility

Peony-extensions relies on the Peony library. When the Peony library API changes, older plugins may fail to load or cause crashes. Plugin version information is stored in [common.json](common.json) and must match the Peony `VERSION` macro.

If peony-extensions does not work or fails to build, try building the latest Peony library locally first, then rebuild this project.

## Translations

Each plugin manages its own translations. To translate a plugin:

1. Use `lupdate` to generate a `.ts` file for your language
2. Use `lrelease` to compile `.ts` to `.qm`
3. Add the `.qm` file to the plugin's `.qrc` resource file

## License

This project is licensed under the LGPL-3.0-or-later license. See [COPYING](COPYING) for details.

## Links

- Homepage: https://gitee.com/openkylin/peony-extensions
- Bug Tracker: https://gitee.com/openkylin/peony-extensions/issues
- Salsa: https://salsa.debian.org/kylin-team/peony-extensions
