Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Version control plug-in
dushara:
Hi all,
I'm working on a version control plug-in (git) but have hit a small hurdle. How do I work out the project file path? I went through some of the header files (cbproject.h etc), but I can't see an obvious way. I need it for 2 reasons.
1. In order to check-in the project file itself to the repo.
2. git seems to require the CWD to be within the directory where .git exists.
Thanks in advance.
D
oBFusCATed:
--- Code: ---virtual wxString GetBasePath() const; ///< Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will return "/usr/local/bin"
--- End code ---
Have you tried this method?
dushara:
--- Quote from: oBFusCATed on November 20, 2010, 11:04:25 am ---
--- Code: ---virtual wxString GetBasePath() const; ///< Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will return "/usr/local/bin"
--- End code ---
Have you tried this method?
--- End quote ---
No I didn't see that. Thanks.
D
cacb:
--- Quote from: dushara on November 20, 2010, 04:55:21 am ---Hi all,
I'm working on a version control plug-in (git) ....
--- End quote ---
That is interesting, I have been missing some way to use version control from within Code::Blocks. I hope your plugin will be general enough to support also other version control systems than git? For example, I prefer Bazaar with the QBZR gui front end, as it offers the same functionality on Windows and Linux.
Perhaps this can serve as inspiration to your work: Without a proper plugin for this purpose, I have used the Code::Blocks Tools menu to make a "plugin" supporting QBZR version control. The result is a Code::Blocks Tools menu looking like this (on Linux):
The definition of the tools are stored in the Code::Blocks default.config file. As I use several machines, I had to figure out a way to move the definitions from one machine to the other, i.e. edit the .config file manually. This is described in the link below
http://arnholm.org/cpde/codeblocks/CB_tools_menu.zip
So far it seems to work, but it could be more elegant. Perhaps your plugin is the answer. But in fact a slight improvement to the Tools menu facility would almost seem good enough
- Some way to define a submenu in the Tools menu
- Some way to export/import submenus to/from XML files, allowing for definitions to be moved to other machines.
This way, one could have a for example cb_tools_qbzr.xml file containing definitions for QBZR version control commands that would be installed as a submenu under Tools. Or even better, do something similar with your source control plugin. I am guessing you need to save some configuration data, so quite possibly similar requirements apply.
Looking forward to hear about your progress with this plugin!
oBFusCATed:
--- Quote from: cacb on November 21, 2010, 11:31:32 am ---- Some way to export/import submenus to/from XML files, allowing for definitions to be moved to other machines.
--- End quote ---
Have you tried cb_share_config? It comes with the C::B's installation.
Navigation
[0] Message Index
[#] Next page
Go to full version