This directory contains the files needed to build Soplang for Linux, including the executable and installer packages.
Before building Soplang for Linux, you need:
-
Python 3.6 or higher - Install from your distribution's package manager:
# Debian/Ubuntu sudo apt install python3 python3-pip python3-venv # Fedora/RHEL sudo dnf install python3 python3-pip -
ImageMagick (for icon conversion) - Install from your distribution's package manager:
# Debian/Ubuntu sudo apt install imagemagick # Fedora/RHEL sudo dnf install imagemagick -
Packaging Tools (optional, for creating .deb/.rpm packages):
# Debian/Ubuntu sudo apt install dpkg-dev # Fedora/RHEL sudo dnf install rpm-build
Building Soplang on Linux is simple:
-
Navigate to the Soplang linux directory:
cd soplang/linux -
Make the build script executable (if needed):
chmod +x build_linux.sh
-
Run the build script:
./build_linux.sh
The script will guide you through the build process and create:
- A standalone executable
- A .deb package (on Debian-based systems)
- An .rpm package (on Red Hat-based systems, if RPM tools are installed)
After the build process completes successfully, you will find:
- Standalone executable:
dist/soplang/soplang - Debian package (on Debian-based systems):
linux/soplang_<version>_amd64.deb - RPM package (on Red Hat-based systems):
linux/soplang-<version>.x86_64.rpm
If you want to use a custom icon for Soplang on Linux:
-
Make the icon preparation script executable:
chmod +x prepare_logos.sh
-
Run the icon preparation script:
./prepare_logos.sh
-
Follow the prompts to select or provide a path to your logo image
- The script will create icons in various sizes required for Linux
- These icons will be used in the application launcher and file associations
If you built a .deb package:
sudo dpkg -i linux/soplang_<version>_amd64.debIf there are dependency issues:
sudo apt install -fIf you built an .rpm package:
sudo rpm -i linux/soplang-<version>.x86_64.rpmYou can also manually install the standalone executable:
-
Copy the entire
dist/soplangdirectory to/opt/soplang:sudo mkdir -p /opt/soplang sudo cp -r dist/soplang/* /opt/soplang/ -
Create a symbolic link to make Soplang available in PATH:
sudo ln -s /opt/soplang/soplang /usr/local/bin/soplang
-
Create desktop entry for application menus:
echo "[Desktop Entry] Name=Soplang Interpreter Comment=The Somali Programming Language Exec=/usr/local/bin/soplang %f Icon=/opt/soplang/soplang_icon.png Terminal=true Type=Application Categories=Development;Education; MimeType=text/x-soplang; Keywords=soplang;programming;development;somali;" | sudo tee /usr/share/applications/soplang.desktop
-
Set up file associations:
echo "text/x-soplang=soplang.desktop" | sudo tee -a /usr/share/applications/defaults.list
After installing Soplang, you can:
- Run Soplang from the application menu
- Open a terminal and type
soplangto start the interpreter - Double-click
.sopor.sofiles to run them with Soplang
- Missing Python: Ensure Python 3.6+ is installed with
python3 --version - Missing dependencies: Run
pip3 install -r requirements.txt - Permission issues: Make sure scripts are executable with
chmod +x *.sh - Package conflicts: On Debian/Ubuntu, try
sudo apt --fix-broken install