News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

prefer forward slash folder separator style (unix style) in cbp files?

Started by ollydbg, June 03, 2013, 11:06:56 AM

Previous topic - Next topic

ollydbg

Ok with the below patch:

Index: E:/code/cb/cb_trunk_sf/src/plugins/contrib/wxSmithPlot/wxsSmithPlot.cbp
===================================================================
--- E:/code/cb/cb_trunk_sf/src/plugins/contrib/wxSmithPlot/wxsSmithPlot.cbp (revision 9132)
+++ E:/code/cb/cb_trunk_sf/src/plugins/contrib/wxSmithPlot/wxsSmithPlot.cbp (working copy)
@@ -7,33 +7,34 @@
<Option compiler="gcc" />
<Build>
<Target title="MathPlot">
- <Option output="..\..\..\devel\libMathPlot" prefix_auto="1" extension_auto="1" />
+ <Option output="../../../devel/MathPlot" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
- <Option object_output="..\..\..\.objs\plugins\contrib\wxSmithPlot\MathPlot" />
+ <Option object_output="../../../.objs/plugins/contrib/wxSmithPlot/MathPlot" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
</Target>
<Target title="wxSmithPlot">
<Option platforms="Windows;" />
- <Option output="..\..\..\devel\share\codeblocks\plugins\wxSmithPlot" prefix_auto="0" extension_auto="1" />
- <Option working_dir="..\..\..\devel" />
- <Option object_output="..\..\..\.objs\plugins\contrib\wxSmithPlot" />
+ <Option output="../../../devel/share/codeblocks/plugins/wxSmithPlot" prefix_auto="0" extension_auto="1" />
+ <Option working_dir="../../../devel" />
+ <Option object_output="../../../.objs/plugins/contrib/wxSmithPlot" />
<Option type="3" />
<Option compiler="gcc" />
<Option parameters="--debug-log -na -ns -nd" />
<Option host_application="codeblocks.exe" />
+ <Option run_host_application_in_terminal="0" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-DBUILDING_PLUGIN" />
<Add option="-DcbDEBUG" />
<Add option="-DCB_PRECOMP" />
- <Add directory="..\..\..\include" />
- <Add directory="..\..\..\sdk\wxscintilla\include" />
- <Add directory="..\..\..\sdk\wxpropgrid\include" />
- <Add directory="..\wxSmith\properties" />
- <Add directory="..\wxSmith\wxwidgets" />
- <Add directory="..\wxSmith\wxwidgets\properties" />
+ <Add directory="../../../include" />
+ <Add directory="../../../sdk/wxscintilla/include" />
+ <Add directory="../../../sdk/wxpropgrid/include" />
+ <Add directory="../wxSmith/properties" />
+ <Add directory="../wxSmith/wxwidgets" />
+ <Add directory="../wxSmith/wxwidgets/properties" />
<Add directory="images" />
</Compiler>
<Linker>
@@ -41,7 +42,7 @@
<Add library="wxsmithlib" />
<Add library="codeblocks" />
<Add library="wxpropgrid" />
- <Add directory="..\..\..\devel" />
+ <Add directory="../../../devel" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\wxSmithPlot.zip manifest.xml" />
@@ -70,7 +71,7 @@
<Add option="-DWX_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#wx.include)" />
- <Add directory="$(#wx.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
+ <Add directory="$(#wx.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
<Add directory="." />
</Compiler>
<Linker>
@@ -78,30 +79,30 @@
<Add option="-Wl,--export-all-symbols" />
<Add option="-Wl,--enable-auto-import" />
<Add library="wxmsw28$(WX_SUFFIX)" />
- <Add directory="$(#wx.lib)\gcc_dll$(WX_CFG)" />
+ <Add directory="$(#wx.lib)/gcc_dll$(WX_CFG)" />
</Linker>
- <Unit filename="images\axis16.xpm">
+ <Unit filename="images/axis16.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\axis32.xpm">
+ <Unit filename="images/axis32.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\marker16.xpm">
+ <Unit filename="images/marker16.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\marker32.xpm">
+ <Unit filename="images/marker32.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\plot16.xpm">
+ <Unit filename="images/plot16.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\plot32.xpm">
+ <Unit filename="images/plot32.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\vector16.xpm">
+ <Unit filename="images/vector16.xpm">
<Option target="wxSmithPlot" />
</Unit>
- <Unit filename="images\vector32.xpm">
+ <Unit filename="images/vector32.xpm">
<Option target="wxSmithPlot" />
</Unit>
<Unit filename="manifest.xml">



No functional change, but we should forward slash in cbp 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.

oBFusCATed

Doesn't matter, because in cb we don't share projects between oses.
(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!]

ollydbg

I see most cbp files in CB sources (For Windows C::B project) use unix style folder separator.
Maybe, Morten can say some thing on this.

I see another change is:

- <Option output="..\..\..\devel\libMathPlot" prefix_auto="1" extension_auto="1" />
+ <Option output="../../../devel/MathPlot" prefix_auto="1" extension_auto="1" />

I also see it does not cause any issue.
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.

gd_on

QuoteDoesn't matter, because in cb we don't share projects between oses.

For me it's important that .cbp files uses forward or back slashes indifferently. I have some big projects (and workspaces) that I compile on Linux and Windows : so, it's a nice thing to be able to use exactly the same .cbp file on both OSes.

gd_on
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

thomas

Well, since Windows is the only OS using backlashes, and the Win32 API functions silently translate forward slashes to backslashes, where's the problem?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Alpha

Code::Blocks (newer than 10.05) saves all paths in the .cbp as Unix style (for all OS's).  On Windows, the Unix style paths are converted to Windows style on load (and back to Unix on save).