Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Jun 7, 2020
web
May 9, 2020
Nov 3, 2019

README.org

Yabasic - A simple Basic interpreter for Unix and Windows.

Yabasic is a traditional basic-interpreter. It comes with goto and various loops and allows to define subroutines and libraries. It does simple graphics and printing. Yabasic can call out to libraries written in C and allows to create standalone programs. Yabasic runs under Unix and Windows and has a comprehensive documentation; it is small, simple, open-source and free.

If you want to write programs for yabasic, see http://www.yabasic.de for documentation.

If you want to modify yabasic itself and participate in its development, read below. The various files README.org in subdirectories may contain some hints to.

A short overview on changing yabasic can be found at http://www.yabasic.de/changing.html.

Table of Content

The three top-level directories

Read below for an overview; some directories may contain their own README.org with more details.

An additional top-level directory ‘products’ is created for the installable artifacts, which are created during the various build steps.

Directory ‘unix’

Here are most of the c-sources of yabasic as well as the input files for flex and bison, which describe yabasics grammer.

Also find the documentation, which is written in docbook-xml and transfromed into html or man.

Directory ‘windows’

The build process uses the c-sources from the unix-directory, so here you will only find the sources for the windows-specific setup-program.

Directory ‘web’

The html-Files and erb-templates for www.yabasic.de.

Building a new version of the website (by typing ‘rake’) is tested under windows, but should be workable under unix too.

Building Yabasic

Building with rake

Yabasic’s build process relies on rake. Rake is similar to make, but its Rakefiles (and the tool itself) are written in ruby. Therefore you need to install ruby and rake to build yabasic.

Each of the three top-level directories (see above) has its own Rakefile, and just typing ‘rake’ should be enough to build the respective components.

A Note on .erb-Files

In some directories you will find files with the ending ‘.erb’ (e.g. the documentation ‘yabasic.xml.erb’); these files contain tiny snippets of ruby code (‘erb’ stands for ‘embedded ruby’) and are processed by one of the Rakefiles to generate the matching file without ‘.erb’ (‘yabasic.xml’ is generated this way).

So if you intend to edit any of those files, make sure, that you rather edit the corresponding ‘.erb’ file; because otherwise your changes will be overwritten by the next Rakefile-processing.

Building under Unix

Yabasic can be build on any system with these tools: autoconf, bison, flex, gcc, ruby.

All steps are automated with rake (ruby make); so typically you just need to invoke rake, which e.g. invokes autoconf and make in turn.

The last step of the building process moves the artefacts into the folder /work/yabasic/prodcts . If you have a machine with both linux and windows, this folder can be usedully shared between both operating systems.

Building under Windows

Yabasic is be compiled with Visual Studio 2015, which can be installed free of charge.

The project files assume ‘C:\work\yabasic’ as the git checkout directory.

The rest of the windows-toolchain relies on the presence of a fairly complete cygwin-installation, including ruby. The git-directory should be symlinked to /work/yabasic.

All steps are automated with rake (ruby make); so typically you just need to invoke rake, which e.g. invokes the Visual Studio C-Compiler in turn.

A typical building sequence

To build yabasic, go through the steps below; please note that this involves changing directories as well as platforms. The process is mostly automated, only asking for confirmation at certain key-points. Depending on your changes and desired products, you may be able to skip certain steps. See the previous chapters for a more detailed description of the build process.

The list below contains two shorthands: “do git” and “do rake”; their meaning:

do git
git pull/add/commit/push appropriately, as all changes between the platforms unix and windows are only propagated by git; frequent commit messages are “new version” or “built on windows/linux”. A more meaningful message (taken from the file NEWS) will be added when creating a new tag (during do rake) below.
do rake
rake (without arguments) as all tasks are automated within the Rakefile.

Here the detailed steps (type “rake h” to read them again from any directory):

  • Implement some features, fix some bugs, write tests, improve the docu
  • Under Unix in directory unix/lang:
    • do git, as there might be prior changes under windows
    • Edit configure.ac to increment the version of yabasic
    • Document changes in NEWS
    • do rake; this does:
      • Run tests
      • Create tar, rpm and deb
    • do git
  • Under Windows as administrator (!) in directory windows:
    • do git
    • do rake; this does:
      • Build windows executable
      • Create setup.exe and zip-files
  • Under Windows in directory web:
    • do rake; this does:
      • Create new git tag and use the content of NEWS as the message
      • Upload everything to www.yabasic.de
    • do git
  • Maybe submit new version to symantec and microsoft virus detection
You can’t perform that action at this time.