Useful Hints found during compilation
1. Removing obsolete links from a github repository:
Note: For Windows Use Git Bash
As an example for removing any tags which include the name 'v3':
git push origin --delete $(git tag -l "v3")
2. Windows, changing file permissions:
Using Git Bash…
git update-index --chmod=+x 'name-of-shell-script' (e.g. ./ci/generic-build-raspbian-armhf.sh. wildcards are allowed e.g. ./ci/*.sh)
git commit -m "made a file executable"
git push
This is needed when copying files from ./ci/ from ShipDriver to another plugin that is being upgraded. Windows does not retain the file permissions for the copied scripts.
3. Using wxMemoryDC:
`wxMemoryDC mdc(wxNullBitmap); mdc.SetFont( *pTCFont); int w, h; mdc.GetTextExtent(labels, &w, &h); int label_offset = 10; wxBitmap bm(w + label_offset*2, h + 1); mdc.SelectObject(bm); mdc.Clear(); wxPen penText(m_text_color); mdc.SetPen(penText); mdc.SetBrush(*wxTRANSPARENT_BRUSH); mdc.SetTextForeground(m_text_color); //mdc.SetTextBackground(wxTRANSPARENT);` ******* Removed this line to get openGL working in otcurrent_pi
4. Copy files from shipdriver using Git
Using git instead of a plain copy keeps the history which otherwise is lost. It also fixes the executable permissions otherwise needing special treatment on windows, see above. In the destination plugin which is to receive files from shipdriver do something like:
$ git remote add shipdriver https://github.com/Rasbats/shipdriver_pi.git $ git remote update shipdriver $ git checkout shipdriver/master cmake $ git diff --staged # check the staged changes $ git commit -m "Import cmake/ directory from shipdriver"
On Windows, this can be done in a plain cmd window, no bash is required. Of course, this is not limited to the cmake directory, all common stuff from shipdriver can be imported this way. After initial setup above, more directories or files can be copied just using
$ git checkout shipdriver/master ci .circleci $ git commit -m "Import ci/ and .circleci directories from shipdriver"