My postinstall script runs slow. What to do?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

My postinstall script runs slow. What to do?

#1 Post by scsijon »

Hi, I'm doing a postinstall script.

everything works ok in it!

However it "does take some time" to run!

I was wondering how I can bring up a splash "please wait" screen, so the "puppy users" don't think it's broken or has completed early and try to run the new application "half installed".

thanks
scsijon
ps, I take it you can't do links in these scripts (I just create a simple script in the relevant directory instead).

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#2 Post by trapster »

yaf-splash works nicely for me.
Start the message at the beginning and kill it when you want it killed (at the end or right before something starts)

We should have more of this in puppy as nubes are not sure if anything is started when they click on things.

ie:

#!/bin/sh
yaf-splash -text "Please wait" &
cd /mnt/home/pets/weather-util/weather-1.5
./weather --forecast -i kizg --city=fryeburg --st=me > /root/tempweather
killall yaf-splash
xmessage -buttons "Exit" -fg "#59FF00" -bg "#000000" -title Weather -center -file /root/tempweather
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#3 Post by scsijon »

thanks trapster, will give it a go and see how it works out.

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

Re: My postinstall script runs slow. What to do?

#4 Post by technosaurus »

scsijon wrote:ps, I take it you can't do links in these scripts (I just create a simple script in the relevant directory instead).
ln -s ...
what are you trying to do?

I use functions in bashbox and the name of the symlink determines the function that runs

simplified ex of bashbox:

Code: Select all

#!/bin/sh
supporting_function() { ... }

pinstall() { ... }

puninstall { ... }

app_one() { ... }

app_two() { ... }

`basename $0 |cut -d "." -f 1` #runs function with the same name as the symlink with extensions removed
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].

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

Re: My postinstall script runs slow. What to do?

#5 Post by scsijon »

technosaurus wrote:ln -s ...
what are you trying to do?

I use functions in bashbox and the name of the symlink determines the function that runs

simplified ex of bashbox:

Code: Select all

#!/bin/sh
supporting_function() { ... }

[/quote]

Nothing complicated, it's just an front end network app that was origonally created when the three libs it uses were at earlier revisions than puppy now uses and it complains they are not there!

I just wanted to do some simple links, eg "ln -s libfoo.0.92.so libfoo.0.78.so" (think that was the right way around), 

got no error message but it didn't create them either so I created a physical copy named for each that did the same thing and inserted them and the package worked.

Now I know the cloud app's origonal front end will at least "start" under puppy, I am getting the latest source from him (when he finds it again) and see if I can understand it enough to build a version of it to run on puppy.

And of course get back to my own puppy building.

Post Reply