Home Download Buy Blog Forum Support

Automatic Build System

Automatic Build System

Postby ArtDesire on Thu Dec 27, 2012 9:54 pm

Hello every1!
I have some issues with Automatic Build System. I want to build scripts for SourcePawn language.
I have sublime build file for it, and it works, but only if I'm choosing Build System. I want make it works without choosing(Automatic option). I can't define "selector" 'cause I haven't .tmLanguage file. Although I can make it with:
Code: Select all
"selector": "source.c, source.c++"

but then c++ files will compile via SourcePawn compiler.
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Automatic Build System

Postby FichteFoll on Sat Dec 29, 2012 3:08 am

So, what is the file format you want to build? And what is its scope? If you don't know the latter, do "ctrl+alt+shift+p" anywhere in the source file and check the first word which should be this file's base scope. This is what you want for the "selector" property.
FichteFoll
 
Posts: 313
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: Automatic Build System

Postby ArtDesire on Sat Dec 29, 2012 6:40 am

FichteFoll wrote:what is its scope

It depends on which syntax highlighting I use :D
I'm writing in SourcePawn language(extension - .sp)
ST2 hasn't highlighting for it, so I often use c++ highlighting, it's more similar to sourcepawn.
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Automatic Build System

Postby FichteFoll on Sat Dec 29, 2012 12:47 pm

Well, since you only can determine a build system according to the scope and you use the same scope (syntax definition) for SourcePawn and C++ respectively you have problems.
You can copy the c++ syntax and modify it slightly (change the "name" to "SourcePawn (C++)" or similar, change the base scope ("scopeName") and the file extension). Then ST would automatically load this new syntax (due to the file extension) and you can use a build system for the new scope.
FichteFoll
 
Posts: 313
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 18 guests