Skip to content

Brainy0789/BScript

Repository files navigation

GitHub repo size

BScript

BScript is a simple, lightweight 8-bit coding language.

Read the documentation here.

Installation

First of all, install the latest version of Python.

Secondly, download the source code from here.

Now, finally, run the setup.py file inside of Python. It will ask for things and then you can use the bsc command to compile BScript files! Neat!

Or, just download the GUI app if you prefer. It's completely self-contained and required no dependencies.

Requirements

SDL2

To compile programs that use the window; command in BScript, you need SDL2 installed.

Windows

Using MSYS2:

pacman -S mingw-w64-x86_64-SDL2

Make sure you're using the MSYS2 MinGW 64-bit terminal, and that C:\msys64\mingw64\bin is in your PATH.

macOS

Install Homebrew if you haven't already:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install SDL2 via Homebrew:

brew install sdl2
Linux (Debian/Ubuntu)
sudo apt update
sudo apt install libsdl2-dev
Linux (Fedora/RHEL)
sudo dnf install SDL2-devel

GCC Compiler

BScript uses GCC (or compatible C compiler) to compile transpiled code. Please ensure it's installed on your system.

macOS
  • Install Xcode Command Line Tools:
xcode-select --install
  • This will give you gcc (which points to Clang, and works fine for most C programs).
Linux (Debian/Ubuntu/Fedora/Arch)
  • On Debian/Ubuntu:
sudo apt update
sudo apt install build-essential
  • On Fedora:
sudo dnf groupinstall "Development Tools"
  • On Arch Linux:
sudo pacman -S base-devel
Windows

Option 1: MSYS2 (Recommended)

  1. Download and install: https://www.msys2.org
  2. Open the MSYS2 MinGW 64-bit terminal.
  3. Run:
pacman -S mingw-w64-x86_64-gcc

Make sure to add C:\msys64\mingw64\bin to your system PATH.

Option 2: MinGW (Standalone)

  1. Download from: https://osdn.net/projects/mingw/releases/
  2. Select the mingw32-gcc-g++ package in the installer.
  3. Add C:\MinGW\bin to your PATH environment variable.