PuppyLinux : DotPupHowToMake

PuppyLinuxMainPage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Another Excellent list on making DotPups
One more guide

How To Make a DotPup


A DotPup file is simply a zip file. You put whatever files you like in it. There should be a file called dotpup.sh, which will be executed when the DotPup is automatically unzipped. There should be a file called md5sum.txt, which should contain the md5sums of any files you want to be automatically checked by the DotPup system.

When the DotPup file is clicked, the DotPup system should

Here's a very simple step-by-step example.


image


#!/bin/sh
xmessage -center "Hello, World!"



image

To make your dotpup.sh file into a DotPup that is self-testing and runs automatically when it's clicked, right click the dir and Open an Xterm, and type:

md5sum dotpup.sh > md5sum.txt
zip -9 helloworld.pup dotpup.sh md5sum.txt


This will create an md5sum of your file dotpup.sh so when it's unzipped by the DotPup system, you are sure it's integrity is ok. And it will create a file called helloworld.pup, which is just dotpup.sh and md5sum.txt zipped into one file. When you click helloworld.pup, it will be checked and automatically unzipped and run ... so you should see the Hello World window popup when you click the DotPup (because it runs the dotpup.sh script, and that's what your script does).

If you change your DotPup files, for example, if you edit your dotpup.sh file, you will have to repeat the commands you typed in to make the DotPup file, so you might as well make a script to click that will make a new DotPup whenever you change any of the files. (You do not have to create a make-pup script ... but it's usually easier). In this case,


#!/bin/sh
md5sum dotpup.sh > md5sum.txt
rm -f helloworld.pup
zip -9 helloworld.pup dotpup.sh md5sum.txt



image


image


image

Of course, the dotpup.sh script will execute whatever commands you put in it. The Hello World script is a trivial example.

You could have the dotpup.sh script run other file(s) in your package. For example,


#!/bin/sh
xmessage -center "Hello, World!"


This will do the same thing the dotpup.sh script did.


#!/bin/sh
cp -f helloworld /root/my-applications/bin
exec helloworld


This will copy the executable file helloworld to /root/my-applications/bin, then it will run helloworld. It should be found and run because /root/my-applications/bin is included in $PATH

If you are using the make-pup file, edit it to include the new helloworld file and click it to make a new DotPup.

#!/bin/sh
md5sum dotpup.sh helloworld > md5sum.txt
rm -f helloworld.pup
zip -9 helloworld.pup dotpup.sh helloworld md5sum.txt



image

Anyone who clicks your helloworld.pup file will install your helloworld program, so they can type helloworld in an rxvt window, and your Hello World message will pop up. The dotpup.sh script also runs the helloworld program after it installs (copies) it. You can decide what you want your dotpup.sh script to do, or not do.

Notes:


CategoryHowto

There are 3 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.8217 seconds