VersionManager plugin
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
VersionManager plugin
Hi
Here is my first plugin : a version manager.
It is simple to use :
1 - right click an a project and you will see a Version Manager menu
2 - Select Settings to manage your project : actually, you can just select where the file version is stored.
3 - Select Deliver if you want to change the version.
Enjoy
Here is my first plugin : a version manager.
It is simple to use :
1 - right click an a project and you will see a Version Manager menu
2 - Select Settings to manage your project : actually, you can just select where the file version is stored.
3 - Select Deliver if you want to change the version.
Enjoy
You do not have the required permissions to view the files attached to this post.
Jérémie
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: VersionManager plugin
Nice work!
Some questions/points:
- Why did you choose to use wxString for this purpose? why not make it a more generic plugin and use std::string?
- either way, I suggest that you add include file at the top of the vm_version.h file, something like #include <wx/string.h> OR #include <string> (if you accept my suggestion)
- Now that I see what you needed the events for, I understand why you need the an event for BUILD_STARTED as 'Send' and not 'Post' --> to make sure that the file is updated prior the build process started.
I see that the Set/GetUserData worked
Eran
Some questions/points:
- Why did you choose to use wxString for this purpose? why not make it a more generic plugin and use std::string?
- either way, I suggest that you add include file at the top of the vm_version.h file, something like #include <wx/string.h> OR #include <string> (if you accept my suggestion)
- Now that I see what you needed the events for, I understand why you need the an event for BUILD_STARTED as 'Send' and not 'Post' --> to make sure that the file is updated prior the build process started.
I see that the Set/GetUserData worked
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: VersionManager plugin
Hi Eran
Thanks for your overview.
Suppose you have many project in your workspace (like CL), If you build another project that the one which manage version, the version is gonna be incremented, which is interresting. Not sure that it's easy to know if a project need increment version in a whole build. I'm gonna look if there are helpfull method in the plugin interface...
Thanks for your overview.
Well, I think this is because it was faster for me (no need to make conversions), but you're right, I'm going to change this. I just wanted to test plugin interface as fast as possibleeranif wrote:- Why did you choose to use wxString for this purpose? why not make it a more generic plugin and use std::string?
Of course, thank you for pointing me that problemeranif wrote:- either way, I suggest that you add include file at the top of the vm_version.h file, something like #include <wx/string.h> OR #include <string> (if you accept my suggestion)
Yes : I've got a new settings in progress : automatic increment build. But, thinking to this, maybe there can be a problem :eranif wrote:- Now that I see what you needed the events for, I understand why you need the an event for BUILD_STARTED as 'Send' and not 'Post' --> to make sure that the file is updated prior the build process started.
Suppose you have many project in your workspace (like CL), If you build another project that the one which manage version, the version is gonna be incremented, which is interresting. Not sure that it's easy to know if a project need increment version in a whole build. I'm gonna look if there are helpfull method in the plugin interface...
Jérémie
-
- CodeLite Veteran
- Posts: 69
- Joined: Fri Oct 24, 2008 10:29 pm
- Contact:
Re: VersionManager plugin
What if wxEVT_BUILD_STARTED included the project name as clientData?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: VersionManager plugin
If you get the builded project name, you still need to query the dependencies (project->GetDependencies())sdolim wrote:What if wxEVT_BUILD_STARTED included the project name as clientData?
Also, maybe adding a new event for wxEVT_BUILD_STARTED_PROJECT_ONLY --> since in this case, dependencies are skipped.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: VersionManager plugin
Tell me if I'm wrong : if I click on the build button, it will make the workspace, not the project.
So I think I'm gonna start this way : AutoIncrementBuild only for the active project (I know this is not pefect ).
So I think I'm gonna start this way : AutoIncrementBuild only for the active project (I know this is not pefect ).
Jérémie
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: VersionManager plugin
You are wrong.jfouche wrote:Tell me if I'm wrong : if I click on the build button, it will make the workspace, not the project.
Clicking the build button, builds the active project. If the project has dependencies, it will build them first (right click on the project and select 'Build Order' to view/edit the build order)
'project only' is when activated from 'project context menu -> project only -> build'
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: VersionManager plugin
I thought it was the worspace, because clicking on the build button show me :
which is the worspace makefile.
If I click on project only -> Build, i have :
which is the project makefile.
Well, I don't know where is the truth...
Code: Select all
"mingw32-make.exe" -j 1 -f "VersionManager_wsp.mk"
If I click on project only -> Build, i have :
Code: Select all
"mingw32-make.exe" -j 1 -f "VersionManager.mk"
Well, I don't know where is the truth...
Jérémie
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: VersionManager plugin
the "*_wsp.mk" makefile, is a very simple makefile which compiles each of the projects listed in the build order of the active project.
If you change the active project, the content of this makefile will be modified to suite the new project build order.
The truth is what I told you: Build button -> builds the active project along with all its dependencies.
Project only: compiles only that project excluding its dependencies.
You can build the entire workspace, from the workspace context menu ('Build workspace') option, this will build all projects even if they do not include in the build order of the active project
Eran
If you change the active project, the content of this makefile will be modified to suite the new project build order.
The truth is what I told you: Build button -> builds the active project along with all its dependencies.
Project only: compiles only that project excluding its dependencies.
You can build the entire workspace, from the workspace context menu ('Build workspace') option, this will build all projects even if they do not include in the build order of the active project
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: VersionManager plugin
Thank you Eran for your explanation
Here is a new version with some of your remarks.
FYI, I only configure the project for Windows Release.
Here is a new version with some of your remarks.
FYI, I only configure the project for Windows Release.
You do not have the required permissions to view the files attached to this post.
Jérémie