Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This script automates the setup of Ubuntu for Delphi 11.2 Alexandria

Settings up Ubuntu 20.04 for Delphi 11.2 Alexandria

The below Bash script works with Ubuntu 20.04 LTS, on WSL2, VM, or hardware install.

Installing WSL2 on Windows 11

Microsoft has a full article with all the details. This is a summary for quick reference.

On Windows you need to do this from an elevated (administrator) command prompt or powersehll window. Easiest way is Win+X,A.

wsl --install -d Ubuntu

Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.

Start Ubuntu from the start menu, or from the terminal by typing ubuntu

#!/bin/bash
#
# Download and execute with the following:
# curl -L https://embt.co/SetupUbuntu4Delphi22 | bash
#
echo "Updating the local package directory"
sudo apt update
echo "Upgrading any outdated pacakges"
sudo apt full-upgrade -y
echo "Install new packages necessary for Delphi & FMXLinux"
sudo apt install joe wget p7zip-full curl libgtk-3-dev openssh-server build-essential zlib1g-dev libgtk-3-dev libcurl4-gnutls-dev libncurses5 xorg libgl1-mesa-dev libosmesa-dev libgtk-3-bin -y
echo "Clean-up unused packages"
sudo apt autoremove -y
cd ~
echo "Downloading Linux PAServer for Alexandria 11.2 (22.0)"
wget https://altd.embarcadero.com/releases/studio/22.0/112/LinuxPAServer22.0.tar.gz
echo "Setting up directories to extract PA Server into"
mkdir PAServer
mkdir PAServer/22.0
rm PAServer/22.0/*
tar xvf LinuxPAServer22.0.tar.gz -C PAServer/22.0 --strip-components=1
rm LinuxPAServer22.0.tar.gz
echo \#\!\/bin\/bash >pa22.sh
echo ~/PAServer/22.0/paserver >>pa22.sh
chmod +x pa22.sh
echo "-----------------------------------"
echo " To launch PAServer type ~/pa22.sh"
echo "-----------------------------------"
# ~/pa22.sh
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment