diff --git a/README.md b/README.md index b9bb722..3dceb92 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### Subscribe and like! -[![Version](https://img.shields.io/badge/deb_package-0.0.9-blue)](https://github.com/keygenqt/aurora-toolbox/releases) +[![Version](https://img.shields.io/badge/deb_package-0.0.10-blue)](https://github.com/keygenqt/aurora-toolbox/releases) ![Preview](https://raw.githubusercontent.com/keygenqt/aurora-toolbox/refs/heads/main/files/images/preview_telegram.png) diff --git a/files/package/com.keygenqt.aurora-toolbox.desktop b/build/data/com.keygenqt.aurora-toolbox.desktop similarity index 100% rename from files/package/com.keygenqt.aurora-toolbox.desktop rename to build/data/com.keygenqt.aurora-toolbox.desktop diff --git a/files/package/com.keygenqt.aurora-toolbox.svg b/build/data/com.keygenqt.aurora-toolbox.svg similarity index 100% rename from files/package/com.keygenqt.aurora-toolbox.svg rename to build/data/com.keygenqt.aurora-toolbox.svg diff --git a/build/deb/README.md b/build/deb/README.md new file mode 100644 index 0000000..0782536 --- /dev/null +++ b/build/deb/README.md @@ -0,0 +1,38 @@ +## Как собрать rpm пакет локально, на примере спецификации для Ubuntu 24.04 + +Подготовка окружения для сборки: + +```shell +sudo apt-get install gettext, meson, pkg-config, libgjs-dev, libgtk-4-dev, libadwaita-1-dev +``` + +Сборка из корня проекта: + +```shell +chmod +x ./build/run.sh +./build/run.sh +``` + +Собранный пакет можно будет найти: + +`./build/release/debrpm/aurora-toolbox_{version}-{revision}_amd64_.deb` + +## Установка + +Подготовка окружения для установки: + +```shell +sudo apt-get install gjs, language-pack-gnome-ru, language-pack-ru-base, libadwaita-1-0 +``` + +Установка: + +```shell +sudo dpkg -i ./build/release/deb/aurora-toolbox_*.deb +``` + +Удаление: + +```shell +sudo dpkg -r com.keygenqt.aurora-toolbox +``` diff --git a/scripts/deb.sh b/build/deb/build.sh similarity index 72% rename from scripts/deb.sh rename to build/deb/build.sh index 61c4c06..97d5078 100755 --- a/scripts/deb.sh +++ b/build/deb/build.sh @@ -4,26 +4,26 @@ ## Build and creae deb package ############################## -read -p "You change '@todo debug' code? (y/n)? " choice -case "$choice" in - y|Y ) echo "yes";; - n|N ) exit 0;; - * ) echo "invalid";; -esac +NAME="$1" +PACKAGE="$2" +REVISION="$3" +FOLDER="$4" +VERSION="$5" +ARCH="amd64" -NAME='aurora-toolbox' -PACKAGE='com.keygenqt.aurora-toolbox' -REVISION='1' -FOLDER='release' -ARCH='amd64' +# Set root dir +DIR="$(dirname "$(realpath "$0")")" +cd $DIR/../../ -VERSION=$(grep -m 1 version meson.build | xargs | sed 's/[,]//g' | sed 's/version: //g') +# Folder for deb DEB_FOLDER="${NAME}_${VERSION}-${REVISION}_${ARCH}" +# Clear rm -rf $FOLDER rm -rf $DEB_FOLDER +# Build meson setup \ -Dbindir=/usr/local/bin \ -Ddatadir=/usr/local/share/$PACKAGE \ @@ -34,6 +34,7 @@ meson setup \ ninja -C $FOLDER +# Create folders mkdir -p $DEB_FOLDER mkdir -p $DEB_FOLDER/DEBIAN mkdir -p $DEB_FOLDER/usr/local @@ -44,25 +45,28 @@ mkdir -p $DEB_FOLDER/usr/share/glib-2.0/schemas mkdir -p $DEB_FOLDER/usr/share/applications mkdir -p $DEB_FOLDER/usr/share/icons -chmod +x $FOLDER/src/$PACKAGE - # Bin +chmod +x $FOLDER/src/$PACKAGE cp $FOLDER/src/$PACKAGE $DEB_FOLDER/usr/local/bin + # Short name ln -s /usr/local/bin/$PACKAGE $DEB_FOLDER/usr/local/bin/$NAME + # Source cp $FOLDER/src/*.gresource $DEB_FOLDER/usr/local/share/$PACKAGE cp $FOLDER/data/*.gresource $DEB_FOLDER/usr/local/share/$PACKAGE + # Translate cp $FOLDER/po/ru/LC_MESSAGES/*.mo $DEB_FOLDER/usr/local/share/locale/ru/LC_MESSAGES + # Schemas cp ./data/com.keygenqt.aurora-toolbox.gschema.xml $DEB_FOLDER/usr/share/glib-2.0/schemas -# Menu -cp ./files/package/*.desktop $DEB_FOLDER/usr/share/applications -cp ./files/package/*.svg $DEB_FOLDER/usr/share/icons -rm -rf $FOLDER/{*,.[^.]*} +# Menu +cp ./build/data/*.desktop $DEB_FOLDER/usr/share/applications +cp ./build/data/*.svg $DEB_FOLDER/usr/share/icons +# Create control tee -a $DEB_FOLDER/DEBIAN/control > /dev/null <= EOT dpkg-deb --build --root-owner-group $DEB_FOLDER -mv $DEB_FOLDER.deb $FOLDER -rm -rf $DEB_FOLDER -dpkg -x $FOLDER/$DEB_FOLDER.deb $FOLDER/$DEB_FOLDER - -# Install / Remove -sudo dpkg -r com.keygenqt.aurora-toolbox -sudo dpkg -i release/aurora-toolbox_0.0.9-1_amd64.deb +# Move +rm -rf ./build/$FOLDER/deb +mkdir -p ./build/$FOLDER/deb +mv $DEB_FOLDER.deb ./build/$FOLDER/deb +rm -rf $FOLDER +rm -rf $DEB_FOLDER diff --git a/build/rpm/README.md b/build/rpm/README.md new file mode 100644 index 0000000..ad0eb1b --- /dev/null +++ b/build/rpm/README.md @@ -0,0 +1,38 @@ +## Как собрать rpm пакет локально, на примере спецификации для ALT Linux (P11) + +Подготовка окружения для сборки: + +```shell +sudo apt-get install rpm-build meson libgjs-devel libgtk4-devel libadwaita-devel +``` + +Сборка из корня проекта: + +```shell +chmod +x ./build/run.sh +./build/run.sh +``` + +Собранный пакет можно будет найти: + +`./build/release/rpm/aurora-toolbox_{version}-{revision}_x86_64.rpm` + +## Установка + +Подготовка окружения для установки: + +```shell +sudo apt-get install gnome-extensions-app libgjs libgtk4-gir libadwaita-gir libsoup-gir +``` + +Установка: + +```shell +sudo rpm -i ./build/release/rpm/aurora-toolbox_*.rpm +``` + +Удаление: + +```shell +sudo rpm -e aurora-toolbox +``` diff --git a/build/rpm/build.sh b/build/rpm/build.sh new file mode 100755 index 0000000..6af9af0 --- /dev/null +++ b/build/rpm/build.sh @@ -0,0 +1,102 @@ +#!/bin/bash + +############################### +## Build and create rpm package +############################### + +NAME="$1" +PACKAGE="$2" +REVISION="$3" +FOLDER="$4" +VERSION="$5" + +ARCH="x86_64" + +# Set root dir +DIR="$(dirname "$(realpath "$0")")" +cd $DIR/../../ + +NAME_RPM="$NAME-$VERSION-$REVISION.$ARCH.rpm" +RPM_FOLDER=$HOME/RPM + +# Clear +rm -rf $RPM_FOLDER + +# Create folders +mkdir -p $RPM_FOLDER +mkdir -p $RPM_FOLDER/SPECS +mkdir -p $RPM_FOLDER/SOURCES + +# Copy data +cd $DIR/../../../ +cp -R ./$NAME ./$NAME-$VERSION +tar czf source.tar.gz ./$NAME-$VERSION +mv source.tar.gz $RPM_FOLDER/SOURCES +rm -rf ./$NAME-$VERSION +cd $NAME + +# Create control +tee -a $RPM_FOLDER/SPECS/$NAME.spec > /dev/null <= 1.5 + +Requires: sudo +Requires: gnome-extensions-app +Requires: libgjs +Requires: libgtk4-gir +Requires: libadwaita-gir +Requires: libsoup-gir + +%description +%summary. + +%prep +%setup + +%build +%meson +%meson_build + +%install +%meson_install +mkdir -p %{buildroot}%{_datadir}/applications +mkdir -p %{buildroot}%{_datadir}/icons +install ./build/data/%{fullname}.svg %{buildroot}%{_datadir}/icons/%{fullname}.svg +install ./build/data/%{fullname}.desktop %{buildroot}%{_datadir}/applications/%{fullname}.desktop + +%post +ln -sf %{_bindir}/%{fullname} %{_bindir}/%{name} + +%files +%doc CHANGELOG.md +%{_bindir}/%{fullname} +%{_datadir}/%{fullname}/%{fullname}.data.gresource +%{_datadir}/%{fullname}/%{fullname}.src.gresource +%{_datadir}/applications/%{fullname}.desktop +%{_datadir}/glib-2.0/schemas/%{fullname}.gschema.xml +%{_datadir}/icons/%{fullname}.svg +%{_datadir}/locale/ru/LC_MESSAGES/%{fullname}.mo +EOT + +# Build +rpmbuild -bb $RPM_FOLDER/SPECS/$NAME.spec + +# Move +rm -rf ./build/$FOLDER/rpm +mkdir -p ./build/$FOLDER/rpm +mv $RPM_FOLDER/RPMS/x86_64/$NAME_RPM ./build/$FOLDER/rpm/$NAME_RPM +rm -rf $RPM_FOLDER diff --git a/build/run.sh b/build/run.sh new file mode 100755 index 0000000..898f523 --- /dev/null +++ b/build/run.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +################# +## Build packages +################# + +read -p "What kind of package build? (deb/rpm)? " choice +case "$choice" in + deb ) echo "Let's start assembling...";; + rpm ) echo "Let's start assembling...";; + * ) echo "Required [deb/rpm]"; exit;; +esac + +NAME='aurora-toolbox' +PACKAGE='com.keygenqt.aurora-toolbox' +REVISION='1' +FOLDER='release' +DIR="$(dirname "$(realpath "$0")")" +VERSION=$(grep -m 1 version $DIR/../meson.build | xargs | sed 's/[,]//g' | sed 's/version: //g') + +# Build deb +if [ "$choice" = "deb" ]; then + sh $DIR/deb/build.sh $NAME $PACKAGE $REVISION $FOLDER $VERSION +fi + +# Build rpm +if [ "$choice" = "rpm" ]; then + sh $DIR/rpm/build.sh $NAME $PACKAGE $REVISION $FOLDER $VERSION +fi + +# DEB Install / Remove +# sudo dpkg -r com.keygenqt.aurora-toolbox +# sudo dpkg -i $DIR/release/deb/*_amd64.deb + +# RPM Install / Remove +# sudo rpm -e aurora-toolbox +# sudo rpm -i $DIR/release/rpm/*_amd64.rpm diff --git a/data/ui/dialogs/AboutDialog.ui b/data/ui/dialogs/AboutDialog.ui index 765d785..18d5485 100644 --- a/data/ui/dialogs/AboutDialog.ui +++ b/data/ui/dialogs/AboutDialog.ui @@ -4,7 +4,7 @@ floating com.keygenqt.aurora-toolbox Aurora Toolbox - 0.0.9 + 0.0.10 © 2024 KeyGenQt https://github.com/keygenqt/aurora-toolbox/issues Vitaliy Zarubin diff --git a/docs/install.md b/docs/install.md index 9eecb63..cd6086d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -7,13 +7,21 @@ hide: Я разрабатывал приложения под Ubuntu, и тестировал его там. Приложение доступно в `deb` пакете на странице [релизов](https://github.com/keygenqt/aurora-toolbox/releases) GitHub. -Приложение [Aurora CLI](https://keygenqt.github.io/aurora-cli), от которого зависит Aurora Toolbox устанавливается стандартным способом для него: +Приложение [Aurora CLI](https://keygenqt.github.io/aurora-cli), от которого зависит Aurora Toolbox устанавливается стандартным способом для него: [Install](https://keygenqt.github.io/aurora-cli/install/). +!!! info + + Установка на примере дистрибутива Ubuntu, но так же доступен rpm пакет, который можно установит примерно так: + ```shell + sudo rpm -i aurora-toolbox_0.0.10-1_x86_64.rpm + ``` + + #### Install ```shell -sudo dpkg -i aurora-toolbox_0.0.9-1_amd64.deb +sudo dpkg -i aurora-toolbox_0.0.10-1_amd64.deb ``` #### Update/Install dependency diff --git a/meson.build b/meson.build index b8b1342..9d7549f 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ # Define our project project( 'aurora-toolbox', - version: '0.0.9', + version: '0.0.10', license: ['Apache 2.0'], meson_version: '>= 0.59.0', default_options: ['cpp_std=c++17', 'cpp_rtti=false', 'cpp_eh=none', diff --git a/rpm/README.md b/rpm/README.md deleted file mode 100644 index d9fdb9d..0000000 --- a/rpm/README.md +++ /dev/null @@ -1,17 +0,0 @@ -## Как собрать rpm пакет локально, на примере спецификации для ALT Linux (P11) - -#### Подготовка окружения для сборки -* `# apt-get install rpm-build` -* `$ mkdir -p ~/RPM/SPECS && mkdir -p ~/RPM/SOURCES` -* `$ cd ~/RPM/SOURCES && wget https://github.com/keygenqt/aurora-toolbox/archive/refs/tags/0.0.9.tar.gz` -* Скопировать файл `aurora-toolbox.spec` в `~/RPM/SPECS` и перейти туда - -#### Сборка rpm -* `$ rpmbuild -bb aurora-toolbox.spec` -* При необходимости доустановить зависимости, необходимые для сборки -* Пакет соберется под ахритектуру вашей машины -* Собранный rpm-пакет будет находиться в `~/RPM/RPMS` - -#### Установка -* `# rpm -iv aurora-toolbox-0.0.9-alt1.x86_64.rpm` -* При необходимости доустановить зависимости, необходимые для работы приложения \ No newline at end of file diff --git a/rpm/aurora-toolbox.spec b/rpm/aurora-toolbox.spec deleted file mode 100644 index 858a043..0000000 --- a/rpm/aurora-toolbox.spec +++ /dev/null @@ -1,69 +0,0 @@ -%define fullname com.keygenqt.aurora-toolbox - -Name: aurora-toolbox -Version: 0.0.9 -Release: alt1 -Summary: An application that provides an easy start in the Aurora OS ecosystem. - -License: Apache-2.0 -Group: Development/Tools -Url: https://github.com/keygenqt/aurora-toolbox -# download from %{url}/releases/tag/%{version}.tar.gz -Source: %version.tar.gz - -BuildRequires: meson -BuildRequires: libgjs-devel -BuildRequires: libgtk4-devel -BuildRequires: libadwaita-devel >= 1.5 - -Requires: sudo -Requires: gnome-extensions-app -Requires: libgjs -Requires: libgtk4-gir -Requires: libadwaita-gir -Requires: libsoup-gir - -%description -%summary. - -%prep -%setup - -%build -%meson -%meson_build - -%install -%meson_install -mkdir -p %{buildroot}%{_datadir}/applications -mkdir -p %{buildroot}%{_datadir}/icons -install ./files/package/%{fullname}.svg %{buildroot}%{_datadir}/icons/%{fullname}.svg -install ./files/package/%{fullname}.desktop %{buildroot}%{_datadir}/applications/%{fullname}.desktop - -%post -ln -sf %{_bindir}/%{fullname} %{_bindir}/%{name} - -%files -%doc CHANGELOG.md -%{_bindir}/%{fullname} -%{_datadir}/%{fullname}/%{fullname}.data.gresource -%{_datadir}/%{fullname}/%{fullname}.src.gresource -%{_datadir}/applications/%{fullname}.desktop -%{_datadir}/glib-2.0/schemas/%{fullname}.gschema.xml -%{_datadir}/icons/%{fullname}.svg -%{_datadir}/locale/ru/LC_MESSAGES/%{fullname}.mo - -%changelog -* Sat Nov 02 2024 Vitaliy Zarubin 0.0.9 -- Update API install psdk. (Vitaliy Zarubin) - -* Fri Nov 01 2024 Vitaliy Zarubin 0.0.8 -- Add check version Aurora Toolbox. (Vitaliy Zarubin) -- Add video about install Aurora Toolbox. (Vitaliy Zarubin) - -* Thu Oct 31 2024 Vitaliy Zarubin 0.0.7 -- Fix button open documentation. (Vitaliy Zarubin) -- Add symbolic link aurora-toolbox. (Vitaliy Zarubin) -- Video install Aurora SDK. (Vitaliy Zarubin) -- Video install Flutter SDK. (Vitaliy Zarubin) -- Tab videos for documentation. (Vitaliy Zarubin) \ No newline at end of file diff --git a/scripts/rpm.sh b/scripts/rpm.sh deleted file mode 100755 index 2688c92..0000000 --- a/scripts/rpm.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -############################## -## Build and create rpm package -############################## - -#============================= -check_package() -{ -if [ -n "`rpm -q $1`" ] -then - echo "Checking $1... OK" -else - echo "" - echo "Checking $1... Not found!" - echo "use: apt-get install $1" - exit 1 -fi -} -#============================= - -if [ -z "$1" ] - then - echo "usage: ./rpm.sh [version to build]" - exit 1 -fi - -NAME='aurora-toolbox' - -check_package sudo -check_package meson -check_package wget -check_package rpm-build -check_package libgjs-devel -check_package libgtk4-devel -check_package libadwaita-devel - -echo "" -echo "Preparing..." -mkdir -p ~/RPM/SOURCES && mkdir -p ~/RPM/SPECS -cd ~/RPM/SOURCES && wget https://github.com/keygenqt/$NAME/archive/refs/tags/$1.tar.gz -cd ~/RPM/SPECS && wget https://raw.githubusercontent.com/keygenqt/$NAME/refs/tags/$1/rpm/aurora-toolbox.spec - -echo "" -echo "Build..." -rpmbuild -bb aurora-toolbox.spec - -echo "" -echo "Installing..." -cd ~/RPM/RPMS/`arch`/ -sudo rpm -i $NAME-$1*.rpm diff --git a/src/base/constants/AppConstants.js b/src/base/constants/AppConstants.js index 55e05e7..ad5470f 100644 --- a/src/base/constants/AppConstants.js +++ b/src/base/constants/AppConstants.js @@ -17,7 +17,7 @@ import GLib from 'gi://GLib'; export const AppConstants = Object.freeze({ App: { - version: '0.0.9', + version: '0.0.10', doc: 'https://keygenqt.github.io/aurora-toolbox/', docInstall: 'https://keygenqt.github.io/aurora-toolbox/install/', latestRelease: 'https://api.github.com/repos/keygenqt/aurora-toolbox/releases/latest',