Using AppDir's of utilities I release.

Moderator: Forum moderators

Post Reply
gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Using AppDir's of utilities I release.

Post by gyrog »

I am now releasing utilities as an AppDir not an AppImage.

They should be downloaded and extracted to produce a directory in a Linux partition that is always mounted.
If your Puppy install directory is on a Linux partition, somewhere in '/mnt/home' is a likely candidate.

Each AppDir has a the following structure:
1. A directory that contains the scripts for the utility.
2. A ".desktop" file for each utility that needs to be "exposed", this could be a symbolic link.
3. An image file, appropriate for use as an icon for the "exposed" utilities, this could be a symbolic link.
4. An 'AppRun' executable, that is capable of executing each of the utilities.
5. A '.DirIcon' file that is a symbolic link to the image file.

Execute directly:

Since each AppDir is also a "ROX application",
if you are using "ROX-filer" as your file manager, just clicking the AppDir directory will work,
otherwise,
you can drag the AppDir directory to the desktop and click the desktop icon,
otherwise,
open the AppDir directory and click the 'AppRun' file.

Integrate into Puppy and execute:

Activate with the 'PortableActivate' utility, viewtopic.php?t=3320.
This will enable you to execute the utility as a command in a terminal.
If it's a GUI utility, it will also be added to the Puppy desktop menu, and can be executed from there.

Or you can manually do what 'PortableActivate' does.
For each ".desktop" file in the root directory of the AppDir:
1. Use the "Exec=" line to name a symbolic link to the 'AppRun' file, in a directory in the 'PATH'.
2. If "Terminal=false" then,
use the "Icon=" line to name a symbolic link in '/usr/share pixmaps' to the image with the same name in the root direcory of the AppDir,
and create a symbolic link to this ".desktop" file in '/usr/share/applications'.
If any ".desktop" files were added to '/usr/share/applications', then run 'fixmenus'.

User avatar
Flash
Moderator
Posts: 897
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 46 times
Been thanked: 105 times

Re: Using AppDir's of utilities I release.

Post by Flash »

Is there a list of AppDir's you have released?

Chaos coordinator :?
jamesbond
Posts: 540
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 73 times
Been thanked: 292 times

Re: Using AppDir's of utilities I release.

Post by jamesbond »

Interesting decision.

AppDir requires ROX-Filer and depends on it.
AppImage doesn't, so in a way, it is "more portable".

Would you mind sharing why you'd go back?
Especially in the age where people are advocating away from gtk2 (and thus, ROX-Filer).

Thanks.

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: Using AppDir's of utilities I release.

Post by amethyst »

Just as a matter of interest, how does this compare with a well-constructed extra sfs file (which includes a menu entry for example) loaded from the Puppy partition?

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: Using AppDir's of utilities I release.

Post by gyrog »

Flash wrote: Fri Dec 24, 2021 5:58 pm

Is there a list of AppDir's you have released?

No.
The availabily of an AppDir is announced in the forum topic for the utility.

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: Using AppDir's of utilities I release.

Post by gyrog »

jamesbond wrote: Fri Dec 31, 2021 4:39 am

Interesting decision.

AppDir requires ROX-Filer and depends on it.
AppImage doesn't, so in a way, it is "more portable".

Would you mind sharing why you'd go back?
Especially in the age where people are advocating away from gtk2 (and thus, ROX-Filer).

Thanks.

Utilities in the AppDir are executed by executing the 'AppRun' file in the top directory of the AppDir.
(This is exactly what an AppImage does internally.)
Inserting a symbolic link to the 'AppRun', with an appropriate name, in a directory in the PATH, makes the uility executable.
It does not "depend" on 'ROX-Filer', if you are running 'ROX-Filer' clicking on the AppDir is just a quick shortcut to doing this.

Why:
1. If the utility is just scripts, (as my utilities are), the same AppDIr will run on a 32bit Puppy and a 64bit Puppy, I don't have to generate a 32bit AppImage and a 64bit AppImage, restrict the utility to only one.
I don't have to upload 2 files, and There's only a single file to download.
2. It's so easy to update.
When anything is changed it's immediately available to all my Puppies, I don't have to generate a new "something" and then check that all my Puppies are using the new version of the "something".

If I wanted to use an AppImage, I would "extract" it and run it as an AppDir.

Last edited by mikewalsh on Sun Jan 02, 2022 10:41 am, edited 1 time in total.
Reason: Minor spelling corrections...
gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: Using AppDir's of utilities I release.

Post by gyrog »

amethyst wrote: Fri Dec 31, 2021 9:09 am

Just as a matter of interest, how does this compare with a well-constructed extra sfs file (which includes a menu entry for example) loaded from the Puppy partition?

An extra integrates a utility into Puppy by containing files in appropriate directories, e.g. an executabe in '/usr/sbin' a '.desktop' file in '/usr/share/applications'.
An AppDir exists outside, probably somewhere under '/mnt/home', so to integrate it into a Puppy, it needs an appropriate symbolic link in a directory in the PATH, and if it's a GUI it needs a symbolic link to a '.desktop' file within itself, and a symbolic link to an icon in '/usr/share/pixmaps' to an image file within itself.
For each "exposed" executable, 3 symbolic links (max) are added to the savefolder.

An extra sfs depends on "aufs" being used as the "unionfs",
but an AppDir can be easily dynamically added to, and removed from, a Puppy independent of any unionfs,
Important, if you are trying to reduce dependence on "aufs".

A downside of an AppDir, is that it only works for things that work as a portable application.

While I prefer to use an AppDir, this is often not reasonable, e.g. using a Puppies 'devx_...sfs''.

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: Using AppDir's of utilities I release.

Post by gyrog »

Another reason I prefer an AppDir over an AppImage;
any '.desktop' files and image files within the AppDir are always available and only need symbolic links to introduce them into the Puppy desktop menu.
And of course, I can also easily tweak them to suit Puppy, if necessary.

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: Using AppDir's of utilities I release.

Post by gyrog »

I've introduced a tweak to the way I produce an AppDir:
If the AppDir contains only CLI scripts, I use a 'LAUNCH' file instead of an 'AppRun' file.
This means that ROX will not execute the utility if the AppDir is clicked within "ROX-Filer",
but using symbolic link(s) to the 'LAUNCH' file, still "exposes" the CLI utilities.

Note: I used 'LAUNCH' because that's what @mikewalsh uses in many of his portable applications.

Thanks to all the folk on the Puppy Forum who "discovered" portable applicatiions long before I did.

Post Reply

Return to “Package Collections/Repositories”