Skip to content

textmate/blitzmax.tmbundle

Repository files navigation

BlitzMax TextMate Bundle

Install

You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.

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

License

If not otherwise specified (see below), files in this repository fall under the following license:

Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.

An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.

About

TextMate support for BlitzMax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages