(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 30 Oct 2020, 01:04
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
I need help packaging an app for the various puppies[SOLVED]
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
jafadmin

Joined: 19 Mar 2009
Posts: 1258

PostPosted: Sat 01 Feb 2020, 18:27    Post subject:  I need help packaging an app for the various puppies[SOLVED]
Subject description: Especially FatDog64
 

I have managed to create a basic .pet that works with the puppies that use .pets, but I'm having trouble setting the "OpenWith" and the file association from the .pet install file.

Is there a recommended script to run as a helper?

Also, I am having very little luck getting an install pkg made for FD64. I can get it to install the app and paths, but no menu entries, and none of the aforementioned tasks. Confused

Any help would be greatly appreciated.

Last edited by jafadmin on Wed 05 Feb 2020, 00:02; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Sat 01 Feb 2020, 21:18    Post subject:  

Hi jafadmin.

It's not that complicated, but one needs to remain really focused.

1) OpenWith stuff
All the "OpenWith" entries for ROX are located at
/root/.config/rox.sourceforge.net/OpenWith

Since you did not mention the type of app or the file-type, the best suggestion I have is:
open a couple of the sub-dirs there and study them a bit.
E.g. for ogg files, look inside the
/root/.config/rox.sourceforge.net/OpenWith/.application_ogg
and
/root/.config/rox.sourceforge.net/OpenWith/.audio_x-vorbis+ogg

-------------------
2) MIME types
There is a limited MIME-type directory at
/root/.config/rox.sourceforge.net/MIME-types
for file-types: pdf, png, gnumeric, etc.
It's made up of bash scripts and you can edit them.

but the main one is at
/usr/share/mime/

This one has sub-divisions for apps, inodes, packages, etc.,
E.g. /usr/share/mime/app[/usr/share/mime/application

They are xml files created automatically.
It is suggested that the user not edit them.


-------------
As you probably already know, you'll have to mirror the above dirs / sub-dirs
in the dir you have for preparing your pet archive, before you type dir2pet blabla.

Best I can come up with, I'm afraid.

For more help, maybe try to get a hold of don570, he's a whiz with OpenWith stuff
in ROX.

IHTH

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 6397
Location: King's Lynn, UK.

PostPosted: Sat 01 Feb 2020, 21:51    Post subject:  

@ jafa:-

Just to add to what musher0 has already stated, don't forget that you can set any app to open either with an entire 'class' of mime-type, or just a specific, individual one.....though I confess, this is one aspect of packaging that doesn't always receive my fullest attention!

For help with FD64 stuff, I'd drop jamesbond a PM; he's quite amenable to offering assistance with his creation. Certain aspects of FatDog are a bit 'off-the-wall' anyway, so best to get advice straight from the horse's mouth, as it were....after all, much of it has been built with totally original, 'one-off' scripting, etc. Things don't always work in FatDog in quite the way you'd expect 'em to..!


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 1258

PostPosted: Sun 02 Feb 2020, 00:58    Post subject:  

@musher0,
musher0 wrote:

Since you did not mention the type of app or the file-type, the best suggestion I have is:
open a couple of the sub-dirs there and study them a bit.
E.g. for ogg files, look inside the
/root/.config/rox.sourceforge.net/OpenWith/.application_ogg
and
/root/.config/rox.sourceforge.net/OpenWith/.audio_x-vorbis+ogg

This is for the LUKS app I'm working on. My thought was to make the app respond to the ".luks" file extension (if specified) and automatically open to the password prompt if a "SomeFile.luks" is selected in RoxFiler.
The final release version accepts a filespec argument on the CL and will open with focus on that file.

It is fairly easy to set this up manually in puppy, and I have done so using the "Set Run Action" & "Open With" options in Rox, but I would rather set this behavior automatically upon install so the user doesn't have to struggle with it.

From the looks of things I'll probably need to create new mime type?

Thanks again for your help.

Mike Walsh wrote:

For help with FD64 stuff, I'd drop jamesbond a PM; he's quite amenable to offering assistance with his creation.


Thanks. I agree about the @jamesbond advice, and sent a PM to him several days ago, but I suspect he stays pretty busy and it may be several days before he responds.

Last edited by jafadmin on Sun 02 Feb 2020, 01:07; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Sun 02 Feb 2020, 01:04    Post subject:  

Additional suggestion, to see how a pet archive with an OpenWith content is structured:

Maybe look at SFR's PackIT, from here.
Unpack it somewhere safe, then browse through the dir structure,
observe the symlinks and such. how they're made.
I'm sure I'd learn a thing or two! Smile

BFN.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Sun 02 Feb 2020, 01:17    Post subject:  

jafadmin wrote:
(...)
From the looks of things I'll probably need to create new mime type?

Thanks again for your help.
(...)

I don't know anything about "luks", so I'll stop after this post.

In answer to your question:
Maybe not. It seems the general MIME type of *.luks files is
application/x-raw-disk-image
Source

Good luk. Laughing

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 1258

PostPosted: Sun 02 Feb 2020, 01:26    Post subject:  

musher0 wrote:

Maybe look at SFR's PackIT, from here.
Unpack it somewhere safe, then browse through the dir structure,
observe the symlinks and such. how they're made.
I'm sure I'd learn a thing or two! Smile

Thx, doing that now. As the cool kids say, "there's a lot to unpack there". Laughing

musher0 wrote:

In answer to your question:
Maybe not. It seems the general MIME type of *.luks files is
application/x-raw-disk-image

Great catch! Thanks, again.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 337

PostPosted: Sun 02 Feb 2020, 03:06    Post subject:  

You can create a new mime type eg *.luks or *.luks.ext3
by editing /usr/share/mime/packages/puppy.xml
for example:
Code:
<mime-type type="application/luks">
    <comment>encrypted file system</comment>
    <glob pattern="*.luks"/>
</mime-type>

then type
Code:
update-mime-database /usr/share/mime

then restart rox or X

Now, if you right click a .luks file, you should be able to set a run action for it.
Setting a run action will create a file in /root/.config/rox.sourceforge.net/MIME-types/
So you could put a file in /root/.config/rox.sourceforge.net/MIME-types/ to set the run action, assuming you created the mime type in /usr/share/mime/.

Fatdog may be slightly different.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3475
Location: The Blue Marble

PostPosted: Sun 02 Feb 2020, 04:44    Post subject:  

Good advice from williams2.

williams2 wrote:
You can create a new mime type eg *.luks or *.luks.ext3
by editing /usr/share/mime/packages/puppy.xml
for example:
Code:
<mime-type type="application/luks">
    <comment>encrypted file system</comment>
    <glob pattern="*.luks"/>
</mime-type>

then type
Code:
update-mime-database /usr/share/mime

then restart rox or X

Now, if you right click a .luks file, you should be able to set a run action for it.
Setting a run action will create a file in /root/.config/rox.sourceforge.net/MIME-types/
So you could put a file in /root/.config/rox.sourceforge.net/MIME-types/ to set the run action, assuming you created the mime type in /usr/share/mime/.

Fatdog may be slightly different.

It's mostly the same, actually.
1. Instead of editing puppy.xml, you edit fatdog.xml --- but in both puppy and fatdog, I would recommend you create new file instead, called it /usr/share/mime/packages/luks.xml with the following content:
Code:

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>

<mime-type type="application/luks">
    <comment>encrypted file system</comment>
    <glob pattern="*.luks"/>
</mime-type>

</mime-info>


And then run update-mime-database.

2. For Rox, it is also the same, but if you want pre-set the Rox click action, this is what you should do:

Create a file "/etc/xdg/rox.sourceforge.net/MIME-types/application_luks", make sure this file is executable (it can be a shell script). When you click the .luks file, this file will be executed and the first parameter ($1) will be the filename that gets clicked.

3. To make a Fatdog package, use makepkg. See here. Go to "Step 3 - making a package out of loose files". If you are familiar with Slackware packaging system, you're in luck - Fatdog's one is exactly the same.

_________________
Fatdog64 forum links: Latest version | Contributed packages | ISO builder
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 1258

PostPosted: Sun 02 Feb 2020, 15:10    Post subject:  

Merci beaucoup mon amis

Solid gold help, you guys!

Now to get busy on packaging the release candidate Wink
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 337

PostPosted: Sun 02 Feb 2020, 16:42    Post subject:  

I'm not sure if you want .luks or .luks.3fs files

You can put this in the luks.xml file (two glob pattern lines):
Code:
<glob pattern="*.luks"/>
<glob pattern="*.luks.[2-4]fs"/>

and the mime type should work with:
xyz.luks
xyz.luks.2fs
xyz.luks.3fs
xyz.luks.4fs

or this:
<glob pattern="*luks.[2-4]fs"/>
would work with eg:
xyz-luks.3fs

What ever way you want.

This might follow the xdg standards better:
<mime-type type="application/x-luks">
or maybe:
<mime-type type="application/x-luks-image">

It will work either way, it's just that sometimes
doing things in a non-standard way
can cause problems 4 or 5 years later.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 337

PostPosted: Sun 02 Feb 2020, 17:04    Post subject:  

You can use a file's magic number instead of or in addition to globbing.

Probably not necessary. There are practical examples in
packages/freedesktop.org.xml

You can set the globbing priority too, so it would prefer globbing to the file's magic number.
Also probably not necessary.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13653
Location: Arizona USA

PostPosted: Sun 02 Feb 2020, 22:14    Post subject:  

Jafadmin, is your problem solved?
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 1258

PostPosted: Mon 03 Feb 2020, 01:10    Post subject:  

Flash wrote:
Jafadmin, is your problem solved?


Partially Confused

I seem to have the ".pet" install package working fairly well, but I'm still wrestling with the FatDog install package. I can't even get the app listed in the 'Utility' menu, yet.

Here is the initial '.pet' for the release candidate if folks want to critique it.
LotsaLuks-0.1.0r.pet
Description 
pet

 Download 
Filename  LotsaLuks-0.1.0r.pet 
Filesize  8.48 KB 
Downloaded  185 Time(s) 
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 337

PostPosted: Mon 03 Feb 2020, 18:41    Post subject:  

I don't think the mime file will work.
I think you need to put a file in /usr/share/mime/packages/
named luks.xml or maybe jafluks.xml (trying to avoid a file name that someone else might use.) Like this:
Code:
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/luks">
    <comment>Luks encrypted file</comment>
    <glob pattern="*.luks"/>
  </mime-type>
</mime-info>

The pet would automatically put this file in /usr/share/mime/packages/
so all pinstall.sh needs to do is this:
Code:
#! /bin/sh
update-mime-database /usr/share/mime

And then you need to restart rox or X.

This will restart rox:
Code:
#!/bin/sh
cd
rox -D /
rox -p=
rox -p /root/Choices/ROX-Filer/PuppyPin

It will close all rox windows and restart the pinboard.
Fatdog uses a different pinboard file, I think.
Restarting X might be easier. (restartwm)?

Usually when you setup a rox run action
something happens to the particular file you click.
Like clicking bionic.iso would mount bionic.iso
and clicking xzy.gz will unzip xyz.gz

You seem to have it setup to run your program without the file name as a parameter. Nothing wrong with that, if that's what you intended to do.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0611s ][ Queries: 12 (0.0050s) ][ GZIP on ]