Sublime Forum

[SOLVED] Project based build_systems seems not to work

#1

I’m pretty new to Sublime Text 2 and have a problem in getting a project specific build running as expected.
I’m using a simple C++ project file with some build settings that should set the VC2010 setting for Windows and then invokes a python script for the actual build process.
After loading the project, and pressing CTRL+B is shortly see “Building” in the status but no output at all.
I’ve also tried to simply write “echo hello world” as cmd but still no output at all.
What am I doing wrongly ?
Did I properly understand the documentation (not very complete in this area) and creating a build_systems in a project file is the way to go ?
Is there a way to debug/trace the build process ?
Thank you for your help in advance!

I’m using a licensed x64 version of Sublime Text 2 Build 2217 under Windows 7.

The project file looks as follows:

{
	"folders":
	
		{
			"path": "/D/MyDev/ljs_app/trunk/ljs",
			"name": "ljs"
	],
	"settings":
    {
    },
    "build_systems":
    
        {
        "name": "build",
	"cmd":
	
		"C/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat",
		"&",
		"/D/MyDev/ljs_app/trunk/build.py", "--target=LJS", "--migrate", "--fast"
	],
	"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
	"shell": true,
	"working_dir": "/D/MyDev/ljs_app/trunk/"
        }
    ]
}
0 Likes

#2

I took me a little but I finally sorted out the problem myself.
The key information I was missing is the fact that there is a exec.py file that actually invokes the build process.
Looking at this file and adding a few debug messages make it clear that the working_dir had an invalid format and the build process ended with an exception.

What I’m still looking an answer for is:

  1. Is there another way to inspect/debug/trace this process ?
  2. What is the proper format of a path ? I’ve used the same format that ST2 uses in the .sublime-project file (/D/MyDev/ljs_app/trunk/ljs) but this seems not to work when specifying a working directory in build_system

I would also recommend to either check the format of working_dir or at least catch an exception in:

# Change to the working dir, rather than spawning the process with it,
# so that emitted working dir relative path names make sense
if working_dir != "":
    os.chdir(working_dir)

so the problem I got stuck with would be a lot easier to detect.

0 Likes