Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on June 03, 2013, 11:06:56 am

Title: prefer forward slash folder separator style (unix style) in cbp files?
Post by: ollydbg on June 03, 2013, 11:06:56 am
Ok with the below patch:
Code
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?
Title: Re: prefer forward slash folder seperator style (unix style) in cbp files?
Post by: oBFusCATed on June 03, 2013, 11:16:18 am
Doesn't matter, because in cb we don't share projects between oses.
Title: Re: prefer forward slash folder separator style (unix style) in cbp files?
Post by: ollydbg on June 03, 2013, 11:42:18 am
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:
Code
-				<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.
Title: Re: prefer forward slash folder separator style (unix style) in cbp files?
Post by: gd_on on June 03, 2013, 12:36:10 pm
Quote
Doesn'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
Title: Re: prefer forward slash folder separator style (unix style) in cbp files?
Post by: thomas on June 03, 2013, 05:04:54 pm
Well, since Windows is the only OS using backlashes, and the Win32 API functions silently translate forward slashes to backslashes, where's the problem?
Title: Re: prefer forward slash folder separator style (unix style) in cbp files?
Post by: Alpha on June 03, 2013, 05:23:16 pm
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).