Open Sharlock93 opened 1 year ago
you can override the build using the python API:
# Add a function to be called when the project is about to be
# built : AddProjectBuildFunction(function) : bool function(filename)
# - return True to cancel build
def MyBuildFunction():
print("building")
return True
N10X.Editor.AddProjectBuildFunction(MyBuildFunction)
I tried this, for some reason its not working, the function never gets called.
did you put your python script in %appdata%\10x\PythonScripts
?
I did indeed, screenshot. I build the project via right click -> build on the project.
I investigated this further, the provided solution works, however only if you build via F7 or (Build Active Workspace), it doesn't work if you right click -> build projects
Currently Custom Build Commands are only available under workspaces, would be awesome if we could have these:
1) Script API to interface with the build system. i.e: I want to write a python script that can set the current working dir or check the current opened solutions working dir and run commands from that location, printing strings to the build output etc.
2) Setting a custom batch file as the current command to run when building.
Motivation: At work while we use visual studio as the editor we have specific extensions that intercept the build process and run commands. These commands are not stored in the solution files.