Best Distro for FB

Linux specific questions.
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Apr 21, 2018 21:10

The installation script has grown further. Now it checks if the distro is 32 or 64 bits. Tested on Mint 18 64 bit and Ubuntu 14 64 bit.

Code: Select all

#!/bin/sh
# install_freebasic.sh
# installing FreeBASIC on Mint and other Ubuntu and derivates

# install wget if not already done
sudo apt-get install wget

# test if 64 bit linux
bits=$(uname -m)

# download right freebasic version, unpack and install
if [ "$bits" = "x86_64" ]
then
  echo "64 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/674/FreeBASIC-1.05.0-linux-x86_64.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86_64.tar.gz
  cd FreeBASIC-1.05.0-linux-x86_64
  sudo ./install.sh -i
  cd ..
else
  echo "32 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/673/FreeBASIC-1.05.0-linux-x86.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86.tar.gz
  cd FreeBASIC-1.05.0-linux-x86
  sudo ./install.sh -i
  cd ..
fi

# update system
sudo apt-get update

# install dependencies
sudo apt-get install gcc libncurses5-dev libffi-dev libgl1-mesa-dev
sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev

# install geany and kchmviewer for use with geany
sudo apt-get install geany kchmviewer

# prepare geany for kontextsensitive help
# Go to Edit, Preferences, Tools, Context Action. Set it to "kchmviewer --sindex %s /<chm-path>"
# Go to Edit, Preferences, Keybindings, edit section, "Context Action", press "Change button", press F1 key.

# todo: install with other distros and package systems


On Mint 18.3 xfce 64 bit Geany is ready then to compile FB .bas files in 4 minutes.
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Apr 22, 2018 23:00

Now i have done all the way there is only one last step. Finding out the distro and installing the right packages for it.

Code: Select all

#!/bin/sh
# install_freebasic.sh
# installing FreeBASIC 1.05 on Mint, other Ubuntu and derivates
# hopefully one day on all distros

# not sure if this works with others then mint and ubuntu
# get distro name and version
if [ -f /etc/os-release ]; then
    # freedesktop.org and systemd
    . /etc/os-release
    OS=$NAME
    VER=$VERSION_ID
elif type lsb_release >/dev/null 2>&1; then
    # linuxbase.org
    OS=$(lsb_release -si)
    VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
    # For some versions of Debian/Ubuntu without lsb_release command
    . /etc/lsb-release
    OS=$DISTRIB_ID
    VER=$DISTRIB_RELEASE
elif [ -f /etc/debian_version ]; then
    # Older Debian/Ubuntu/etc.
    OS=Debian
    VER=$(cat /etc/debian_version)
elif [ -f /etc/SuSe-release ]; then
    # Older SuSE/etc.
    ...
elif [ -f /etc/redhat-release ]; then
    # Older Red Hat, CentOS, etc.
    ...
else
    # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
    OS=$(uname -s)
    VER=$(uname -r)
fi

# test if 64 bit linux
BITS=$(uname -m)

echo
echo "Installing FreeBASIC 1.05 on $OS $VER $BITS"
echo

# install right packages for distro
# Ubuntu is for demo purposes, normally it is same like mint
# here only insert another elif with installing packages for other distros
if [ "$OS" = "Linux Mint" ] ; then
  # echo "Mint"
  sudo apt-get update
  # install dependencies, Geany and Kchmviewer
  sudo apt-get install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev
  sudo apt-get install libxrender-dev libxrandr-dev libxpm-dev wget geany kchmviewer
elif [ "$OS" = "Ubuntu" ] ; then
  # echo "Ubuntu"
  sudo apt-get update
  # install dependencies, Geany and Kchmviewer
  sudo apt-get install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev
  sudo apt-get install libxrender-dev libxrandr-dev libxpm-dev wget geany kchmviewer
else
  echo "other distro"
fi

# download right freebasic version, unpack and install
if [ "$BITS" = "x86_64" ]
then
  echo "64 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/674/FreeBASIC-1.05.0-linux-x86_64.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86_64.tar.gz
  cd FreeBASIC-1.05.0-linux-x86_64
  sudo ./install.sh -i
  cd ..
else
  echo "32 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/673/FreeBASIC-1.05.0-linux-x86.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86.tar.gz
  cd FreeBASIC-1.05.0-linux-x86
  sudo ./install.sh -i
  cd ..
fi

echo
echo "End of installation."
echo

# prepare geany for contextsensitive help
# Go to Edit, Preferences, Tools, Context Action. Set it to "kchmviewer --stoc %s <chm-path>"
# Go to Edit, Preferences, Keybindings, edit section, "Context Action", press "Change button", press F1 key.

# todo: install with other distros and package systems


Edit: little changes
Last edited by lizard on May 05, 2018 16:42, edited 1 time in total.
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Apr 29, 2018 22:50

Made few little changes on above script. Apt-get install wget naturally must be inside distro block. Then installing FB itself comes as last step. The parameter --stoc for kchmviewer is better, jumps directly to the topic.

Then tested on Mint 18.2 Cinnamon 32 bit. Works now in 32 bit and 64 bit, Mint xcfe, cinnamon and Ubuntu.
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » May 21, 2018 15:00

Became a distro junkie lately. Tested few more, some failed to install on my box, although it is not too bad, dual core 3 GHz, 4 GB ram. Manjaro became #1 at distrowatch.com, but i wouldn`t recommend it, Mint is better.

Code: Select all

#!/bin/sh
# install_freebasic.sh
# installing FreeBASIC 1.05 on Mint, other Ubuntu and derivates
# hopefully one day on all distros

# not sure if this works with others then mint and ubuntu
# get distro name and version
if [ -f /etc/os-release ]; then
    # freedesktop.org and systemd
    . /etc/os-release
    OS=$NAME
    VER=$VERSION_ID
elif type lsb_release >/dev/null 2>&1; then
    # linuxbase.org
    OS=$(lsb_release -si)
    VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
    # For some versions of Debian/Ubuntu without lsb_release command
    . /etc/lsb-release
    OS=$DISTRIB_ID
    VER=$DISTRIB_RELEASE
elif [ -f /etc/debian_version ]; then
    # Older Debian/Ubuntu/etc.
    OS=Debian
    VER=$(cat /etc/debian_version)
elif [ -f /etc/SuSe-release ]; then
    # Older SuSE/etc.
    ...
elif [ -f /etc/redhat-release ]; then
    # Older Red Hat, CentOS, etc.
    ...
else
    # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
    OS=$(uname -s)
    VER=$(uname -r)
fi

# test if 64 bit linux
BITS=$(uname -m)

echo
echo "Installing FreeBASIC 1.05 on $OS $VER $BITS"
echo

# install right packages for distro
# Ubuntu is for demo purposes, normally it is same like mint
# here only insert another elif with installing packages for other distros
if [ "$OS" = "Linux Mint" ] ; then
  # echo "Mint"
  sudo apt-get update
  # install dependencies, Geany and Kchmviewer
  sudo apt-get install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev
  sudo apt-get install libxrender-dev libxrandr-dev libxpm-dev wget geany kchmviewer
elif [ "$OS" = "Ubuntu" ] ; then
  # echo "Ubuntu"
  sudo apt-get update
  # install dependencies, Geany and Kchmviewer
  sudo apt-get install gcc libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev
  sudo apt-get install libxrender-de libxrandr-dev libxpm-dev wget geany kchmviewer
elif [ "$OS" = "Manjaro Linux" ] ; then
   # echo "Manjaro Linux"
   # install dependencies, Geany and Kchmviewer
   sudo pacman -Syu gcc ncurses libffi glu mesa libx11 libxext
   sudo pacman -Syu libxrender libxrandr libxpm wget geany kchmviewer
   # workaround for a bug
   sudo ln -s /usr/lib/libncursesw.so.6.1 /usr/lib/libtinfo.so.5
   # geany must be configured manually for terminal and include, not like mint
elif [ "$OS" = "TinyCore" ] ; then
  # echo "Tiny Core"
  # Packages needed to compile with fbc and to compile fbc and its libraries
  tce-load -wi ncurses5 binutils gcc glibc_base-dev glib2 make linux-4.14.3_api_headers
  tce-load -wi ncurses-dev gpm-dev libX11-dev libffi-dev libGL-dev libXpm-dev libXext-dev libXrandr-dev
  # git, for downloading new source code, geany and Command-line niceties
  tce-load -wi git geany bash nano screen
  # has no kchmviewer package
else
  echo "other distro"
fi

# download right freebasic version, unpack and install
if [ "$BITS" = "x86_64" ]
then
  echo "64 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/674/FreeBASIC-1.05.0-linux-x86_64.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86_64.tar.gz
  cd FreeBASIC-1.05.0-linux-x86_64
  sudo ./install.sh -i
  cd ..
else
  echo "32 bit linux"
  wget https://www.freebasic-portal.de/dlfiles/673/FreeBASIC-1.05.0-linux-x86.tar.gz
  tar -xvzf FreeBASIC-1.05.0-linux-x86.tar.gz
  cd FreeBASIC-1.05.0-linux-x86
  sudo ./install.sh -i
  cd ..
fi

echo
echo "End of installation."
echo

# prepare geany for kontextsensitive help
# Go to Edit, Preferences, Tools, Context Action. Set it to "kchmviewer --stoc %s <chm-path>"
# Go to Edit, Preferences, Keybindings, edit section, "Context Action", press "Change button", press F1 key.

# todo: install with other distros and package systems


Tiny Core works good here, 32 and 64 bit. Counting_pine has given package commands here. Thanks!

viewtopic.php?f=5&t=26691&p=247602&sid=9c2282cd67575697f59650722200e025#p247602
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Jun 10, 2018 17:56

Tested so far:

Mint Xfce : the most userfriendly distro i have ever seen. Everything works out of the box, from the live-dvd and the installation to today. Technically fast and advanced, graphically perfect surface to the last detail. Installation of further programs from the huge repository works always perfectly. Could not be better.

Mint Cinnamon: almost the same, slightly slower.

Mint KDE and Kubuntu: slow and akward. They use kubuntu repository wich frequently changes name but each time with fewer programs. Surface dont look very good. Seems KDE dies.

Manjaro: Fast. Thats all. Technically lot of problems, design terrible. Frequentlty disconnected me from Internet. No thanks.

Fedora: What $%#@ became the former red hat. They have much own solutions, but dont work well. Refused even to install on my box.

Tiny Core: Very small, but one has to care for much himself. Cant compare this with a normal distro.

Slackware: Once it was a nice distro. But now it is outdated. Uses not even Grub2 as bootmanager, but the old lilo. And whats the advantage of Slack? From LiveCD cant be installed, from installation disc cant be booted. Pure nonsens. When i managed to get a mate-desktop running i could not shut down. And a terminal can be started with each distro...

.
speedfixer
Posts: 287
Joined: Nov 28, 2012 1:27
Location: California

Re: Best Distro for FB

Postby speedfixer » Jun 10, 2018 18:55

Hi, lizard

I read with interest your testing of Linux versions. Good info.

My preference has been Lubuntu, but I admit I have not taken the trouble and work you have to test others.

It is a somewhat minimal Ubuntu variety, so some extra work may be needed by the user. At least it uses the Ubuntu repsositories.
It is supposed to be lighter weight and be more accesible to older hardware.

Have you tried/tested it?
I would be interested in your opinion.

david
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Jun 10, 2018 19:20

Lubuntu is not bad. But i have tested not much. And i have an old Ubuntu with Unity. They are working, so it is no bad choice.

I must confess, i have stopped testing at this point. Because Grub2 can boot from .iso directly, it would be possible to have dozens of distros on hd. But i have other projects, too, and for myself i found the best distro.
IchMagBier
Posts: 32
Joined: Jan 13, 2018 8:47

Re: Best Distro for FB

Postby IchMagBier » Jun 20, 2018 9:16

The biggest problem with Linux and FB is "libtinfo". I am using Debian for coding and when I want to run my programs on Fedora, CentOS or Ubuntu, it complains about libtinfo being not the version it needs (on some systems, especially newer ones, libtinfo isn't even installed by default). Same goes for compiling on Fedora and trying to run it on Debian. The question is, if libtinfo is actually needed, since it just holds some constants, which are in libncurses anyways (which is linked to every FB-binary aswell).
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Jun 20, 2018 9:21

Had this problem in Manjaro, too. Thats why i have

Code: Select all

 sudo ln -s /usr/lib/libncursesw.so.6.1 /usr/lib/libtinfo.so.5


in above script. It is for a problem in Geany, as far i remember, but it will also appear in others.

In Mint Xfce and Cinnamon it is not.
sean_vn
Posts: 270
Joined: Aug 06, 2012 8:26

Re: Best Distro for FB

Postby sean_vn » Jun 21, 2018 2:35

What you do is create a symbolic link named libtinfo.so.5 to the ncurses library. For whatever reason that often fixes the problem. My bigger issue is the FB graphics library doesn't work with my current version of Linux, XenialPup. I can use the fltk library available on the forum but it is a bit OTT for what I need. At the moment I am using java and javafx which like the curate's egg is good in places.
Generally I prefer lower level programming though.
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Best Distro for FB

Postby lizard » Jun 21, 2018 3:40

Consider switching to Mint Xfce. :-)

Mint dont need much more:

1 GB RAM
15 GB - 20 GB HD
screen with 1024 x 786 pixel

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest