Page 1 of 1

Running Deployment Scripts from CodeLite

Posted: Sat Feb 16, 2013 3:58 am
by Verax
I'm using Codelite for embedded development, and after building my project, I have to run some deployment scripts to erase the board's flash and upload a hex file to the target board.

I'd like to run a series of console programs (or preferably a batch file) to do this right before running or debugging a project. I don't want to use the Post-Build commands because the process takes too long (approximately 20 seconds) and I don't want to have to do this every time I build the project. Just when I'm ready to run it.

Observation 1
I noticed that if using the "..." button to set the program to a batch file, the path will contain "/" as opposed to "\". When running the program (Ctl-F5), a console window opens and shows an "unrecognized command" error. It happens so fast I can't see the exact error.

Observation2
If I replace the "/" with "\" the batch file runs, but opens up a separate console window. I'd prefer to have the output display in CodeLite's output pane.

Question 1
I'd like CodeLite to start the batch file and display the output in the "Output" window. Is this possible?

Question 2
Is it possible to run this deployment script right before starting the debugger (F5 method)?

CodeLite v5.0.6213 (Official Build)
Windows 8 64-bit

Re: Running Deployment Scripts from CodeLite

Posted: Sat Feb 16, 2013 7:42 am
by Jarod42
In project settings,
- you can set 'pause when execution ends'

- You can use external tool plugin to launch any script

Re: Running Deployment Scripts from CodeLite

Posted: Sat Feb 16, 2013 8:41 am
by Verax
Observation 1
I noticed that if using the "..." button to set the program to a batch file, the path will contain "/" as opposed to "\". When running the program (Ctl-F5), a console window opens and shows an "unrecognized command" error. It happens so fast I can't see the exact error.
Observation2
If I replace the "/" with "\" the batch file runs, but opens up a separate console window. I'd prefer to have the output display in CodeLite's output pane.
In project settings,
- you can set 'pause when execution ends'
Thanks. I can see the error is "'..' is not recognized as an internal or external command, operable program or batch file." My entry is for the "Program" textbox is "../../../Debug.bat". If I replace the "/" with "\" the batch file executes. A very minor problem, I admit.
Question 1
I'd like CodeLite to start the batch file and display the output in the "Output" window. Is this possible?
Question 2
Is it possible to run this deployment script right before starting the debugger (F5 method)?
You can use external tool plugin to launch any script
Using the External Tools plugin works great. Checking the "Capture process output" puts the output in the output pane, however...

Q: I can't see the output in the output pane until the program finishes executing. Is there some way to show the output while its executing?

Q: Is there some way to integrate this into the build process, so I can execute the external tool right after a build (so I don't have to wait for the build to finish to initiate the deployment)? Again post-build is not what I'm looking for. I'm looking for something equivalent to executing an external tool instead of the default "Run".