Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (5) </ [1] 2 3 4 5 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Quick And Dirty .dsl Packages, How I create my dsl packages< Next Oldest | Next Newest >
tecker Offline





Group: Members
Posts: 72
Joined: June 2004
Posted: June 24 2004,19:24 QUOTE

At the request of another member I will tell how I make my .dsl packages. I will be using the example of the xchat dsl that i made. This is how I made that package.

IF YOU JUST WANT THE BASICS SEE THE SECOND POST >>

First decide what you want. Somebody wanted a xchat package so I decided to make that.

1) Enable Apt-Get. It is under App -> Tools -> Enable Apt.
   Let that run and now dpkg and Apt-get will work.

2) Now if you want to play it safe and use "woody" packages then you can skip this step. If you want newer and closser to the the current packages you will need to change the apt sources.
     A) Open Xterminal and then type
Code Sample
sudo su
to become root.
     B) type
Code Sample
scite /etc/apt/sources.list

     C) remove the # from the line 1 & 3 and add one to line 2
     D) save the file and close scite

3) At the terminal type
Code Sample
apt-get update


4)  Now after that type
Code Sample
apt-get -d install <program you want (eg. xchat)>  

    That "-d" tells the computer to download the packages and NOT to install the packages.

5) create a directory in your home directory (/home/damnsmall for most) based on the program to be installed (/home/damnsmall/xchat in this example)

6) In the terminal type
Code Sample
mc[/CODE] to launch midnight commander

7) When the left side is active navigate to /var/cache/apt/archives and on the right go to the folder you made in step 5

8) copy the main program .deb into the folder. (ex. xchat---.deb)

9)  run [CODE] dpkg --extract <prog>*.deb ./<prg>

    The first <prog> is the name of the package. The * wildcard will take care of that complex verson number. The second ./<prg> argument is the folder that contains the program. abreviate the name just so you can keep the extrated programs seperate (will explain later).

10) Now using midnight commander navigate into the created folder. you will probably see there is a 'usr' and mabye some others. These folder(s) are the same as the linux root tree. 'usr' = /usr  'usr/lib" = /usr/lib. get the picture? Find the program and locate the program executable (probably in the 'usr/bin' directory) and highlight and hit enter to run it from MC.

11) look at the error message. I might say something like
Code Sample
Error: libabcd123.so.1 not found. Program could not run

    This means that the program needs this file and we need to find it. Look in the .deb package for something like "libABcd123-1.2.5-16.deb" that is similar to the package missing.
If you cant find it open up glinks-h and surf to your favorite search engine (www.google.com/linux might be a good bet) and look for the file missing. that might give  you some insight in to the package it is included in. Once you found it repeat steps 7 - 11 with each error that pops up. However!, copy the dependecy into the real file system folder (if the extracts creates 'usr'/lib' copy the file to the /usr/lib directory. '/usr/lib'
is your best be on where to put the needed files.

12) If you are reading this after doing 7 - 11 about 15 times and have got a working program, congratulation! your program is almost ready to go.
    If you are reading this thinking "No way. Not going to all of that work!" Can't help there.
    If you are to this point and nothing works . Put a post in the myDSL forums and someone may have an answer. (most likely you will need to copy everything out of the dependencies except the documentation {wasted space, imho.] like there is an 'etc' foler in the extract you will need to copy those contents to the /etc folder)

13) Now on to packaging the program >>>


--------------
People laugh because I have linux on a cd with me.

I laugh as the pay me for using that disk to recover their precious windows.
Back to top
Profile PM WEB 
tecker Offline





Group: Members
Posts: 72
Joined: June 2004
Posted: June 24 2004,19:24 QUOTE

Creating the actual DSL file

Ok now that you have figured out the files needed and the program is running (or you skiped the first post) You can now create a .dsl package.

1) In the home directory (/home/damnsmall for expample) create a folder by the name of your package and add dsl at the end (eg. "xchatdsl")

2) Copy all of the program contents from the extracted folders into the new one. For example in the new folder 'prgdsl/usr/lib' copy all of the files from the program and dependencies from each of the '<extract>/usr/lib' into this folder. Do the same for the remaining (<extract>/etc/...  & <ext>/usr/bin/... & <ext>/usr/share/... ) to ther respective programs (<pkgdsl>/etc/...  & <pkgdsl>/usr/bin/... & <pkg>/usr/share/...). Does this make sense yet?

3) Once all of the program and dependencies are in that folder you are ready to package.

4) Navigate into the <pkgdsl> folder in a terminal.

5) run
Code Sample
ls


6) you should see something to the effect of
Code Sample
# ls
etc   usr
dam----#


7) if you see that then you are ready to add the final touches.

8) If you want to launch the program from the myDSL menu when you right click then you will need to create a menu file.
       A) in the <pkgdsl> directory run:
Code Sample
mkdir ./var/tmp/mydsl.menu
cd ./var/tmp/mydsl.menu
touch <program name> (ex. xchat)
scite ./<prgname>


       b) you now should have scite with a blank slate ready to go.
       c) the syntax of the menu file is a follows:
Code Sample

    [exec]  (xchat)  {/usr/bin/xchat}

       d) save the file and exit. You will now be able to run from the menu.

9) Once that is made we are ready to pack.

10) to create the dsl make sure there are no other files but the folders (etc, usr, bin, var, root, you wont have all of the these but folders should be the only thing there.) no '.deb', no '.tar.gz',  no files.

11) execute
Code Sample
tar cvfz <packagenamefordsl>.dsl *


12) you now should have a DSL package ready to go on a live boot. Go and test it out.


--------------
People laugh because I have linux on a cd with me.

I laugh as the pay me for using that disk to recover their precious windows.
Back to top
Profile PM WEB 
tecker Offline





Group: Members
Posts: 72
Joined: June 2004
Posted: June 24 2004,19:54 QUOTE

Creating Desktop Icons for you DSL packages

Ok so you have a dsl package that works but you want a freaking desktop icon so i looks better.

SIMPLE! Rigt? Sorta.

You will need to repack the dsl (well, yea) but the trick can be the location.
All packages that have desktop icons seem to have an empty /home/damnsmall directory. Actualy there is a hidden '.xtdesktop' folder that most time will not show up. Here is the easy method.

Go to the folder where you packed the dsl (or extract your dsl, its just a renamed tar.gz) and round up an icon.

1) Create the folder
Code Sample

mkdir ./home/damnsmall/.xtdesktop/
cd ./home/damnsmall/.xtdesktop/


2) Create the lnk file:
Code Sample

touch <progname>.lnk
scite ./*.lnk


3) In the file put the following
Code Sample

table Icon
 Type: Program
 Caption: MSN Messenger
 Command: /usr/bin/amsn
 Icon: .xtdesktop/amsn.png
 X: 50
 Y: 450
end


4) Edit the file to suit your needs. The X & Y cordinates are the pixels from the uper left corner the icon will be offset. Match the name of your icon to the one you will copy in.

5) save the file and exit.

6) Now copy in an icon that is either a: .png, .gif, .jpg, or .xpm (correct me if i am wrong here)

7) make sure you have everything and you are ready to go.

8) repack the dsl (watch for stray files. only folders unless the file is needed)

At next boot there should be an icon ready for use on the desktop after enhancing the desktop.


Creating Menu Items in a Submenu

Some people find that their program can do many different things other then just one function. Rather then create multiple entries in the menu you can organize them into a sub menu. to do this just change the syntax of the menu file. Please note the following is a ficticious program.
Code Sample
[submenu] (ScreenBlast) {}
     [exec] (Rockets) {sbrocket}
     [exec] (Magnum) {sbgun}
     [exec] (Shotgun) {"sbgun --shotgun"}
     [exec] (Lazercut) {/usr/share/scrblst/lazer}
  [end]

Hope this will make some packages better. And remember that when all else fails, look at some other package.


--------------
People laugh because I have linux on a cd with me.

I laugh as the pay me for using that disk to recover their precious windows.
Back to top
Profile PM WEB 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: June 24 2004,21:03 QUOTE

Thank you so much for taking the time to do this! :D

Chris
Back to top
Profile PM MSN YIM 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: June 24 2004,23:51 QUOTE

I have a problem that might be very basic. I think I followed the tutorial to the "T". When I try to create the dsl file ig "tar: Cowardly refusing to create an empty archive. I am running the command from the /home/damnsmall/xtet42dsl directory. Is this the wrong place? Thanks

BTW - I am creating a file for xtet42 (tetris) it is very small and doesn't have dependencies. I thought this would be a good program to start with.

Chris
Back to top
Profile PM MSN YIM 
23 replies since June 24 2004,19:24 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (5) </ [1] 2 3 4 5 >/
reply to topic new topic new poll
Quick Reply: Quick And Dirty .dsl Packages

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code