Updated: 01-21-2010
Added even more options to our script. User now has the choice of downloading and installing Firefox, Opera 10 & 9, Google Chrome, OpenOffice 3.2 & 3.1, Thunderbird. Firefox is still set at 63 language packs. Here is a preview of the code, this code has not yet been released however.

############################################################
############################################################
## Drone's Installer: (c) Ronald Lee Harsh 2010, NM -USA ##
## This script and all of it's contents herein are the ##
## sole property of Ronald Lee Harsh and their affiliates ##
## and may not be reproduced, modified or distributed un- ##
## less these headers remain in-tact. Ronald Lee Harsh ##
## distributes this program 'as-is' and does not accept ##
## any liabilities for damages, errors or system damages ##
## that may occur as a result of running this program. ##
## By running this script you accept the fact that it co- ##
## mes with no warranty, and misuse may result in damages ##
## of your computing system (i.e. hardware, software, in- ##
## ternal and external components, file damages) in part ##
## or in whole. If you have any questions concerning th- ##
## is waiver of liability please halt, e-mail Ronald Lee- ##
## Harsh at: pupbuntu@hotmail.com, and do not run this ##
## script until official contact has been made in regards ##
## to any reservations that you may have. [END] ##
############################################################
## Drone's Automatic Installer ##
############################################################
############################################################
## ##
## The following reflects the hierarchy of the program t- ##
## his is an expanding numerical flow chart. ##
## ##
############################################################
############################################################
Program Structure:

edits an automatically generated file (.jwmrc) which represents the current menu setup and has no permanent effect. The menu system can best be generated by creating or linking a "firefox.desktop" file in "/usr/share/applications".

When the window manager starts, it picks up the menu items for programs from the xxx.desktop files.

edits an automatically generated file (.jwmrc) which represents the current menu setup and has no permanent effect. The menu system can best be generated by creating or linking a "firefox.desktop" file in "/usr/share/applications".

When the window manager starts, it picks up the menu items for programs from the xxx.desktop files.

cheers,
s

Great ideal about the firefox.desktop file, Ill get that in there. Yes I read the shrinking ideal & honestly the final version is going to be heavily reduced. However, several people wanted an automated install quickly (so that's what I gave them.) As you can tell, I only put about 2 hours worth of work into that script - I'm sure when I go back to edit the script I will heavily reduce it as well.

Here is food for thought, I am currently thinking about abandoning that script. As I am a C++ programmer, I can write a better program that will allow the user to more easily install. And as in my opinion C++ is far superior than terminal scripting, it will allow for far more advanced features. I have currently started a project w/several of my students @ SJJC that will allow Linux (puppy) users to install a broad-range of Linux apps (about 120) and have the apps support automatic-updating. But this program is still heavily in the alpha stages.

Your tip is very useful though, I find that your ideal is truly a unique ideal and we all thank you very much for giving us such a great ideal - and you can be assured that you see it implemented on the next release.

edits an automatically generated file (.jwmrc) which represents the current menu setup and has no permanent effect. The menu system can best be generated by creating or linking a "firefox.desktop" file in "/usr/share/applications".

When the window manager starts, it picks up the menu items for programs from the xxx.desktop files.

cheers,
s

We took your advice sir. We added a .desktop file that is now put into the /usr/share/applications folder as well. We added better icon support and multiple language as well. Check out our new program at: http://murga-linux.com/puppy/viewtopic.php?t=51500 and let us know what you think. Once again, thank you for your suggestions seaside._________________// A word from our sponsors..
#include <iostream>
using namespace std;
main()
{
cout << "Linux Rocks! \n";
return 0;
}

We took your advice sir. We added a .desktop file that is now put into the /usr/share/applications folder as well. We added better icon support and multiple language as well. Check out our new program at: http://murga-linux.com/puppy/viewtopic.php?t=51500 and let us know what you think. Once again, thank you for your suggestions seaside.

Drone-87401,

Hey 10/4 (this is like the CB radio days)

A small item here-

"Firefox_3.5.7" "Thunderbird Email Suite"

I haven't tried to run the program yet, but as posted here,
If you ran this code, you probably noticed that the "firefox.desktop" file was not created.

In several places you'll find this -
$gname.desktop

Should you let your class find the answer as to what is wrong with this expression? or simply point out that there is no declared variable called "gname.desktop". In order for "xxx.desktop" to appear with the "xxx" part as a variable, it must be expanded with quotes like this "$gname".desktop.

We took your advice sir. We added a .desktop file that is now put into the /usr/share/applications folder as well. We added better icon support and multiple language as well. Check out our new program at: http://murga-linux.com/puppy/viewtopic.php?t=51500 and let us know what you think. Once again, thank you for your suggestions seaside.

Drone-87401,

Hey 10/4 (this is like the CB radio days)

A small item here-

"Firefox_3.5.7" "Thunderbird Email Suite"

I haven't tried to run the program yet, but as posted here,
If you ran this code, you probably noticed that the "firefox.desktop" file was not created.

In several places you'll find this -
$gname.desktop

Should you let your class find the answer as to what is wrong with this expression? or simply point out that there is no declared variable called "gname.desktop". In order for "xxx.desktop" to appear with the "xxx" part as a variable, it must be expanded with quotes like this "$gname".desktop.

Cheers,
s

Actually $gname is the name of the downloaded package as in the case with Firefox it is firefox.3.5.7.desktop and yes that file does show up where it is supposed to "$gname <- that is the expression we are looking at. .desktop is not being declared as a var so it will be added to the tail of $gname so firefox.3.5.7 becomes firefox.3.5.7.desktop. We had extensive runs of this script, and I can confirm that there are zero bugs within the script. It may look weird, but run it. Once you do, you'll notice it works.

As to variable use, look what happens when typing the following in a terminal.

Code:

# gname="firefox"
# echo $gnameANYOTHERTEXT

# echo $gnameANYOTHERTEXT-9999
-9999
#

Nothing or unintended items are returned when additional text or numbers are appended to a variable.

"$gname.desktop" works in this particular case because the .(dot) and certain other symbols, act as a separator for the variable. This will not always be so and not quoting the variables in many cases may lead to unexpected results.

I really liked all the vocalization of the installation - it gives a great feeling of efficient activity going on...

As to variable use, look what happens when typing the following in a terminal.

Code:

# gname="firefox"
# echo $gnameANYOTHERTEXT

# echo $gnameANYOTHERTEXT-9999
-9999
#

Nothing or unintended items are returned when additional text or numbers are appended to a variable.

"$gname.desktop" works in this particular case because the .(dot) and certain other symbols, act as a separator for the variable. This will not always be so and not quoting the variables in many cases may lead to unexpected results.

I really liked all the vocalization of the installation - it gives a great feeling of efficient activity going on...

Cheers,
s

Well sir, I guess we owe you a lot of thanks for your wonderful ideal about the .desktop file (that was really thinkin' on your behalf.) All programs must get their start from somewhere and we are glad that we have informed people such as yourself that are helping us out in our continuing quest to deliver the best product. We are really aimed at helping new linux users out, and a little automation can go a really long way. We are currently working on exporting this program to a GTK format (though I'm not yet sure how that's going.) Thank you for your kind words once more.

Here is food for thought, I am currently thinking about abandoning that script. As I am a C++ programmer, I can write a better program that will allow the user to more easily install. And as in my opinion C++ is far superior than terminal scripting, it will allow for far more advanced features. I have currently started a project w/several of my students @ SJJC that will allow Linux (puppy) users to install a broad-range of Linux apps (about 120) and have the apps support automatic-updating. But this program is still heavily in the alpha stages.

Are you thinking this way because C++ is your preferred language and you're simply more comfortable working in it?

I'd think twice about it. Shell scripts are intended for cases like the one you are dealing with. They can be written quickly, modified easily, and are efficient enough to handle this sort of task. There's nothing about a Mozilla apps install routine that really needs to be in machine code. (The Linux install routines with Mozilla Linux ports are shell scripts.)

And a shell script is easily modifiable/extensible. Mozilla apps are constantly evolving with frequent new alpha/beta/production releases. Far easier, I should think, to keep a shell script updated, than have to change the C++ code, compile, debug, and issue a fresh build. More folks here can program in the shell than in C++, so you are more likely to get contributed code.
______
Dennis

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum