Author Topic: Team cross-platform development with Code::Blocks?  (Read 18194 times)

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Team cross-platform development with Code::Blocks?
« Reply #15 on: September 04, 2008, 11:42:24 am »
BUT... unfortunately, I need additional _manual_ editings of .cbp file to get all this work fine...
Huh? I don't get this. ALL parameters in a project file are configurable via the project / target settings. What exactly do you modify in the cbp file by hand?
I created project in windows and then I added new build target under Linux. I edited compiler parameters for new target to make them suitable for Linux. And... In .cbp file, in common to all targets sections you can see:
Code
- <Compiler>
  <Add option="-pipe" />
  <Add option="-mthreads" />
  <Add option="-D__GNUWIN32__" />
  <Add option="-D__WXMSW__" />
Of course, in Linux, this constructions make error, so I need to move this options to windows-only compiler options for each target...
This is _manual_ editing... How to make cross projects without manual editing of .cbp?
Please, make HOWTO...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Team cross-platform development with Code::Blocks?
« Reply #16 on: September 04, 2008, 03:39:10 pm »
This is _manual_ editing...
I believe we have a different understanding of "manual editing". So let me ask more precise:
Do you use C::B only to setup the project options using the setup dialog of C::B or...
...do you open the CBP file directly in an editor (whatever editor) and paste XML nodes into it?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Team cross-platform development with Code::Blocks?
« Reply #17 on: September 04, 2008, 08:13:36 pm »
This is _manual_ editing...
I believe we have a different understanding of "manual editing". So let me ask more precise:
Do you use C::B only to setup the project options using the setup dialog of C::B or...
...do you open the CBP file directly in an editor (whatever editor) and paste XML nodes into it?
Yes, I use editor and write necessary XML nodes... This is _without C::B_ (unfortunately) =(

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Team cross-platform development with Code::Blocks?
« Reply #18 on: September 10, 2008, 11:25:04 pm »
I did it!!! ONE project file for several platforms! Bit this operation need direct manual editings of XML nodes in .cbp file...
Well, I have some friends and they are interested in crossplatform developing with code:blocks and wxWidgets instead plain win32, but they will _not_ use it if it's so complex to create cross projects...
Friends! Victory of cross development IDE c::b is very close... ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Team cross-platform development with Code::Blocks?
« Reply #19 on: September 11, 2008, 09:31:00 am »
Yes, I use editor and write necessary XML nodes... This is _without C::B_ (unfortunately) =(
Please show me the nodes you are adding / modifying manually and I show you where the UI counterpart is. As I said: *All* settings are available via the UI options.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Team cross-platform development with Code::Blocks?
« Reply #20 on: September 11, 2008, 10:39:50 am »
Yes, I use editor and write necessary XML nodes... This is _without C::B_ (unfortunately) =(
Please show me the nodes you are adding / modifying manually and I show you where the UI counterpart is. As I said: *All* settings are available via the UI options.
I created project under windows.
Moved from common part of .cbp to windows target this text:
  <Add option="-mthreads" />
  <Add option="-D__GNUWIN32__" />
  <Add option="-D__WXMSW__" />
  <Add option="-DWXUSINGDLL" />
  <Add option="-DwxUSE_UNICODE" />
...
  <Add directory="$(#wx)/include" />
  <Add directory="$(#wx)/contrib/include" />
  </Compiler>
- <ResourceCompiler>
  <Add directory="$(#wx)/lib/gcc_dll/mswu" />
  <Add directory="$(#wx)/include" />
  </ResourceCompiler>
- <Linker>
  <Add option="-s" />
  <Add library="libwxmsw28u.a" />
  <Add directory="$(#wx)/lib/gcc_dll" />
  </Linker>
And some other windows-cpecific parts...
Then I created separate project in Linux and moved Linux-specific options from this additional project...
- <Compiler>
  <Add option="-g" />
  <Add option="`wx-config --cflags`" />
  <Add option="-Wall" />
  </Compiler>
- <Linker>
  <Add option="`wx-config --libs`" />
  </Linker>

So, as you can see, if project creation wizard creating project it makes it NON-crosplatform... You need manual editing, and it is NOT convenient and not acceptable for many developers, it's ok only for me...

AND even if you can do this in c::b GUI, I think it is not normal to do this manually, this must be done to be automatically...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Team cross-platform development with Code::Blocks?
« Reply #21 on: September 11, 2008, 11:13:14 am »
So, as you can see, if project creation wizard creating project it makes it NON-crosplatform...
So - that's your actual problem. So why don't you just adjust the wizard? It's very simple! And that would be the *right* way to do.

AND even if you can do this in c::b GUI, I think it is not normal to do this manually
I don't think so. You can easily copy whole settings from the project level to a target level. This is usually one mouse click with an "OK". If that is too much work for you... OK - do it manually.

All I wanted to know if we are missing something in the UI but we don't.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Team cross-platform development with Code::Blocks?
« Reply #22 on: September 11, 2008, 11:30:15 am »
All I wanted to know if we are missing something in the UI but we don't.
You are developer of c::b? Please, explain me how to "adjust wizard" (I cant see platforms selection in wizard), how to copy "from project level to target level"??? I'ill write micro-howto about this topic... Then, I hope, I will try to add crossplatform wizard for c::b...
Anyway, thank you for nice IDE and your work and help :)
Probably it's very simple, BUT it's not intuitively clear now... Please... =(
NOTE: I use 8.02 release - probably new functionality is added to source-code... May be I shold try it?
« Last Edit: September 11, 2008, 11:33:17 am by tuXXX »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Team cross-platform development with Code::Blocks?
« Reply #23 on: September 11, 2008, 01:27:26 pm »
Please, explain me how to "adjust wizard"
- Menu File -> New -> Project
- Select wizard you want to adopt
- Right click -> select "Edit this script".

A lot information about scripting you'll find in the C::B WiKi. Have a look at other wizards as examples, too.

how to copy "from project level to target level"???
- Right click on the project, select "Build options..."
a) Choose the project in the tree on the left if you want to copy from project- to target level
b) Choose the target in the tree on the left if you want to copy from target- to project level
- Choose the page whose options you want to copy (e.g. Linker settings)
- For the options relevant you'll find a "Copy selected to..." or "Copy all to..." button on the bottom.

Notice that this ability makes no sense for some options. This is due to the fact that a project can have a different compiler as the target and/or targets can have different compilers, too.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

elguerrito

  • Guest
Re: Team cross-platform development with Code::Blocks?
« Reply #24 on: July 11, 2009, 09:17:49 pm »
So I would prefer (once asked the script project guru) to have a project wizard which creates the 4 targets, when done automatically I think I will be much clearer to the user and who knows what kind of defines might need to be added later on in platform a but not in platform b [you would always have to start scripting] or when you create projects where on platform a you need a special file A and on platform b you should not use file A but file B. Will be harder to maintain.

Sorry for the delay. But unfortunately I don't get much time to code nowadays. I am redesigning the wizard to some extent. This is how it looks right now.



But the coding is not complete yet.

Hi Biplab,

I'm fairly new to codeblocks and I ran into the same issues concerning a multiplatform project and tweaked/adjusted the project file so I can have linux and windows build targets inside the same project. I was thinking about playing with the wxwidgets project wizard and eventually share the changes, but I saw your forum entry with the screenshots that shows the multiplatform build targets inside the (new) wizard. Is this new and improved wxwidgets wizard going to be available at some time?

Thanks a lot for your time and effort at making our lives that much easier :)  As soon as I get the hang of it I'll join the effort and contribute any way I can.