FB 20.0b to ubuntu/debian install script.

Linux specific questions.
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

FB 20.0b to ubuntu/debian install script.

Post by E.K.Virtanen »

Next script should work with Ubuntu 9.04, 9.10 and Debian 5.0.

Installs all necessary libraries and depedencies to use FreeBasic.

Save file ~./installFB.sh
Open terminal
Give executing rights to file by typing chmod +x installFB.sh (You need root priviliges)
Type ./installFB.sh
#!/bin/bash

## FreeBASIC installer script for Debian 5.0 and Ubuntu 9.10. Most likely will work with older Ubuntu/Debian versions too.
## Script made by E.K.Virtanen www.basicprogramming.org 2009.
## Version 3.0 Date 15'th Dec. 2009. Public Domain

## Variables
library=( gcc libc6-dev libncurses5-dev libx11-dev libxext-dev libxpm-dev libxrandr-dev libxrender-dev )
url=http://downloads.sourceforge.net/fbc/Fr ... z?download
filename=FreeBASIC-v0.20.0b-linux-standalone.tar.gz
folder=FreeBASIC

## program itself
clear
echo "This script will install FreeBASIC-v0.20.0b-linux-standalone.tar.gz compiler and following libraries in your system:"
echo
echo ${library[@]:0}

## ok, are you sure
echo -n "Do you want to continue (y/n)";
keypress=$(head -c1)
echo

case $keypress in
y) echo "Checking..."
;;

*) echo "Installation aborted."
exit 0
;;
esac

## let's check (and) install those libraries.
echo "Checking and installing libraries..."
sudo apt-get install ${library[@]=:0}

## download fb .17
echo "FreeBASIC-v0.20.0b-linux-standalone.tar.gz"
wget "$url"

## unpack .tar
echo "unpacking $filename"
tar xvzf "$filename"

## install FB
cd "$folder"
sudo ./install.sh -i

echo "Have fun with your FreeBASIC."
echo

exit 0
Last edited by E.K.Virtanen on Dec 15, 2009 8:59, edited 5 times in total.
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

This isn't a script. This is a source.
</nitpick>
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

I am terrible sorry about my bad language. Ill go and sit on top of three for next 6 weeks with out food, cigarette and beer.
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Post by {Nathan} »

Why not put a compiled file on file-pasta so people can use that to install?
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

Yah, maybe it might be handy for someone. At least easier than goin thru tutorial.
Maybe ill make it bit nicer code later this evening. But then, would be nice to have sources for Kubuntu, Ebuntu and Xubuntu too? At least opening websites for default browser wont work in any other distro except gnome.
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

Why not just provide a patched install script for the specific lunix system?
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

Check the first post. And youre right, FB source for that was silly but it was not even ment to be taken seriously ;)
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

I'm all for a good joke, but the average forum user here doesn't seem to be smart enough to figure out the basics for themselves (ie: RTM, stfw). It's best to avoid anything non-serious and treat the moronic masses like the moronic masses as they are - moronic masses.

To whom everelse is reading this thread; yes, I'm talking about you, moron.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

/me hands eric some Midol.

oh by the way the script is cool, doing all of it in one step is always easier, thank you.
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

Thanks Chaos. Im happy if there is anyone who gets help with that one.
Would there be chance to create page in wiki for these things? I mean they get lost in forum and fact is that phpBB search sucks.

Im positive that users of different distros would keep those pages updated.
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Post by {Nathan} »

Sticky?
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Post by E.K.Virtanen »

But if we would try to collect more these scripts for different distros? Then there would be sticky's more than enough.
Well, im goin offline for few weeks after tomorrow so it's not my problem anyway :D
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Post by {Nathan} »

Basically all FreeBASIC programmers I know of are *buntu users, except for myself, but I still use debian, so the script would still work.

Anyone here use anything non-debian based?
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

tbh, I wanted to sticky your last walkthrough, of putting FB onto ubuntu, step-by-step... i assume someone has tested this? If it's tested from a system (preferably a fresh OS install, live cd?) then I could sticky it as like "linux setup scripts" which i'll just keep locked until we get a new script for another flavor of linux, then i could just add it to the post and lock it back up again, making sure it stays easy to read. of course you (and anyone who contributes any other script) will get credits for the scripts ;)

also, if you'd like to put it on the wiki, looks like the logical place to link from is http://www.freebasic.net/wiki/wikka.php ... Installing

we could create separate wiki pages for each script, and add links there like "for debian, use [[this script|linktothescript]] (or however the wiki syntax is... lol)
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Post by DrV »

I use FB on a non-Debian-based Linux (Arch), but I don't really need an automated installer. ;)
Post Reply