Привет всем ! Недавно я кое-как добавил свое приложение в AUR. И не смог разобраться какие зависимости ему нужны, вместо этого я использовал команду ldd klauspro прошелся по пакетам библиотек и добавил их в зависимости. Правильно ли я сделал?
Я мало что понимаю в AUR, помогите разобраться пожалуйста .
Hello everyone: enos:! I recently somehow added my app to the AUR. And I couldn’t figure out what dependencies it needed, instead I used the ldd klauspro command, went through the library packages and added them to the dependencies. Did I do it right?
That seems more reasonable. You should probably have neofetch has an optdepend.
A few things I noticed in a brief look:
Do you really want to depend on konsole? It is pretty easy to support a list of common terminals. konsole has a massive amount of dependencies if you aren’t using plasma.
The wayland.sh script modifies grub configs and runs grub-mkconfig without checking to see if grub is in use. If this is for Arch, many Arch users use bootloaders other than grub.
Your main program loads translations but you didn’t make any of your string literals translatable.
Хорошо, как думаете этот список подойдет чтобы ничего не сломалось у других пользователей?
Well, do you think this list is suitable so that nothing breaks for other users?
Насчет консоли, я только учусь и это моя первая программа. Я планирую сделать перевод на все языки и если будет возможно использовать встроенный терминал.
As for the console, I’m just learning and this is my first program. I plan to make a translation in all languages and if possible use the built-in terminal.
Temporarily remove the dependency on konsole and test the application in an environment without any Qt libraries installed like mate or a plain WM and see if it runs and functions properly.
The reason to temporarily drop konsole is it will also bring in tons of Qt and k* packages.
The issue I was pointing out is that your application strings aren’t translatable. You need to wrap string literals in tr() in most cases to make them translatable. For example:
ui->label1->setText("Добавить пакет в AUR");
should be:
ui->label1->setText(tr("Добавить пакет в AUR"));
Once you do that, anyone can make a translation for your application and submit it to you.
One more piece of advice I would share is that 6 months from now you will have no idea what label1 or action_18 are which will make your code hard to maintain. Instead, use meaningful names for those elements.
Спасибо за ценные советы, и спасибо за помощь. Я очень рад, что есть такие люди как вы, которые помогают начинающим пользователям, таким как я разобраться в некоторых непонятных моментах. В итоге получается примерно так?
Thank you for your valuable advice, and thank you for your help. I am very glad that there are people like you who help novice users like me to understand some of the incomprehensible points. The result is something like this?
# Maintainer: Dmali <dmali@vk.com>
pkgname=klaus-bin
pkgver=1.1
_releasedate=2023-05-19
pkgrel=1
pkgdesc="Arch manager that allows you to download, install, delete packages (including PKGBUILD changes) and display ratings and other things. Add/use automatic scripts to automate repeated actions. Add kernel modules and boot time to GRUB. View system logs. Enable auto-update of the system, delete orphans, and the package cache (with its configuration). There are recommended applications that allow you to install useful applications without problems."
arch=('x86_64')
url="https://github.com/dmaliog/kLausqt/"
license=('GPL 2.0')
groups=()
depends=('qt5-base' 'qt5-multimedia' 'qt5-network' 'qt5-webengine' 'qt5-widgets' 'qt5-xmlpatterns' 'yay' 'zenity' 'notify-send' 'konsole' 'neofetch')
source=(
"${pkgname}-${pkgver}.zip::${url}/releases/download/${pkgver}/klaus-${pkgver}-${_releasedate}-linux64.zip"
)
sha256sums=(
'd2369f869e0b2799ead447fd642bb42386d5452b09f6db1f04b91c3601ced040'
)
package() {
mkdir -p ${pkgdir}/usr/bin/
mkdir -p ${pkgdir}/usr/share/icons/hicolor/128x128/apps/
install -Dm755 ./klaus/klauspro ${pkgdir}/usr/bin/klauspro
install -Dt ${pkgdir}/usr/share/applications/ -m644 ./klaus/klaus.desktop
install -Dt ${pkgdir}/usr/share/icons/hicolor/128x128/apps/ -m644 ./klaus/klaus.png
}
Не подскажите мне, глупому человеку, как теперь обновить PKGBUILD на сайте?
Также как я сделал это ранее?
Can you tell me, a stupid person, how to update PKGBUILD on the site now?
Just like I did earlier?
Terminal getTerminal()
{
// Iterate over the list until we find an installed terminal
for (const Terminal &terminal : m_terminalList) {
if (QFile::exists(terminal.binary)) {
return terminal;
}
}
// Return a default constructed Terminal if one if not found
return Terminal();
}
In your application I would then create a function called something like runInTerminal(QStringList) and wrap everything you need in that so in your program you can call runInTerminal() and have it just work even if you decide to change the implementation later.
remote: error: The following error occurred when parsing commit
remote: error: :
remote: error: pkgdesc field too long: Arch manager that allows you to download, install, delete packages (including PKGBUILD changes) and display ratings and other things. Add/use automatic scripts to automate repeated actions. Add kernel modules and boot time to GRUB. View system logs. Enable auto-update of the system, delete orphans, and the package cache (with its configuration). There are recommended applications that allow you to install useful applications without problems.
remote: error: hook declined to update refs/heads/master
To ssh://aur.archlinux.org/klaus-bin.git
! [remote rejected] master -> master (hook declined)
error: не удалось отправить некоторые ссылки в «ssh://aur.archlinux.org/klaus-bin.git»
Я понял что название слишком длинное но как теперь удалить файл и добавить по новой?
I realized that the name is too long, but now how do I delete the file and add a new one?
Edit the file and then follow the same steps again. Change the commit description after the -m to whatever you want. Something like “Update description in PKGBUILD”