The Steps:
a) find the version we are running on (distribution, architecture (32 or 64bit)
b) display the information we found and let the user confirm it (this is especially important for the inevitable bugfixing in cases we completely fail for some reason)
c) do distribution dependant additional package installations (apt-get, yum), better ask the user for confirmation as it MIGHT result in a lot data being downloaded. This can result in costs or problems for other software or people who use the connection too. In a family/community, one person could make the network unusable for others for quite a while. Don't simply assume that software exists - VERIFY it and trow errors or make fixing suggestions if it doesn exist or can't be located (no commandline apt-get or yum for example)
The first step is to create a linux binary which detects the version and shows all informations it can get. Let the user decide how detailed the information should be that they want to see. For experts a super detailed technical documentation helps to find problems, for beginners it just confuses them or makes them blindly ignore things and confirm stuff they dont understand "anyway", this could later lead to unwanted problems. As a neat side-effect this tool could prove a generally useful linux tool for others too. It could even lead to increase purebasic popularity as people might think "hey thats nice, how was it done? could i do that too?". Due to the nature of linux and this project, the linux binary MUST be a textmode tool. We can prettify the thing by adding a desktop UI on top. Maybe both in one "hybrid" binary which could be neat (its possible for windows, so maybe also for linux).
At the end of the installation, a few tips which depend on the distribution could be created in the installed binary folder. Including a linux link list for purebasic resources on the web because they exist but are widely hidden all over the internet.
CentOS
find the version : ls /etc/*release*
should show : /etc/os-release
the files content for version 7:
Code: Select all
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Kubuntu
uname -a
Code: Select all
Linux jc-VirtualBox 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Code: Select all
NAME="Ubuntu"
VERSION="18.10 (Cosmic Cuttlefish)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.10"
VERSION_ID="18.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=cosmic
UBUNTU_CODENAME=cosmic