Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Announcing cbvcs
stahta01:
Patch to add ability to Compile for Windows in same project file.
Based on project of another poster to this thread. I think it was Cryogen project file.
Tim S.
--- Code: ---Index: cbvcs.cbp
===================================================================
--- cbvcs.cbp (revision 6)
+++ cbvcs.cbp (working copy)
@@ -6,7 +6,8 @@
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
- <Target title="default">
+ <Target title="Linux">
+ <Option platforms="Unix;Mac;" />
<Option output="cbvcs" prefix_auto="1" extension_auto="1" />
<Option type="3" />
<Option compiler="gcc" />
@@ -25,7 +26,62 @@
<Add after="zip -j9 cbvcs.cbplugin cbvcs.so cbvcs.zip" />
</ExtraCommands>
</Target>
+ <Target title="Win32">
+ <Option platforms="Windows;" />
+ <Option output="..\..\..\devel\share\CodeBlocks\plugins\cbvcs" prefix_auto="1" extension_auto="1" />
+ <Option object_output="..\..\..\.objs\plugins\contrib\cbvcs" />
+ <Option type="3" />
+ <Option compiler="gcc" />
+ <Option parameters="--debug-log --multiple-instance --no-check-associations -ns -nd" />
+ <Option host_application="..\..\..\devel\codeblocks.exe" />
+ <Compiler>
+ <Add option="-g" />
+ <Add option="-pipe" />
+ <Add option="-mthreads" />
+ <Add option="-fmessage-length=0" />
+ <Add option="-fexceptions" />
+ <Add option="-Winvalid-pch" />
+ <Add option='-include "pch.h"' />
+ <Add option="-DBUILDING_PLUGIN" />
+ <Add option="-DHAVE_W32API_H" />
+ <Add option="-D__WXMSW__" />
+ <Add option="-DWXUSINGDLL" />
+ <Add option="-DcbDEBUG" />
+ <Add option="-DCB_PRECOMP" />
+ <Add option="-DWX_PRECOMP" />
+ <Add option="-DwxUSE_UNICODE" />
+ <Add directory="..\..\..\include" />
+ <Add directory="..\..\..\sdk\wxscintilla\include" />
+ <Add directory="$(#wx.include)" />
+ <Add directory="$(#wx.lib)" />
+ <Add directory="$(#wx.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="$(#wx.include)" />
+ </ResourceCompiler>
+ <Linker>
+ <Add option="-Wl,--enable-auto-import" />
+ <Add option="-mthreads" />
+ <Add library="codeblocks" />
+ <Add library="wxmsw$(WX_VERSION)$(WX_SUFFIX)" />
+ <Add directory="..\..\..\devel" />
+ <Add directory="$(#wx.lib)" />
+ <Add directory="$(#wx.lib)\gcc_dll$(WX_CFG)" />
+ </Linker>
+ <ExtraCommands>
+ <Add after="zip -j9 ..\..\..\devel\share\codeblocks\cbvcs.zip manifest.xml" />
+ <Mode after="always" />
+ </ExtraCommands>
+ <Environment>
+ <Variable name="WX_SUFFIX" value="u" />
+ <Variable name="WX_VERSION" value="28" />
+ <Variable name="WX_CFG" value="" />
+ </Environment>
+ </Target>
</Build>
+ <VirtualTargets>
+ <Add alias="All" targets="Linux;Win32;" />
+ </VirtualTargets>
<Unit filename="CommitMsgDialog.cpp" />
<Unit filename="CommitMsgDialog.h" />
<Unit filename="IVersionControlSystem.cpp" />
--- End code ---
dushara:
--- Quote ---Patch to add ability to Compile for Windows in same project file.
Based on project of another poster to this thread. I think it was Cryogen project file.
--- End quote ---
Hi thanks for the patch.
I've merged it to the trunk along with a major refactoring of the code. There are some unit tests with a coverage util (lcov).
Now I can start looking at renaming files. Need some suggestions on this one. The issue is renaming a file requires the file to be renamed in the project as well. Which means the project needs to be saved to capture the name change. 2 problems come to mind:
* The user may not want the project to be saved (can't think why but there may be because of other changes to the project as well)
* Renaming (on disk) and saving the project is a 2 step process which if interrupted can leave the project file and working directory out of sync. Ok granted the project tree will indicate missing files, but is this good enough?
Any thoughts?
ptDev:
I tested cbvcs and came across one bug: right-clicking on "workspace", while the workspace is empty, in the project explorer causes a crash.
Cryogen:
--- Quote from: dushara on March 05, 2011, 01:32:29 pm ---
--- Quote ---Patch to add ability to Compile for Windows in same project file.
Based on project of another poster to this thread. I think it was Cryogen project file.
--- End quote ---
Hi thanks for the patch.
--- End quote ---
This is not the standard way that contrib projects are organised, or I'd have done it that way. It also generates warnings for the project that doesn't apply to the system in use, which are undesirable. I'd suggest not doing this.
--- Quote from: dushara on March 05, 2011, 01:32:29 pm ---I've merged it to the trunk along with a major refactoring of the code. There are some unit tests with a coverage util (lcov).
Now I can start looking at renaming files. Need some suggestions on this one. The issue is renaming a file requires the file to be renamed in the project as well. Which means the project needs to be saved to capture the name change. 2 problems come to mind:
* The user may not want the project to be saved (can't think why but there may be because of other changes to the project as well)
* Renaming (on disk) and saving the project is a 2 step process which if interrupted can leave the project file and working directory out of sync. Ok granted the project tree will indicate missing files, but is this good enough?
Any thoughts?
--- End quote ---
That's true of most operations if they're interrupted. Certainly worth consideration but I can't immediately think of a way to do any better.
Cheers.
--- Quote from: dushara on March 05, 2011, 01:32:29 pm ---
--- End quote ---
dushara:
--- Quote from: Cryogen on March 09, 2011, 12:57:02 am ---
--- Quote from: dushara on March 05, 2011, 01:32:29 pm ---
--- Quote ---Patch to add ability to Compile for Windows in same project file.
Based on project of another poster to this thread. I think it was Cryogen project file.
--- End quote ---
Hi thanks for the patch.
--- End quote ---
This is not the standard way that contrib projects are organised, or I'd have done it that way. It also generates warnings for the project that doesn't apply to the system in use, which are undesirable. I'd suggest not doing this.
--- End quote ---
Fair enough. But I think I'll go with it for now. That way I need to manage only one project when adding/renaming source files etc. I'll keep it as the master and generate individual projects (the way you did) off it.
Navigation
[0] Message Index
[*] Previous page
Go to full version