On WXGTK there are two "base = ...". The first one it is failed on my compilation on OSX/GTK/X11.
I've commented it to avoid the error (in fact can be a "forgotten" line, ain't? )
if CODEBLOCKS_LINUX
AM_CPPFLAGS = -DENABLE_BINRELOC -DAPP_PREFIX="\"@prefix@\""
endif
I suppose that binreloc should work on MAC (OS X is called Darwin and it is BSD with a nice GUI and JFS, basically).
My question is: one of the lines of "base = ... " must be removed (in fact, the first line is not used.....)
// SELFPATH is a macro from prefix.h (binreloc)
// it returns the absolute filename of us
// similar to win32 GetModuleFileName()...
base = wxString(SELFPATH,wxConvUTF8);
base = wxFileName(base).GetPath();
base = wxFileName(wxString(SELFPATH,wxConvUTF8)).GetPath();
I don't have __WXMAC__ defined because C::B requires wxPopuWindow and that wxClass is not supported by WXMAC, so, I'm using fink and I compile wxWidgets with GTK. So i'm defining "WXGTK".
First I want to have a C::B working right (I probed the PPC version, but it have a lot of problems with the window layout).
And then to begin to work with WXMAC.
Index: src/sdk/infowindow.cpp
===================================================================
--- src/sdk/infowindow.cpp (revision 2750)
+++ src/sdk/infowindow.cpp (working copy)
@@ -8,7 +8,14 @@
#include "manager.h"
#endif
+// --------------------------------------------------------------------------
+// wxMAC has no support for wxPopupWindow, use wxMiniFrame instead
+// --------------------------------------------------------------------------
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+BEGIN_EVENT_TABLE(InfoWindow, wxMiniFrame)
+#else
BEGIN_EVENT_TABLE(InfoWindow, wxPopupWindow)
+#endif
EVT_TIMER(-1, InfoWindow::OnTimer)
EVT_MOTION(InfoWindow::OnMove)
EVT_LEFT_DOWN(InfoWindow::OnClick)
@@ -116,7 +123,13 @@
InfoWindow::InfoWindow(const wxString& title, const wxString& message, unsigned int delay, unsigned int hysteresis)
+ #if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+ #warning "Testing wxMac wxMiniFrame substitution for wxPopupWindow"\
+ " because the _TEST_MINIFRAME_ option was specified"
+ : wxMiniFrame(Manager::Get()->GetAppWindow(), -1, _T(""), wxDefaultPosition, wxDefaultSize, 0),
+ #else
: wxPopupWindow(Manager::Get()->GetAppWindow(), wxSIMPLE_BORDER | wxWS_EX_TRANSIENT | wxCLIP_CHILDREN),
+ #endif
m_timer(new wxTimer(this, 0)), status(0), m_delay(delay), ks(2)
{
wxBoxSizer *bs = new wxBoxSizer(wxVERTICAL);
@@ -225,4 +238,3 @@
status = 3;
m_timer->Start(scroll_millis, false);
}
-
Index: src/sdk/infowindow.h
===================================================================
--- src/sdk/infowindow.h (revision 2750)
+++ src/sdk/infowindow.h (working copy)
@@ -16,8 +16,16 @@
#include <wx/event.h>
#include <wx/timer.h>
#include <wx/string.h>
-#include <wx/popupwin.h>
+//-----------------------------------------------------------------------------
+// There is no wxPopupWindows for wxMac, use wxMiniFrame instead
+//-----------------------------------------------------------------------------
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+ #include <wx/minifram.h>
+#else
+ #include <wx/popupwin.h>
+#endif
+
#undef new
#include <list>
#include <algorithm>
@@ -48,7 +56,11 @@
};
};
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+class InfoWindow : public wxMiniFrame
+#else
class InfoWindow : public wxPopupWindow
+#endif
{
wxTimer *m_timer;
int left;
@@ -71,7 +83,8 @@
public:
- static void Display(const wxString& title, const wxString& message, unsigned int delay = 5000, unsigned int hysteresis = 1){new InfoWindow(title, message, delay, hysteresis);};
+ static void Display(const wxString& title, const wxString& message, unsigned int delay = 5000, unsigned int hysteresis = 1)
+ {new InfoWindow(title, message, delay, hysteresis);};
};
#endif
Index: src/sdk/pluginmanager.cpp
===================================================================
--- src/sdk/pluginmanager.cpp (revision 2750)
+++ src/sdk/pluginmanager.cpp (working copy)
@@ -106,6 +106,14 @@
ok = dir.GetNext(&filename);
}
Manager::Get()->GetMessageManager()->Log(_("Found %d plugins"), count);
+ #if defined(_TEST_MINIFRAME_)
+ {
+ InfoWindow::Display(_("Testing"),
+ _("This is a test of wxMiniFrame.\n"
+ "Used on the Mac to substitute for wxPopupWindow:\n"),
+ 15000, 3000);
+ }
+ #endif
if (!failed.IsEmpty())
{
InfoWindow::Display(_("Warning"),
wxMac supports a "form" of popup window that will work with CodeBlocks.I was going to say "wow, you're genious", when I changed it to use wxMiniFrame regardless of the OS (as it should work fine for Windows and Linux, too).
It's called "miniframe". You can pick it out of the following patch.
QuotewxMac supports a "form" of popup window that will work with CodeBlocks.I was going to say "wow, you're genious", when I changed it to use wxMiniFrame regardless of the OS (as it should work fine for Windows and Linux, too).
It's called "miniframe". You can pick it out of the following patch.
However, wxMiniFrame draws behind the Windows taskbar, so it is only partially visible :(
Any ideas on how to solve this? Well, anything apart from moving it up by the taskbar's height... :)
Trying your solution with the wx comming with Tiger....
QuotewxMac supports a "form" of popup window that will work with CodeBlocks.I was going to say "wow, you're genious", when I changed it to use wxMiniFrame regardless of the OS (as it should work fine for Windows and Linux, too).
It's called "miniframe". You can pick it out of the following patch.
However, wxMiniFrame draws behind the Windows taskbar, so it is only partially visible :(
Any ideas on how to solve this? Well, anything apart from moving it up by the taskbar's height... :)
I've compiled wxWdigets 2.6.3 patch2.
Ok.
But I'm having that problem:
g++ -dynamiclib -single_module -flat_namespace -undefined suppress -o .libs/libcodeblocks.0.dylib .libs/annoyingdialog.o .libs/autodetectcompilers.o .libs/base64.o .libs/blockallocated.o .libs/cbexception.o .libs/cbeditor.o
<...snip...>
make: *** [all] Error 2
It seems as if a shared lib and a static lib was introducing the same symbols. I must to investigate this.
Thx!
Hi All:
The problem I have to generate C::B at OSX is related with libraries:
Compilation fails when it tries to link the library libcodeblocks.la . The problem is with the libaries created in the directory src/sdk/scripting.
I launched the linking command line in a shell, and I was removing that libraries from the command line...as result was a library (not right, I know), but the compiler finished the linking process.
I'm not an expert on MAC OS X (I'm learning now), any idea????
ld: multiple definitions of symbol ___divdi3
/usr/lib/gcc/i686-apple-darwin8/4.0.1/libgcc.a(_divdi3.o) private external definition of ___divdi3 in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_divdi3_s.o) definition of ___divdi3