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
 

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

reply to topic new topic new poll
Topic: Install Script for GCombust, Graphical CD Burning SW for DSL 0.5.2< Next Oldest | Next Newest >
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Jan. 01 2004,09:10 QUOTE

After trying out the latest version of Damn Small Linux (0.5.2), I was glad to see that John somehow fit cdrecord and mkisofs into the liveCD. Great Job!

Unfortunately, the only cd burning application that can fit on the current version of DSL is bash burn which is somewhat cumbersome to use and confusing.

However, I was able to find a small size version of GCombust (VectorLinux Package) XWindows CD Burning Interface that could be downloaded and installed via a shell script. The best part is that there are no dependencies and the program only takes up 184k after being uncompressed.

This script also takes advantage of the new /opt directory, which will allow multiple users to use the same program.

Here's how to install GCombust:

Copy the script text below and paste it into a text editor like Scite
Save the script file as  /opt/.start_gcombust
Note the "." period in front of the word start
Make the script executable by typing in the following from an Xterminal (rxvt) Window:

chmod 755 /opt/.start_gcombust

Finally, run the script by typing in:

/opt/.start_gcombust


Here is the scipt text:
Code Sample
#!/bin/sh
#
# /opt/.start_gcombust - Checks to see if GCombust is already installed
#                        and starts it up. Otherwise, install the program.
# Rev 0 1/01/04


# Has this script called itself with the install argument?
while [ "$1" = "install" ]
do
# First, download and unpack the Vector Linux GCombust binaries
cd $HOME
echo 'Grabbing GCombust Binaries...'
wget -c http://www.ibiblio.org/pub/linux/distributions/vectorlinux/veclinux-4.0/packages/gcombust-0.1.55-i386-1.tgz
tar -zxvf gcombust-0.1.55-i386-1.tgz usr/X11R6/bin/gcombust usr/X11R6/share/pixmaps/gcombust.xpm
rm -rf $HOME/gcombust-0.1.55-i386-1.tgz
rm -rf $HOME/install

# Next, install the files and clean up
mkdir /opt/gcombust
cp $HOME/usr/X11R6/bin/gcombust /opt/gcombust
cp $HOME/usr/X11R6/share/pixmaps/gcombust.xpm $HOME/.xtdesktop
rm -rf $HOME/usr


# Create Desktop Icon for GCombust
echo 'table Icon' > $HOME/.xtdesktop/gcombust.lnk
echo '  Type: Program' >> $HOME/.xtdesktop/gcombust.lnk
echo '  Caption: GCombust' >> $HOME/.xtdesktop/gcombust.lnk
echo '  Command: sh /opt/.start_gcombust' >> $HOME/.xtdesktop/gcombust.lnk
echo '  Icon: .xtdesktop/gcombust.xpm' >> $HOME/.xtdesktop/gcombust.lnk
echo '  X: 385' >> $HOME/.xtdesktop/gcombust.lnk
echo '  Y: 98' >> $HOME/.xtdesktop/gcombust.lnk
echo 'end' >> $HOME/.xtdesktop/gcombust.lnk

exit
done


# Check to see if gcombust is already installed
if  test -f '/opt/gcombust/gcombust'
then
    /opt/gcombust/gcombust &
    exit
fi

# Otherwise, run this script again in an rxvt window with the
# install argument added
cd $HOME
rxvt -rv -T "installing GCombust..." -e sh /opt/.start_gcombust install
# Restart the xtdesktop icons if needed
ps -ef | grep xtdesk | grep -v grep | grep -v re_xtdesk > /tmp/startgcombust.tmp
if  test -s '/tmp/startgcombust.tmp'
then
killall -9 xtdesk >/dev/null
xtdesk >/dev/null &
fi
rm -rf /tmp/startgcombust.tmp

# Start gcombust for the first time
/opt/gcombust/gcombust
exit
Back to top
Profile PM 
John Offline





Group: Super Administrators
Posts: 697
Joined: Sep. 2003
Posted: Jan. 01 2004,10:18 QUOTE

Hey this is nice!  You know 184k isn't really all that big... :)
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Jan. 03 2004,07:33 QUOTE

Actually, including the Desktop Icon file the total is 199k.

If you could find a way to fit this program into the next version of DSL, that would be cool.

If you want to capture GCombust, just execute the script and then include the following files into the DSL image:

/opt/gcombust/gcombust  (It really belongs in /usr/X11R6/bin)
/home/damnsmall/.xtdesktop/gcombust.xpm

along with the typical Desktop Icon lnk file and Fluxbox menu item additions, of course.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Jan. 04 2004,09:56 QUOTE

Well,

I just couldn't leave well enough alone...

Here is a new version of the GCombust install script.
I made a few changes:
GCombust AND Cdparanoia are BOTH installed (cdparanoia total size: 151K)
This allows the DSL user to also use gcombust as an audio CD ripper.
Created a new /opt directory structure:
/opt/bin             for binaries
/opt/lib              for libraries
/opt/share         for shared files
This is important to allow for future new program installs to the /opt directory especially when the applications interact with each other and you only want to add one new item to your PATH (IE: /opt/bin or /opt/lib)
Also, cleaned up the desktop icon creation routine so that user #2 will get a new desktop icon after running GCombust for the first time, even if the program was originally installed by user #1.

Here it is:
Code Sample
#!/bin/sh
#
# /opt/.start_gcombust - Checks to see if GCombust is already installed
#                        and starts it up. Otherwise, install the program
#                        and install cdparanoia CD Audio ripping program.
# Rev 1 1/04/04


# Has this script called itself with the install argument?
while [ "$1" = "install" ]
do
# First, download and unpack the Vector Linux GCombust binaries
cd $HOME
echo 'Grabbing GCombust Binaries...'
wget -c http://www.ibiblio.org/pub/linux/distributions/vectorlinux/veclinux-4.0/packages/gcombust-0.1.55-i386-1.tgz
tar -zxvf gcombust-0.1.55-i386-1.tgz usr/X11R6/bin/gcombust usr/X11R6/share/pixmaps/gcombust.xpm
rm -rf $HOME/gcombust-0.1.55-i386-1.tgz

# Create the /opt directories if they don't already exist
if [ ! -f /opt/bin ]
then
    mkdir /opt/bin
fi

if [ ! -f /opt/lib ]
then
    mkdir /opt/lib
fi

if [ ! -f /opt/share/pixmaps ]
then
    mkdir -p /opt/share/pixmaps
fi

# Install the GCombust files
cp $HOME/usr/X11R6/bin/gcombust /opt/bin
cp $HOME/usr/X11R6/share/pixmaps/gcombust.xpm /opt/share/pixmaps

# Download and install Slackware 9.1 cdparanoia binaries and libraries
wget -c http://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware-9.1/slackware/ap/cdparanoia-IIIalpha9.8-i386-1.tgz
tar -zxvf cdparanoia-IIIalpha9.8-i386-1.tgz install usr/bin usr/lib/*so*
rm -rf cdparanoia-IIIalpha9.8-i386-1.tgz
sh $HOME/install/doinst.sh
cp $HOME/usr/bin/cdparanoia /opt/bin
cp -r --reply=yes $HOME/usr/lib/* /opt/lib

# Clean up the leftover junk
rm -rf $HOME/install $HOME/usr

# Start gcombust for the first time
export PATH=/opt/bin:$PATH
export LD_LIBRARY_PATH=/opt/lib
/opt/bin/gcombust
exit
done


# Add the /opt/bin and /opt/lib locations to the appropriate PATHs
export PATH=/opt/bin:$PATH
export LD_LIBRARY_PATH=/opt/lib

# Check to see if gcombust is already installed
if  test -f '/opt/bin/gcombust'
then
    /opt/bin/gcombust
else
# Otherwise, run this script again in an rxvt window with the
# install argument added
    cd $HOME
    rxvt -rv -T "installing GCombust..." -e sh /opt/.start_gcombust install
fi

# Create Desktop Icon for Gcombust if needed
if  test -f '/opt/bin/gcombust'
then
if  [ ! -f '$HOME/.xtdesktop/gcombust.lnk' ]
then
    cp /opt/share/pixmaps/gcombust.xpm $HOME/.xtdesktop
    echo 'table Icon' > $HOME/.xtdesktop/gcombust.lnk
    echo '  Type: Program' >> $HOME/.xtdesktop/gcombust.lnk
    echo '  Caption: GCombust' >> $HOME/.xtdesktop/gcombust.lnk
    echo '  Command: sh /opt/.start_gcombust' >> $HOME/.xtdesktop/gcombust.lnk
    echo '  Icon: .xtdesktop/gcombust.xpm' >> $HOME/.xtdesktop/gcombust.lnk
    echo '  X: 385' >> $HOME/.xtdesktop/gcombust.lnk
    echo '  Y: 98' >> $HOME/.xtdesktop/gcombust.lnk
    echo 'end' >> $HOME/.xtdesktop/gcombust.lnk

# Restart the xtdesktop icons if needed
    ps -ef | grep xtdesk | grep -v grep | grep -v re_xtdesk > /tmp/startgcombust.tmp
    if  test -s '/tmp/startgcombust.tmp'
    then
         killall -9 xtdesk >/dev/null
         xtdesk >/dev/null &
    fi
    rm -rf /tmp/startgcombust.tmp
fi
fi
exit
Back to top
Profile PM 
3 replies since Jan. 01 2004,09:10 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: Install Script for GCombust

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