Home Download Buy Blog Forum Support

folder path in sublime text build system

folder path in sublime text build system

Postby cbou on Fri Feb 01, 2013 10:48 am

My sublime project looks like this:

Code: Select all
{
    "folders":
    [
        {
            "folder_exclude_patterns":
            [
                ".bzr",
                "build",
                "webapps",
                "work",
                ".settings"
            ],
            "path": "/home/charles/project/Editor/trunk"
        }
    ],
    "settings":
    {
        "build_on_save": true,
        "filename_filter": "\\.(java)$",
        "tab_size": 4,
        "translate_tabs_to_spaces": false
    },
    "build_systems":
    [
        {
            "name": "compile",
            "cmd": ["ant", "-f", "dev.xml", "compile"]
        }
    ]
}


When I save a file the console says:

Code: Select all
Buildfile: dev.xml does not exist!
Build failed
[Finished in 0.2s with exit code 1]

I know that I need to put something before dev.xml but I don't know what.

I found some possibilities here: http://sublimetext.info/docs/en/referen ... #variables

But What I need is the folder path
/home/charles/project/Editor/trunk
in my case...

Any idea how I can achieve this?
cbou
 
Posts: 1
Joined: Fri Feb 01, 2013 10:47 am

Re: folder path in sublime text build system

Postby FichteFoll on Sat Feb 02, 2013 3:06 am

cbou wrote:I know that I need to put something before dev.xml but I don't know what.

I found some possibilities here: http://sublimetext.info/docs/en/referen ... #variables


Where do you save your .sublime-project file? Is this xml file located by "/home/charles/project/Editor/trunk/dev.xml"? U can not really access your open folders because that could be many. That's why you usually save your project file in the "main root directory" and that way you could use "$project_path/dev.xml".

Here is a more up-to-date version of the docs (even though there probably didn't change too much): http://docs.sublimetext.info/en/latest/ ... -variables
FichteFoll
 
Posts: 408
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