Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Release 16.01 for Mac
dkulp:
--- Quote from: Easior Lars on February 03, 2016, 08:02:56 am ---
Hi, Dan! I have made another try to build CB on Mac OS by merging your patches into CB source tree. My steps are as follows:
--- Code: (bash) ---$ git clone https://github.com/wxWidgets/wxWidgets.git -b WX_3_0_BRANCH --depth=1
$ cd wxWidgets
$ mkdir cocoabuild && cd cocoabuild
$ ../configure --enable-monolithic --with-macosx-version-min=10.7 --enable-debug=no --with-cocoa CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" CPPFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++" CXX=clang++ CXXCPP="clang++ -E" CC=clang CPP="clang -E" --enable-shared --enable-unicode --enable-threads --without-subdirs
$ make
--- End code ---
then do some patches and bootstrap CB by CB.
--- End quote ---
If you plan on making a binary that will actually look great on a Retina display, you'll need my fixes to wxWidgets. They are in my fork of wxWidgets:
https://github.com/dkulp/wxWidgets
on the WX_3_0_BRANCH branch there. I've submitted pull requests back, but they haven't applied them yet.
That said, we also need to add some flags to the Info.plist:
--- Code: ---<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
--- End code ---
to turn on support. Your binary isn't allowing it to use the retina display resolution.
--- Quote ---The binary file is located at
https://fedorapeople.org/~easior/CodeBlocks-Mac-16.1-r1.tar.bz2.
I found that some bugs are fixed, e.g. changing font size in CB Editor does not make CB crash. However, my binary file is full of bugs. For examples:
* mouse scrolling in CB Editor with some source codes will make CB crashed;
* Compiler plugin does not work well because the build target of project to build is not displayed on compiler toolbar.
The attachment is the patch which have been merged together.
--- End quote ---
I don't build anything from with CB, I pretty much just use it for wxSmith. The scrolling crash looks like it's in Scintilla which I know nothing about.
I stuck a new binary up at:
http://dankulp.com/xlights/CodeBlocks-MAC-16.1.tar.gz
that I build from the command line and should be retina ready.
Easior Lars:
--- Quote from: dkulp on February 03, 2016, 08:29:06 pm ---They are in my fork of wxWidgets:
https://github.com/dkulp/wxWidgets
on the WX_3_0_BRANCH branch there. I've submitted pull requests back, but they haven't applied them yet.
--- End quote ---
Your branch can't be compiled on My Mac, for
--- Code: (bash) ---../src/osx/cocoa/window.mm:514:50: warning: 'convertBaseToScreen:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectToScreen: instead [-Wdeprecated-declarations]
locationInWindow = [[nsEvent window] convertBaseToScreen:locationInWindow];
^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:661:1: note: 'convertBaseToScreen:' has been explicitly marked deprecated here
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectToScreen: instead")));
^
../src/osx/cocoa/window.mm:517:52: warning: 'convertScreenToBase:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectFromScreen: instead [-Wdeprecated-declarations]
locationInWindow = [[m_osxView window] convertScreenToBase:locationInWindow];
^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:662:1: note: 'convertScreenToBase:' has been explicitly marked deprecated here
- (NSPoint)convertScreenToBase:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectFromScreen: instead")));
^
../src/osx/cocoa/window.mm:2439:46: error: use of undeclared identifier 'NSTextAlignmentCenter'
[paragraphStyle setAlignment:NSTextAlignmentCenter];
^
../src/osx/cocoa/window.mm:2461:24: warning: 'NSView' may not respond to 'setAttributedTitle:'
[m_osxView setAttributedTitle:attrString];
~~~~~~~~~ ^
../src/osx/cocoa/window.mm:2886:40: warning: 'convertScreenToBase:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectFromScreen: instead [-Wdeprecated-declarations]
location = [[m_osxView window] convertScreenToBase:location];
^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:662:1: note: 'convertScreenToBase:' has been explicitly marked deprecated here
- (NSPoint)convertScreenToBase:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectFromScreen: instead")));
^
4 warnings and 1 error generated.
make: *** [monodll_osx_cocoa_window.o] Error 1
--- End code ---
Could you fix it?
--- Quote ---The scrolling crash looks like it's in Scintilla which I know nothing about.
--- End quote ---
Hi, Dan! Could you share any experiences on how to debug the CB binary? Is there any effective debugging tool to be recommended?
--- Quote ---I stuck a new binary up at:
http://dankulp.com/xlights/CodeBlocks-MAC-16.1.tar.gz
--- End quote ---
Unfortunately, Your binary also has a bug. It will crash if you open a c++ source code and format it by choosing format use astyle in a popup menu with right mouse clicking.
Easior Lars:
I made another build which is more stable than ever. However, new completion plugin does not still work well. The following attachments are the recently crashing report.
MortenMacFly:
--- Quote from: Easior Lars on February 06, 2016, 05:47:39 am ---I made another build which is more stable than ever.
--- End quote ---
...where?! :-)
--- Quote from: Easior Lars on February 06, 2016, 05:47:39 am ---The following attachments are the recently crashing report.
--- End quote ---
Did you strip the sources? Because all lines are missing. For the development on the Mac you should not strip anything. This will help to track down the errors.
MortenMacFly:
...wrt the patch you kindly provided: The method:
m_Bitmap->CreateScaled
...is not available on wx2.8.x. Therefore the build will be broken with that version. You'll need to wrap this into a wxCHECK_VERSION or alike.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version