Correctly setting up prebulid batch script in CooCox

Today I spent quite some time figuring out how to set up a batch script to run before a bulid in a CooCox IDE.

The script I wrote was to automatically change the bulid number of a program I am writing for my diploma thesis. What the batch script does is it reads a number from a header file, increments it by 1 and writes it back to the same file. The script itself is a derivate of this code (I got it from here):

In my case I only changed the script to increase a different variable. The script worked as it should on clicking / running it manually. However only setting the script to be executed before the bulid in CooCox didn’t result in it working as it should. Only after a few hours of searching around and trying different things I found the solution. To make the batch script run correctly, you have to add the following two lines at the start of the batch script:

The two lines supposedly set the working environment and working directory. And the script works after adding them – at least for me 🙂

Tagged with: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*