Author Topic: source code position changes in cbp file  (Read 6135 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5978
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
source code position changes in cbp file
« on: September 05, 2016, 12:38:32 am »
I add some file to the cbp, but found that some other source files are changed, see below:
Code
 src/CodeBlocks_wx30.cbp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/CodeBlocks_wx30.cbp b/src/CodeBlocks_wx30.cbp
index 5c49123..ecae645 100644
--- a/src/CodeBlocks_wx30.cbp
+++ b/src/CodeBlocks_wx30.cbp
@@ -741,9 +741,6 @@
  <Unit filename="base/tinyxml/tinystr.cpp">
  <Option target="tinyXML" />
  </Unit>
- <Unit filename="sdk/tinywxuni.cpp">
- <Option target="sdk" />
- </Unit>
  <Unit filename="base/tinyxml/tinyxml.cpp">
  <Option target="tinyXML" />
  </Unit>
@@ -1289,12 +1286,12 @@
  <Unit filename="include/templatemanager.h">
  <Option target="sdk" />
  </Unit>
- <Unit filename="include/tinyxml/tinystr.h">
- <Option target="tinyXML" />
- </Unit>
  <Unit filename="include/tinywxuni.h">
  <Option target="sdk" />
  </Unit>
+ <Unit filename="include/tinyxml/tinystr.h">
+ <Option target="tinyXML" />
+ </Unit>
  <Unit filename="include/tinyxml/tinyxml.h">
  <Option target="tinyXML" />
  </Unit>
@@ -1465,15 +1462,15 @@
  <Unit filename="plugins/codecompletion/doxygen_parser.h">
  <Option target="Code-completion" />
  </Unit>
- <Unit filename="plugins/codecompletion/insertclassmethoddlg.cpp">
- <Option target="Code-completion" />
- </Unit>
  <Unit filename="plugins/codecompletion/gotofunctiondlg.cpp">
  <Option target="Code-completion" />
  </Unit>
  <Unit filename="plugins/codecompletion/gotofunctiondlg.h">
  <Option target="Code-completion" />
  </Unit>
+ <Unit filename="plugins/codecompletion/insertclassmethoddlg.cpp">
+ <Option target="Code-completion" />
+ </Unit>
  <Unit filename="plugins/codecompletion/insertclassmethoddlg.h">
  <Option target="Code-completion" />
  </Unit>
@@ -3298,6 +3295,9 @@
  <Unit filename="sdk/templatemanager.cpp">
  <Option target="sdk" />
  </Unit>
+ <Unit filename="sdk/tinywxuni.cpp">
+ <Option target="sdk" />
+ </Unit>
  <Unit filename="sdk/toolsmanager.cpp">
  <Option target="sdk" />
  </Unit>
Is it by design, what is the rule of place source files? (I'm using the latest nightly build under Windows).

BTW: what is the best way to apply changes from one cbp file to another, since we have CodeBlocks.cbp, CodeBlocks_w30.cbp ...., Have a patch for one file, and apply to other files?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: source code position changes in cbp file
« Reply #1 on: September 05, 2016, 09:09:58 pm »
BTW: what is the best way to apply changes from one cbp file to another, since we have CodeBlocks.cbp, CodeBlocks_w30.cbp ...., Have a patch for one file, and apply to other files?

This is indeed a very annoying thing...There should be some mechanism to unify this projects (like insert a third hierarchy on top of projects, or between projects and targets...) i have a lot mixed unix and windows projects, and there is no satisfying solution... (or at least i have not found it)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: source code position changes in cbp file
« Reply #2 on: September 06, 2016, 04:21:07 pm »
1. Apply the same patch just modify the file names
2. Use difftool to unify all the project files.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5978
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: source code position changes in cbp file
« Reply #3 on: September 08, 2016, 04:00:20 am »
1. Apply the same patch just modify the file names
2. Use difftool to unify all the project files.
Thanks, what does the second step mean?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: source code position changes in cbp file
« Reply #4 on: September 08, 2016, 07:24:08 am »
1. Apply the same patch just modify the file names
2. Use difftool to unify all the project files.
Thanks, what does the second step mean?
Use a tool that shows (and merges) diffs between files.
I prefer meld, because it works quiet good (and in the same way) on Linux and Windows: http://meldmerge.org/ .

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5978
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: source code position changes in cbp file
« Reply #5 on: September 08, 2016, 04:37:39 pm »
1. Apply the same patch just modify the file names
2. Use difftool to unify all the project files.
Thanks, what does the second step mean?
Use a tool that shows (and merges) diffs between files.
I prefer meld, because it works quiet good (and in the same way) on Linux and Windows: http://meldmerge.org/ .
Thanks for the explanation. Meld is a great tool, but when using meld to merge files, I see that copy some text from one side editor to another side does not works quite well, so I finally configure my windows git to use TortoiseDiff tool.  ;)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.