I have the following script called "build-bat.sublime-build":
{
"cmd": "build.bat",
"working_dir": "$project_path",
"windows" : {
"shell": true
}
}
The script is in C:\Users\MyName\AppData\Roaming\Sublime Text 3\Packages
I can select the script in Tools/Build Systems/build-bat and then I run it via CTRL+B or via manually selecting it in Tools/Build
It happens exactly nothing. I don't see anything, I don't get any errors.
It should run a file named: build.bat in the current directory where the file that I am working on is placed. But that doesn't happen.
Why?
Sublime Text is able to run build programs such as 'make', either when a key in pressed (F7 by default), or when a file is saved. The build system to use can be select from the Tools/Build System menu. If a project is open, the selected build system will be remembered for the project.
Sublime Text provides build systems to allow users to run external programs. Examples of common uses for build systems include: compiling, transpiling, linting, and executing tests. Build systems are specified via JSON and saved in a file with the extension .sublime-build.
Sublime populates its Tools/Build System menu based on the “. sublime-build” files stored in the Sublime “Packages” directory. Should one need to locate this, it can be found in “~/Library/Application Support/Sublime Text 2/Packages/User” (if using OS X) or the corresponding Packages/User directory on other platforms.
After adding a new build system to sublime text 3 you have to restart sublime text 3. After this the code above works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With