Author Topic: patch for C::B in MacOSX10.8 and wxWidget2.8  (Read 6676 times)

Offline chice

  • Single posting newcomer
  • *
  • Posts: 6
patch for C::B in MacOSX10.8 and wxWidget2.8
« on: August 19, 2012, 06:18:54 pm »
Finally I successfully built C::B in MacOSX10.8 and wxWidget2.8 , got an "i386" app.
Not sure whether it works all correctly, but it does run :)

the patch is attached, including some wx2.9 refacting (but not complete)


steps:

1. download Xcode4.2.1 and extract MacOSX10.6 SDK to /Developer manually by 'tar -xvf xxxxxx'

2. build wxWidget 2.8

Code
#!/bin/sh
arch_flags="-arch i386"
../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" \
--disable-shared --enable-unicode \
--prefix="$(pwd)" \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6

3. build C::B with all plugins

apply the patch first. I hope the patch can be merged into trunk :)

you may need to install some third party packages like 'hunspell'
the 'brew install hunspell' only gets a x86_64 version,
so I used 'brew install --interactive hunspell' and modifid Makefiles to get a universal libhunspell

Code
arch_flags="-arch i386"

./configure --with-wx-config=/usr/local/bin/wx-config-2.8 --with-contrib-plugins=all \
CFLAGS="$arch_flags -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6" \
CXXFLAGS="$arch_flags -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6" \
CPPFLAGS="$arch_flags -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6" \
LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"

the bundle refers Step 3 in http://forums.codeblocks.org/index.php?topic=15108.0



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: patch for C::B in MacOSX10.8 and wxWidget2.8
« Reply #1 on: August 19, 2012, 06:32:44 pm »
The patch is not easy to review, because it mixes OSX 10.8 related stuf with wx2.9 related changes.

I'm  currently compiling (and fixing issues) the contrib-plugins with wx2.9 on linux.
Some of the changes you have in your patch are already in my working copy, so I know they are 2.9 related.

I will commit changes, if I'm sure they do not break wx2.8 and at least compile with wx2.9.
After the initial commit(s) (including project-, workspace- and automake-files for wx2.9) the fine-tuning (if needed can begin).

Offline chice

  • Single posting newcomer
  • *
  • Posts: 6
Re: patch for C::B in MacOSX10.8 and wxWidget2.8
« Reply #2 on: August 19, 2012, 07:11:59 pm »
This patch is based on OSX10.6, so I think there is no mix with OSX10.8

I just extracted the OSX10.6 SDK from an old Xcode dmg.

« Last Edit: August 19, 2012, 07:21:56 pm by chice »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: patch for C::B in MacOSX10.8 and wxWidget2.8
« Reply #3 on: August 19, 2012, 07:38:10 pm »
This patch is based on OSX10.6, so I think there is no mix with OSX10.8

I just extracted the OSX10.6 SDK from an old Xcode dmg.


The greatest part of your patch is wx2.9 related and common for all platforms, if I see correctly.

A smaller part is related to wx2.9 on OSX10.6.

I can test both here, and will commit the changes (and probably more) as soon as possible.