How to add multiple build systems in a single file, as on the project file?
On my project file I have this:
"build_systems":
[
{
"name": "Galileo Installer",
"cmd": ["galileo.bat", "$project_path/plugins/addons/amxmodx/scripting/galileo.sma", "galileo", "$packages"],
},
{
"name": "Install Multimod Plugins",
"cmd": ["sh", "$project_path/installers/install_multimod_plugins.sh"],
},
{
"name": "Install Multimod Server",
"cmd": ["sh", "$project_path/installers/install_multimod_server.sh"],
},
]
However, if I do the same on the build file as file.sublime-build
:
{
"name": "Galileo Installer",
"cmd": ["galileo.bat", "$project_path/plugins/addons/amxmodx/scripting/galileo.sma", "galileo", "$packages"],
},
{
"name": "Install Multimod Plugins",
"cmd": ["sh", "$project_path/installers/install_multimod_plugins.sh"],
},
It does not work. Currently I am using variants:
{
"file_regex": "^.*[\\/\\\\]+(.+)\\(([0-9]+ ?.*)\\) : (.*)",
"cmd": ["sh","$packages/Amxx Pawn/AmxxPawn.sh","$file", "$file_base_name", "$packages", "$file_path"],
"variants":
[
{
"name": "Build AMXX Plugin (Linux/Cygwin)",
"cmd": ["sh","$packages/Amxx Pawn/AmxxPawn.sh","$file", "$file_base_name", "$packages", "$file_path"],
},
{
"name": "Build AMXX Plugin (Windows/Bat)",
"cmd": ["$packages/Amxx Pawn/AmxxPawn.bat","$file", "$file_base_name", "$packages", "$file_path"],
},
],
}
But I do not want to 3 entries on my build list as the first is just repeating the second:
I could create two .sublime-build
files to solve this, but it is too annoying have so many files just within 3 or 4 lines. Currently the sublime-project
allow what I am wanting. However here I am not configuring a project, but a package. Therefore, how to write a sublime-build
file with several build systems as on the .sublime-project
file?
Posted also on:
- $1643 To add multiple build systems in a single file, as on the project file