Old BlitzMax TextMate bundle, restored after a while because eh.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Commands
Preferences
Snippets
Support
Syntaxes
Templates/Singleton.tmTemplate
README.textile Add bundle sent in by Noel Cower. Feb 3, 2009
info.plist

README.textile

BlitzMax TextMate Bundle

Install

With Git

Clone the git repository into /Users/you/Library/Application Support/TextMate/Bundles/BlitzMax.tmbundle.

For example:

cd /Users/you/Library/Application Support/TextMate/Bundles/
git clone git://github.com/nilium/blitzmax.tmbundle.git

Without Git

To install the bundle, download the bundle as a ZIP/TAR file from GitHub (see links) and extract the contents of the archive to /Users/you/Library/Application Support/TextMate/Bundles/BlitzMax.tmbundle. You will have to create the BlitzMax.tmbundle directory yourself.

Setup

Once you’ve downloaded and installed the bundle, open TextMate and go into your preferences. Under the Advanced page, select ‘Shell Variables’ and add the variable TM_BLITZMAX. Set its value to the path to the root of your BlitzMax directory (trailing slash not needed). For example, /Developer/Applications/BlitzMax.

Using the Bundle

Projects

If you have a BlitzMax project managed in TextMate, you can set the TM_BLITZMAX_MAIN_FILE to the main file of your project in your Project’s information pane (click the ‘i’ button at the bottom of the project drawer). The path to the main file should be relative to the root project directory. If the project directory (TM_PROJECT_DIRECTORY) or TM_BLITZMAX_MAIN_FILE is not set, files will build normally.

Build Options

When building BMax source code using the Build App command, you can toggle certain options to be passed to bmk via build options left in source comments. These comments are formatted as such:

'buildopt:[option]

There are seven build options you can toggle:

  • console – Builds the source code as a console application.
  • gui – Builds the source code as a GUI application bundle.
  • library – Builds the source code as a library (refer to bmk’s “makelib” command).
  • debug – Enables debugging.
  • release – Disables debugging.
  • threads – Enables threading. Keep in mind that this is still an experimental feature in BlitzMax.
  • execute – Runs the application after building. Same result as using the Run App command.

These comments can be located anywhere in your main source file, but must always be on a line of their own. You may have whitespace between `’ buildopt:` and the option name. For example, the following will not work:

Function Foo:Int( Bar:String ) 'buildopt: threads

but this will:

	' buildopt: threads
Function Foo:Int( Bar:String )

Building Modules

Module building is split into two commands:

  • Build Modules
    This builds modules regularly, without threading enabled.
  • Build Modules (Threaded)
    This builds modules with threading enabled. Bear in mind that threading is an experimental feature in BlitzMax at the time of this writing.

Notes

This bundle is written for use with TextMate (and, optionally, use in the E text editor- changes may have to be made for Cygwin support however [check cygpath]). If you make any changes to it you consider valuable, I would encourage you to submit them.

There is currently a small amount of snippets, and I’ve tried to write them such that they do actually benefit you in writing code.

If you have any questions, you can contact me at ncower AT gmail DOT com.

Links