My previous post was written with the help of a few very useful tools:
Archive for the ‘Programming’ Category
There are plenty of resources concerning C++ coding style, or coding style more generally.
Here I describe some of my own programming style preferences that I have not seen described elsewhere.
Although BitRock InstallBuilder has a GUI, it is also practical to edit the sources, which are XML files, in an editor.
Beware that when you save the sources from the GUI, hand-edited files may be reorganised. For example, in many cases element siblings are rearranged into a sorted order. (Also beware that hand-edited files are not automatically re-loaded by the GUI; you must do this explicitly.)
Here I make some suggestions for trying to keep BitRock sources readable.
In BitRock InstallBuilder, defining folders specific to 32-bit and/or 64-bit architectures and Linux and/or Windows is simple but not entirely obvious. Here are some recipes.
Here I give Linux commands to allow the searching for filenames or strings within files without descending into the <.svn> subdirectories.
Suppose you have a set of changes on a Windows machine ready for commit. However, before committing, you’d like to check compilation on your Linux box. So, you create a patch file with a command such as
C:\my-dir> svn diff > patch.diff
Having copied the patch to your Linux box, you try the command
/home/me/my-dir$ patch -p0 < patch.diff
Unfortunately, you see many problems of the form
Hunk #1 FAILED at 234.
What is wrong?
The main stumbling block with splitting paths in Bash is converting a relative path into an absolute one.
Searching the Internet I found many partial solutions, but none was entirely satisfactory. There may be a better solution out there, but I didn’t find it.