Table of Contents
- Project dependencies
- Build for Linux and Windows
- Build for macOS
- Use Visual Studio Code for development and debugging
- Take screenshots for the website
- Update third party dependencies
graph TD;
tmbasic-->compiler;
test-->compiler;
test-->vm;
runner-->vm;
compiler-->shared;
vm-->shared;
Linux and Windows builds must be produced on a Linux build machine. Ubuntu Linux is recommended.
-
Install git and Docker. Give your user account permission to run
docker
.sudo apt-get update -y && \ sudo apt-get upgrade -y && \ sudo apt-get install -y git && \ sudo curl -fsSL https://get.docker.com -o get-docker.sh && \ sudo sh get-docker.sh && \ sudo usermod -aG docker $(whoami) && \ sudo reboot
-
Clone the git repository.
git clone https://github.com/tmbasic-lang/tmbasic.git cd tmbasic
-
Start the build environment and compile TMBASIC.
cd build ./dev.sh make
This will create a development build for Linux suitable for debugging. This build of TMBASIC will be unable to produce executables for other platforms because it does not contain the necessary builds of the interpreter.
Use one of the
linux-*.sh
orwin-*.sh
scripts instead ofdev.sh
to produce a build for a particular target platform. -
Type
exit
to leave the build environment.
-
Install Xcode (version 12 or higher).
-
Install Hombrew and use it to
brew install awscli fileicon
. -
aws configure
-- enter your AWS credentials. You need this to access the requester-pays S3 buckettmbasic
which contains premade build environments. -
Start the build environment and compile:
cd build ./mac-x64.sh make
Use
./mac-arm64.sh
instead to build for Apple Silicon. -
Type
exit
to leave the build environment.
- Install the
ms-vscode.cpptools
,ms-vscode-remote.remote-containers
, andms-azuretools.vscode-docker
extensions in Visual Studio Code. - Start the container using the instructions above.
- In Visual Studio Code, click "View" > "Command Palette..." and run the "Remote-Containers: Attach to Running Container..." command. OR: switch to the Docker tab, right-click on the container > "Attach Visual Studio Code".
- Choose the
/tmbasic-dev
container. - Choose the
/code
directory.
If your Docker engine is running on another machine, modify the above steps:
- Install the
ms-vscode-remote.remote-ssh
extension too. - Download the Docker client EXE and stick it somewhere on your
PATH
. - Start
dev.sh
on the remote machine. - In VSCode, press Ctrl+Shift+P and run the "Remote-SSH: Connect to host..." command to connect to the remote machine.
- Continue with the original steps.
SVG screenshots would have been nice, but they get garbled in some browsers (Chrome on Android). Instead, we will just take regular PNG screenshots.
- Windows 10 at 175% scaling
- PuTTY
- Terminal size: 80x24
- Window > Appearance
- Cursor appearance: Underline
- Font: Consolas 14pt
- Font quality: Antialiased
- Window > Colours > ANSI Cyan: 58, 150, 221
Crop to the console area including the one pixel black outline. Post-process with:
pngcrush -brute -reduce -ow screenshot.png
- In
build/
, runscripts/depsCheck.sh
. Updatebuild/scripts/depsDownload.sh
andbuild/files/mingw.sh
. - In
build/
, runscripts/depsDownload.sh
to pull the latest version of each dep. - In
build/downloads/
,rm sysroot-* ; aws s3 sync . s3://tmbasic/deps/ --acl public-read --size-only
- Commit as "Update deps".
- Check for new Alpine releases. Search for
alpine:
to find the Dockerfiles to update. Commit as "Update Alpine".