Sublime Forum

Project-specific build systems?

#1

Is it possible (and if not, can I make a feature request?) to have project-specific build systems?

I currently have four different projects Iā€™m switching between, each with their own build requirements. At the moment, I have a custom build system for each one filling up the ā€œBuild Systemsā€ menu - even though theyā€™re project specific.

Itā€™d be nice to have the build system linked to the project; either specified directly in the sublime-project file or by linking to the custom sublime-build file (stored out of the Packages directory).

2 Likes

#2

I see that this was added in Dev 2104. Thanks! :smile:

0 Likes

#3

Can you show me how to add project specific build system in sublime-project file?
And can i add more than one there?

0 Likes

#4

sublimetext.com/docs/2/projects.html

0 Likes

#5

This isnā€™t working for me.
I assume you mean to go ahead and add the following to the sublime-workspace file as the sublime-project file seems to have been relegated to defining mount points.

    "build_system": 
        {
            "name": "List",
            "cmd": "ls"]
        }
    ]

Should ā€œListā€ be appearing under Tools > Build Systems (I donā€™t see this) or is the project build triggered elsewhere?

Edit: Platform is on Win7x64 with Sublime Text 2 Portable Beta 2131

0 Likes

#6

It goes in the .sublime-project file, as in the example on the aforementioned page. The .sublime-workspace file is not supposed to be edited by hand.

0 Likes

#7

[quote=ā€œjpsā€]

It goes in the .sublime-project file, as in the example on the aforementioned page. The .sublime-workspace file is not supposed to be edited by hand.[/quote]

I guess thatā€™s what I get for assuming :blush:
Working - thanks.

0 Likes

#8

What am I doing wrong?

This is my sublime-project file

{
ā€œfoldersā€:

	{
		"follow_symlinks": true,
		"path": "."
	}
],
"settings":
{
    "open_related_patterns": 
      "*/src/js/**/*.js", "*/src/template/**/*.html", "*/test/**/*.spec.js"]
    ]
},
"build_systems":

    {
        "name": "LT Profile",
        "cmd": "ant"]
    },
    {
        "name": "List",
        "cmd": "ls"]
    }
]

}

nothing new shows up under tools -> build and if i select automatic, the build command gets disabled

0 Likes

#9

I added the new build file into
C:\Users\chew\AppData\Roaming\Sublime Text 3\Packages\User

and add the above PATH to environment variable, but everytime i load build system, below appear

{
ā€œshell_cmdā€: ā€œmakeā€
}

Where is the above default build system file in ?

0 Likes

#10

I donā€™t know for the others, but in my case I have been typing ā€œbuild_systemā€ instead of ā€œbuild_systemsā€. With build_systems it worked (the new system appears under Tools > Build System), however I had to take care not to use ${HOME} just like this in working_dir path. For now I type it manually, I wonder if setting the os.environ() as robdodson.me/blog/2012/05/14/hac ā€¦ lime-text/ does with PATH, but for HOME, would workā€¦
Iā€™m sure I found out how to do on my computer but right now Iā€™m in my lab so I have to verify it when Iā€™m backā€¦ homeā€¦

0 Likes