You are not logged in.

#1 2024-04-02 16:41:52

ardv
Member
Registered: 2024-03-24
Posts: 5

how to add software icon to software list

this is my first try to make a PKGBUILD file

# Author: shamela team <shamela.ws>
# Maintainer: dj.zak <dz.wbdev@gmail.com>
pkgname=shamela
pkgver=4
pkgrel=1
pkgdesc="A digital library which enables you to download, read and search arabic books."
arch=('x86_64')
url="https://shamela.ws/page/download"
license=('custom')
depends=('wine' 'winetricks')
source=('shamela4.tar.xz::https://archive.org/download/shamela4.tar/shamela4.tar.xz')
sha256sums=("3b0db8b2f97419cb291c3a546cfd6adc65e911ffb2c717020b82f9778e16fdac")

package() {
    cd $srcdir
    mkdir -p "${pkgdir}/opt/${pkgname}"
    mv "${srcdir}/shamela4/"* "${pkgdir}/opt/${pkgname}/"
    mkdir -p "${pkgdir}/usr/bin/"
    ln -s "/opt/$pkgname/launcher.exe" "$pkgdir/usr/bin/$pkgname"
}

post_install() {
  cd /opt/${pkgname}
  winetricks vb6run
}

this software is for windows, it can be launcher with: wine "filename.exe"
after installing this package with "makepkg -si" i can find it in the pamac-manager, but how to open it? there is no icon for the software in Application launcher

1- how to add an icon for the software in the application launcher?

i also want to add some DLLs to system32 folder in the winreprefix folder

2- how to print the winrepefix location so as to get the full path of system32?

3- how to add an icon to the software?

Offline

#2 2024-04-03 11:18:23

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,330

Re: how to add software icon to software list

Read https://wiki.archlinux.org/title/Wine_p … guidelines

some additional comments :

menus / application launchers on linux rely on desktop entries .
Windows doesn't use those, you may have to create one yourself.

packages are only allowed to deal with systemwide stuff and forbidden to touch userspace.

read up on wine prefixes on the [url=https://wiki.archlinux.org/title/Wine[]archwiki wine page[/url] to understand why winetricks commands in a PKGBUILD won't work .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2024-04-06 05:37:08

ardv
Member
Registered: 2024-03-24
Posts: 5

Re: how to add software icon to software list

Lone_Wolf wrote:

Read https://wiki.archlinux.org/title/Wine_p … guidelines

some additional comments :

menus / application launchers on linux rely on desktop entries .
Windows doesn't use those, you may have to create one yourself.

packages are only allowed to deal with systemwide stuff and forbidden to touch userspace.

read up on wine prefixes on the [url=https://wiki.archlinux.org/title/Wine[]archwiki wine page[/url] to understand why winetricks commands in a PKGBUILD won't work .


what if i put that winetricks command in a file and i run that file command after installation? and then the command file will be deleted automatically?

Offline

#4 2024-04-06 09:56:32

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,330

Re: how to add software icon to software list

No need to delete it, just make sure you add a test to verify this run is the first one so it doesn't get run multiple times.

Such things are typically done by adding a wrapper script to the package with the same name as the application will be placed in /usr/bin .

The wrapper script would replace the symlink you create with ln -s "/opt/$pkgname/launcher.exe" "$pkgdir/usr/bin/$pkgname" .

https://aur.archlinux.org/cgit/aur.git/ … reecol-git and https://aur.archlinux.org/cgit/aur.git/ … e?h=oolite are examples of such wrapper scripts.


P.S. The original versions of those 2 wrapper scripts were created by me long ago.

Last edited by Lone_Wolf (2024-04-06 10:00:35)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB