Gnewpet - makes pets from installed packages

Miscellaneous tools
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#31 Post by jpeps »

Geoffrey wrote:Welcome back 8), I found this very useful, saves me constantly having to use the ppm while I'm working on test installs,
the only thing I found is if the app saves its setting to a file that was installed, it will have those settings,
I've only come across this once with a game I made into a pet, but that is a minor problem, keep up the good work.
Yeah, it copies the current files listed in /root/.packages, not the originals..thus the ability to change the name for an update. The "save directory" option is for manually adding files not listed in .packages.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#32 Post by technosaurus »

If anyone would like a simplified version:

Code: Select all

#!/bin/sh
D=$HOME/.packages/builtin_files
PKGS=`ls -1 $D`
PKG=`Xdialog --stdout --combobox "select package to petify" 0 0 $PKGS`
[ $PKG ] && {
	mkdir /tmp/$PKG
	for x in `cat $D/$PKG`; do
		[ -d $x ] && cd $x || cp --parents `pwd`/$x /tmp/$PKG
	done
echo "




" |dir2pet /tmp/$PKG && $0
}
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#33 Post by jpeps »

technosaurus wrote:If anyone would like a simplified version:
The accurate package names and pet.specs for the builtin names are found by searching the woof-installed-packages. In many cases, they're a combination of several packages. For that reason, I didn't want to include an inaccurate pet.spec. For a unique pet.spec, just check "save directory" and then run dir2pet on it in the /tmp folder.

For the user installed packages, gnewpet includes the original pet.spec file, eliminating the need to design a new one.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#34 Post by RSH »

Hi,

I am totally sorry to post again about the same issue, but i do have the same results as i did get using gnewpet version 6.0. :!:

I do get the correct list of installed applications of the mounted sfs inside the mounted iso. If i select one pet to rebuild, i do get only the "var" directory and its content (maybe created by gnewpet?).

I did this using the new diamond iso - trying to rebuild timidity. Doing this using installed gnewpet 6.2 was not successful! :shock:

After installing my previous posted and modified script, i do get all the files. and after installing timidity i just did need to search manually for some missed libs. These libs seem not to be listed in the ".files" file of timidity - so everything seems to be alright with that fact. Found all the libs inside diamond and copied into my LazY Puppy - and succeeds!

Data:

Path in gnewpath: /mnt/+mnt++mnt+sdb2+Diamond528rtp.iso+lupu_528.sfs (path /root/.packages is predefined in gnewpet)

Full path is: /mnt/+mnt++mnt+sdb2+Diamond528rtp.iso+lupu_528.sfs/root/.packages

Note, i do get the right and complete list of installed apps in diamond! :!:

Please would somebody improve this using a mounted sfs inside a mounted iso and trying to rebuild a application which is NOT installed inside the actually running puppy. Please, do so - this wonderful application should work in every detail, but actually it doesn't. :cry:

Better saying: actually it does only work correct if using my previous posted modified script.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#35 Post by jpeps »

OK, should be fixed. Thought it was working, but guess not.


edit: something still screwing up....looking at it.

Found it. Hope that fixed it.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#36 Post by jpeps »

Version 6.4: Added a feature that searches the woof packages for a selected builtin, adding the correct name to the NewName entry in addition to installing the correct pet.spec file into the package. Some builtins are a combination of several packages, so you'll simply get a message to that effect. Works with both relative and installed directories.
Last edited by jpeps on Sun 04 Mar 2012, 00:31, edited 1 time in total.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#37 Post by pemasu »

Gotcha. Thanks :D

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#38 Post by jpeps »

Version 6.5 Using builtin Woof-Names/specs feature added for batch mode (there's a checkbox in the batch window). If the builtin uses multiple packages, it will just use the builtin name.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#39 Post by RSH »

Actually i did not proof the latest version until today. Just want to make a suggestion:

Why don't you use the wonderful "Color"-icon for the .desktop file (menu entry)?

It would look much nicer than the actual icon and would completely fit to the application icon (would help also, to find the application in the menu - i think)!
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#40 Post by jpeps »

RSH wrote:Actually i did not proof the latest version until today. Just want to make a suggestion:

Why don't you use the wonderful "Color"-icon for the .desktop file (menu entry)?

It would look much nicer than the actual icon and would completely fit to the application icon (would help also, to find the application in the menu - i think)!
Currently it uses mini-dog in the menu entry, which is certainly appropriate and probably included in most distros (I think). The use of the "color" icon on the title bar is somewhat arbitrary...I just liked the way it looked and wanted to make sure it always worked...thus included it in the package.

tip: Link a tray or desktop icon to "gnewpet" instead of "gnewpet-wrapper". When you need it for a relative directory, run the wrapper from the terminal after cd'ing to the correct directory.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Fileselector - <entry accept="directory">

#41 Post by RSH »

You should use

Code: Select all

<entry accept="directory">
for the file selector (wrapper used on relative path). 8)

That way, only directories can be selected (should be much better for the use with mounted sfs inside mounted iso). 8)
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: Fileselector - <entry accept="directory">

#42 Post by jpeps »

RSH wrote:You should use

Code: Select all

<entry accept="directory">
for the file selector (wrapper used on relative path). 8)

That way, only directories can be selected (should be much better for the use with mounted sfs inside mounted iso). 8)
Only directories can be accepted the way it is now.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Re: Fileselector - <entry accept="directory">

#43 Post by RSH »

jpeps wrote:
RSH wrote:You should use

Code: Select all

<entry accept="directory">
for the file selector (wrapper used on relative path). 8)

That way, only directories can be selected (should be much better for the use with mounted sfs inside mounted iso). 8)
Only directories can be accepted the way it is now.
I have downloaded and made a quick test on the gnewpet 6.5. Works fine, now. :)

Something to my last post: sorry, but maybe i could not make clear, what i meant. :(

I will try it again. 8)

Line 32 in gnewpet-wrapper changing to

Code: Select all

 <entry accept="directory" fs-folder="'$1'" fs-title="Select an existing folder" fs-action="folder">
will let select only directories. The mean part is: accept="directory". :D

fs-action="folder" seems not to work. Attached pics will tell the rest.
Attachments
no-it-is-not.jpg
Files can be selected (6.5 - as it is)
(44.44 KiB) Downloaded 940 times
yes-it-is-now.jpg
Only directories can be selected (6.5 edited by myself) - accept=&quot;directory&quot;
(41.77 KiB) Downloaded 1007 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#44 Post by RSH »

OK!

I have examined that again.

Seems like your puppy has gtkdialog-0.8 (gtkdialog4) installed and gtkdialog is a symbolic link to gtkdialog4. :!:

LazY Puppy (and lucid 528) do have gktdialog-0.8 installed as well but, gtkdialog is a symbolic link to gtkdialog3. :!:

Using gtkdialog3 changing line 6 in gnewpet-wrapper to

Code: Select all

GTKDIALOG=gtkdialog4
results in the same effect like changing line 32 in gnewpet-wrapper to

Code: Select all

<entry accept="directory" fs-folder="'$1'" fs-title="Select an existing folder" fs-action="folder">
(using gtkdialog3)

EDIT: EDIT: EDIT:
accept="directory" works in gtkdialog3 & gtkdialog4
fs-action="folder" works only in gtkdialog4
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#45 Post by jpeps »

Yes, I'm writing with updated gtkdialog, although it has limited backward compatibility. There are a lot of important revisions in gtkdialog, like file selection filters, etc. It takes under 10 seconds to update. I have no idea why anyone wouldn't include it in their distro.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#46 Post by pemasu »

When Thunor started to develop gtkdialog...01micko announced that he will support gtkdialog4. In slacko gtkdialog is symlink to gtkdialog4. I have done so also with dpup exprimo. Lucid Puppy follows its own decision and so does Barry Kauler. Lucid Puppy woof base is 2 years old now. Woof2 provides now gtkdialog4 compliant scripts to the base sfs.

01micko`s reasoning was that those non-compliant older gtkdialog apps should be picked and author should fix them. Most actively supported gtkdialog apps have been updated.

Here is the nice script by 01micko to download gtkdialog source....compile it and get ready made stuff in /tmp folder. I have used that script created latest gtkdialog version.
Remove the phony .gz and give it executable permissions.
Attachments
update-gtkdialog.gz
(503 Bytes) Downloaded 795 times

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

is pferences included?

#47 Post by Scooby »

Say I wanted to make a pet with my personal preferences
Is this possible?

Is configuration files included in generated pet?

If not do you know any other way to accomlish this?

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Re: is pferences included?

#48 Post by RSH »

Scooby wrote:Say I wanted to make a pet with my personal preferences
Is this possible?

Is configuration files included in generated pet?

If not do you know any other way to accomlish this?
If you do re-create a .pet of installed files, the .pet contains the currently settings of this application.

To make a .pet out of other files i would recommend the backup-settings:
http://murga-linux.com/puppy/viewtopic. ... 348#614348

Using gnewpet and backup-settings together will make almost of what you want.

I do use both as a special team - that's why i include a run option for gnewpet inside the backup-settings.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: is pferences included?

#49 Post by jpeps »

Scooby wrote:Say I wanted to make a pet with my personal preferences
Is this possible?

Is configuration files included in generated pet?

If not do you know any other way to accomlish this?
If config files are not in the initial file list, you can add them manually by checking save directory.

lulrich
Posts: 13
Joined: Sun 25 Sep 2011, 21:00

#50 Post by lulrich »

HI,
Could someone explain to me how to create a pet with gnupet for gnucash,?
here is my problem, I am not able at this point to connect to the internet with my personal laptop and I need to install gnucash to it, so I downloaded gnewpet onto a flash-drive on another computer and installed it to my laptop, I did the same with gnucash, downloaded it to flash drive and extracted it inside the root folder on my laptop and then tried to create a pet but wasn´t able to, is this possible to do or am I trying to do something that can´t be done :roll:
thank you, I have a lot to learn yet

Post Reply