YaPI (yet another Puppy Installer) install any Puppy iso

Core libraries and systems
Message
Author
User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#16 Post by bigpup »

In your translation code i see entries like this at the beginning of each statement translation code.
#: /initrd/mnt/dev_save/my-documents/downloads/YaPI/root/my-applications/bin/yapi:152
If that number 152 is the line number in the Yapi code.
It is not the correct line number.
The statement starts on a different line number in the Yapi code.
Could that be the problem. :idea:
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#17 Post by Argolance »

Bonjour,
bigpup wrote:In your translation code i see entries like this at the beginning of each statement translation code.
#: /initrd/mnt/dev_save/my-documents/downloads/YaPI/root/my-applications/bin/yapi:152
If that number 152 is the line number in the Yapi code.
It is not the correct line number.
The statement starts on a different line number in the Yapi code.
Could that be the problem. :idea:
Thanks!
Sorry, but the problem is elsewhere. :?
I've been working on translating a version of YaPI with strictly the same name, sent as attached file in a PM by a Forum member, and now I realize that it's not the same version that is given on the first page of this topic, but a custom version that may have unexpected flaws that the original doesn't have!

If you'll excuse me, I'll come back later with the "right" translation!

Cordialement.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#18 Post by Argolance »

Bonjour,
For all translatable strings to be taken into account, I had to modify both functions as follows (130):

Code: Select all

usage () {

 local MSG1 MSG2 MSG3 MSG4 MSG5 MSG6 
 MSG1="$(gettext 'Syntax:')\n $1 $(gettext '[this|/full/absolute/path/to/iso [device [partition]]]')"
 MSG2="$(gettext 'If no input of parameter then GUI is being used to ask for missing parameters.')"
 MSG3="$(gettext 'This help:')\n $1 -h"
 MSG4="$1 $(gettext 'this sdd Extra\n To be used for an entire USB stick\n (After that use gparted to create partitions on that USB stick).')"
 MSG5="$1 $(gettext 'this sdc sdc2\n Puppy traditional default installation method: frugal.')"
 MSG6="$(gettext 'or, if this partition has a Linux file system,\nother distributions default installation method: full')"
 msg "$MSG1 \n\n $MSG3 \n\n $MSG2 \n\n$(gettext 'Examples:')\n\n$MSG5\n$MSG6\n\n$MSG4"

}

intro () {

 MSG1="$(gettext 'YaPI (Yet another Puppy Installer) supports THREE types of installation to storage devices.')"
 MSG2="$(gettext 'FRUGAL
   The files vmlinuz, initrd.gz and pup_xxx.sfs (and maybe z*.sfs, the "zdrv") are copied to a partition.
   This partition may already have something installed on it and that will not be disturbed.
   This can be any type of partition, MSDOS, Windows (FAT, NTFS) or Linux (EXT2, EXT3, EXT4 or REISERFS).
   For most people this is the RECOMMENDED OPTION.')\n\n
 $(gettext 'SUPERFLOPPY')
   $(gettext 'Taking over the entire storage device. Has NO MBR, NO partition and a SINGLE file system.
   It uses a portion of space on storage device for frugal install and the remainder YaPI will make into a partition for data storage.')"	
 MSG3="$(gettext 'FULL
   A full installation, taking over the entire partition. This is the normal traditional Linux hard drive installation.
   Requires the partition to have a Linux filesystem (EXT2, EXT3, EXT4 or REISERFS).')"	
 MSG4="$(gettext 'The type of device (hard drive, USB flash drive, etc...), format of partition, will also determine what type install will be offered.
   Some devices can only have one type of install, so it may not give you a type of install option.
   The installer will auto select the install it can do.')"	
 MSG5="$(gettext 'TO BOOT Puppy.
   Depending on the device and how Puppy is installed.
   You may also need to install a boot loader.')"	
 MSG6="$(gettext 'You will be given more advice about these options as you use YaPI.')"	
 msg "$MSG1 \n\n $MSG2 \n\n $MSG3 \n\n $MSG4 \n\n $MSG5 \n\n $MSG6"

}
All seems running properly.
In the French translation, I added line breaks (\n) in some strings so that the welcome window has a reasonable size.
I also took the liberty to put a title to the Xdialog window "YaPI", more friendly than the default "Xdialog"...

Cordialement.
Attachments
yapi.gz
Remove .gz
(36.16 KiB) Downloaded 435 times
180825_160028_794x485_easyshot.png
(62.33 KiB) Downloaded 635 times
yapi_180825_fr_files.tar.gz
(13.3 KiB) Downloaded 405 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#19 Post by bigpup »

Argolance,

If your code changes seem to make Yapi easier to get translated and it still seems to work OK.
I can post your version of Yapi as the latest one.

Main point is if it seems to do everything OK.

Thanks for looking into this and offering fix.

Every software program can always use a little tweaking!

Is what you posted the complete code with all your changes?
Seems to be, but just want to make sure!
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#20 Post by Argolance »

Bonsoir,
bigpup wrote:If your code changes seem to make Yapi easier to get translated and it still seems to work OK.
Main point is if it seems to do everything OK.
With the codes lines, I learned to be on my guard! But you know as well as I do that we are never immune from surprises. I'm not an expert but I did it as seriously as I could and with the experience I have of it.
Thanks for looking into this and offering fix.
De nada.
Is what you posted the complete code with all your changes?
Seems to be, but just want to make sure!
Yes it is: script and gettext French pot, po and mo files.

Cordialement.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#21 Post by bigpup »

OK!

I will do some install testing to make sure the new code is working OK.
If it all checks out.
Your code change will be the latest Yapi.

To show your work on Yapi.
I will add a info statement, to the start of the code, to reflect your input to the program code.

Example:
This is at the start of code, for info, at this time.

Code: Select all

#!/bin/sh
# Yet another Puppy Installer
#
# written from scratch 2015-Dec - 2016-Mar by L18L
# initiated and kept alive by puppy forum member bigpup
# http://www.murga-linux.com/puppy/viewtopic.php?t=101127
#
#################################################################################
# This installer is trying to offer working solutions for existing hardware only.
#################################################################################
#
#151220a start again from square 1; bugs fixed thanks mavrothal
#151221 find this iso in all devices
#151222 input parameter: iso device partition
#151229 frugal full
#160101 delete tmp; right click: Open with puppyinstaller
#160102 sort entire list; use blkid, umount revised, frugal/full fixed 
#160105 some bugs fixed, V for verbous 
#160106 text changes. replace for guess_fstype, more functions
#160107 looptext changes. replace for guess_fstype, more functions
#160110 bug fix
#160217 extra button for superfloppy only for removable drives less than 8 GiB
#160218 use entire drive with Superfloppy (partition 3); msg before grub4dosconfig; no full install on removable device
#160227 update right click link; "please wait..."s without OK; bigpup's help text updates; mkisofs
#160228 re-generate isohybrid ISOs (add psavemark=3 to isolinux.cfg)
#160229 Help for re-generate superfloppy to normal drive, superfloppy for isohybrids only.
#160303 try to make all ISOs isohybrid; superfloppy limit 16 GiB; gettext revised.
#160304 fix for http://www.murga-linux.com/puppy/viewtopic.php?p=892502#892502
#160308 fix for http://www.murga-linux.com/puppy/viewtopic.php?t=101127&start=269 ff.
#160311 160308a + refresh button for list of isos
#160312 bug fix
#160325 close if superfloppy No.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#22 Post by Argolance »

Hi,
Thanks!
I obviously made a test but only one and ToOpPY was properly installed from an iso file to a 4 Gb USB stick.

Cordialement.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#23 Post by bigpup »

Argolance,

I am still testing all of your code changes.
Life got in the way and have had little time to work on this.

Seems to be testing OK, but still checking some stuff.
Trying to make sure it still works on a lot of Puppy versions.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#24 Post by Argolance »

Bonjour,
bigpup wrote:I am still testing all of your code changes.
Life got in the way and have had little time to work on this.
Changes are cosmetic and should not influence the operation of the program, but we just never know!
Anyway, there's no rush.
In one of the private messages I sent you, I told you that on my laptop, YaPI takes time (4 ou 5 seconds, but on older PCs it might be much more!) to check several stuffs before displaying the main welcome window, and this is also the case when I directly right click an iso file and use the "OpenWith" command. This is why I added an animated gif that is only displayed during this time and closed when checking is done, no matter how long it takes. I also added such animated gifs for other operations that need a bit time, and, to clearly let user know what operation is currently done, I changed Xdialog windows to yaf-splash windows placed at the top of the desktop (the text color is black and the background is white, according to your suggestion).
Some users are lucky enough to have a very fast computer and I admit this may not really useful in that case.

I improved the French translation too (some strings were missing), completed the desktop file (fr, de, es, it, nl, pl) and other little stuffs.
All the changes are noted at the head and can be identified in the body of the script (#180903).

Cordialement.
Attachments
fr-po_pot_files.tar.gz
(9.13 KiB) Downloaded 392 times
yapi-180903.pet
(25.39 KiB) Downloaded 401 times
180903_165018_317x74_easyshot.png
(4.66 KiB) Downloaded 507 times
180903_164629_804x75_easyshot.png
(19.39 KiB) Downloaded 519 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#25 Post by bigpup »

Using in Xenialpup64 7.5
I also added such animated gifs for other operations that need a bit time, and, to clearly let user know what operation is currently done,
A quick test of Yapi script 180903 and the pet package.

Make choice which Puppy to install window.
Select actual running Puppy.
animated gif pops up (scanning for iso file), but does not go away when next window comes up (choose which one to take).

The idea is a good one to add these animated gifs.

The menu entry for yapi does not have a icon.
The yapi.desktop file in /usr/share/applications had no icon
I edited the yapi.desktop file.
changed the icon line from this:

Code: Select all

Icon=yapi
To this:

Code: Select all

Icon=/usr/share/pixmaps/yapi.gif
That got the icon to show on the yapi.desktop file.
Still no icon in the menu entry.
Could this be because this yapi.gif is an animated gif? :idea:

Tried a different edit to the yapi.desktop file.
changed the icon line to this:

Code: Select all

Icon=/usr/share/icons/hicolor/48x48/apps/yapi.png
That worked.
menu entry for yapi now has an icon.

So, the yapi.desktop file needs changed to using the yapi.png for the icon.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#26 Post by Argolance »

bigpup wrote:Using in Xenialpup64 7.5
A quick test of Yapi script 180903

Make choice which Puppy to install window.
Select actual running Puppy.
animated gif pops up (scanning for iso file), but does not go away when next window comes up (choose which one to take).
I noticed this malfunction in the previous 180828 version but I corrected this in the 180903 and I have not this issue here! :oops:
The menu entry for yapi does not have a icon.
The yapi.desktop file had no icon in /usr/share/applications
I edited the yapi.desktop file.
changed the icon line from this:

Code: Select all

Icon=yapi
To this:

Code: Select all

Icon=/usr/share/pixmaps/yapi.gif
That got the icon to show on the yapi.desktop file.
Still no icon in the menu entry.
Could this be because this yapi.gif is an animated gif? :idea:
The icon path is /usr/share/icons/hicolor/48x48/apps/yapi.png.
So:

Code: Select all

Icon=/usr/share/icons/hicolor/48x48/apps/yapi.png
(EDIT]: Our messages crossed paths... :wink:

Cordialement.
Attachments
180903_192204_2646x1024_easyshot.png
(98.28 KiB) Downloaded 486 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#27 Post by bigpup »

When Yapi first starts.
The first animated gif not showing long enough to read.
On line 51 of yapi script I added

Code: Select all

sleep 2

Code: Select all

#180903
yaf-splash -icon /usr/share/pixmaps/yapi.gif -bg white -text "$(gettext 'Please wait...')
YaPI (Yet another Puppy Installer)
$(gettext 'is checking your configuration!')" -close never &
sleep 2
X1PID=$!
I think that is the correct place to put the sleep command?

That now seems to show long enough.

I have a fast computer. Not sure what affect this would have on a slow computer. Should not be too long, I hope!
Attachments
180903_165018_317x74_easyshot.png
(4.66 KiB) Downloaded 481 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#28 Post by Argolance »

bigpup wrote:When Yapi first starts.
The first animated gif not showing long enough to read.
As said above:
Some users are lucky enough to have a very fast computer and I admit this may not really useful in that case.
It seems you're one of those lucky ones! :)
If these lucky guys want to see the pretty image too, yes, it is the correct place to put the sleep command! :D

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#29 Post by bigpup »

Argolance wrote:
bigpup wrote:Using in Xenialpup64 7.5
A quick test of Yapi script 180903

Make choice which Puppy to install window.
Select actual running Puppy.
animated gif pops up (scanning for iso file), but does not go away when next window comes up (choose which one to take).
I noticed this malfunction in the previous 180828 version but I corrected this in the 180903 and I have not this issue here!
Could you post what you changed in 180828 version of yapi?

Sorry, life is calling.
Have to go now!

Just a little tweaking needed!
Not bad so far!
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#30 Post by Argolance »

bigpup wrote:Could you post what you changed in 180828 version of yapi?
This is the one I posted in my message above (Posted: Sat Aug 25, 2018 10:11 am) as "yapi.gz". I dated it for my own usage as the 180828 one but didn't write it inside this first sent version of the yapi script.
This yaf-splash window that seems "immortal" :) replaces a Xdialog one which is originally killed with its own PID (i. e. the same unchanged XPID).
I was mistaken: what I corrected compared to the previous version is the fact that the main welcome yaf-splash was not killed when using the:

Code: Select all

yapi -h 
... command in console.
Just a little tweaking needed!
See line 329 (and all further similar code lines)

Code: Select all

disown $PID && sleep 2 && kill -9 $XPID
Try this instead:

Code: Select all

sleep 2
disown $PID && kill -9 $XPID
Cordialement!

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#31 Post by bigpup »

Did this change.

Code: Select all

sleep 2
disown $PID && kill -9 $XPID
Did not help.
Still get:
Make choice which Puppy to install window.
Select actual running Puppy.
animated gif pops up (scanning for iso file), but does not go away when next window comes up (choose which one to take).
It is only this one animated gif that does this.
All the other ones, pop up and close, when they should.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#32 Post by Argolance »

Bonsoir,
bigpup wrote:It is only this one animated gif that does this.
Sorry mate, I cannot reproduce this. Running ToOpPy/Puppy Precise, this issue doesn't happen... pop up 2 and 3 are displayed one after the other as it should, and the 3rd one is properly closed when the 4th window appears.

[EDIT]: did you try the original yapi, to see if this also happens with Xdialog windows? Note that with a fast PC, they should only be displayed for a fraction of a second.

Cordialement.
Attachments
180904_204604_636x224_easyshot.jpg
(66.65 KiB) Downloaded 728 times

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#33 Post by Argolance »

I think I found what's wrong: :roll:
Line 326:

Code: Select all

    for PATTERN in pu sla ta precise
    do
     find / -iname *${PATTERN}*[0-9]*.iso -type f >> ${my_pupISOs}
    done
You say you are running Xenialpup64 7.5? In the code lines above, a pattern for xenial should probably be added (pu for puppy, sla for slacko, ta for tahr)
Something like:

Code: Select all

    for PATTERN in pu sla ta precise xen
    do
     find / -iname *${PATTERN}*[0-9]*.iso -type f >> ${my_pupISOs}
    done
(xen for xenial).

Ditto at line 348 and a corresponding pattern for any other new puppies published since...

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#34 Post by bigpup »

[EDIT]: did you try the original yapi, to see if this also happens with Xdialog windows?
Yes, I checked.
It works correctly in original Yapi.

Did the above code change.

No help.

That code is for doing a search for iso's, on all the storage devices, to get a list of all available iso's.
But, probably a good idea to add the xen.

As shown in your above post.
pop up 2 stays until 3 is shown.
Then 2 goes away.

It is only a minor bug, but what is causing this and only on this pop up 2 :?: :idea: :?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#35 Post by Argolance »

Bonjour,
:(
bigpup wrote:That code is for doing a search for iso's, on all the storage devices, to get a list of all available iso's.
This is indeed what I understood while looking at the code lines and I was wondering if not being able to find the puppy iso whose name and version are previously identified by the values extracted from etc/DISTRO_SPECS file might be the cause of the issue?
I think that if it's not that issue, it's possibly the cause of another one anyway, though "xen" may not be necessary because "xenialpup" includes "pu" whereas "stretch" certainly needs an additional search parameter.
But, probably a good idea to add the xen.
Yes, this problem will have let us to find a stuff which has its importance. :wink:
It is only a minor bug, but what is causing this and only on this pop up 2
And not with Puppy Precise... or a less fast PC/laptop? 8)
Little odd story!
Perhaps there is confusion between 2 values of XPID, so it might be useful to name them differently (XPID1 and XPID2) and anyway kill both to be sure?
Example:

Code: Select all

yaf-splash -placement top -icon /usr/share/pixmaps/yapi_wait.gif -text "TEST 1" -close never &
XPID1=$!
yaf-splash -placement top -icon /usr/share/pixmaps/yapi_wait.gif -text "TEST 2" -close never &
XPID2=$!
sleep 3
kill $XPID1
sleep 3
kill $XPID2
Cordialement.

Post Reply