mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-04 06:54:41 -04:00
OSX .app compiles but with runtime dylib errors
Regular binary compilation works, manual wxWidgets compile required for app (port version doesn’t work for me). Fixed-up app has runtime errors with dylib files but otherwise verifies…
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#define OPENGL
|
||||
|
||||
#include "CubicSDRDefs.h"
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
@@ -13,9 +15,25 @@
|
||||
#include "CubicSDR.h"
|
||||
#include "AppFrame.h"
|
||||
|
||||
#ifdef _OSX_APP_
|
||||
#include "CoreFoundation/CoreFoundation.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_APP(CubicSDR)
|
||||
|
||||
bool CubicSDR::OnInit() {
|
||||
#ifdef _OSX_APP_
|
||||
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||
char path[PATH_MAX];
|
||||
if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
|
||||
{
|
||||
// error!
|
||||
}
|
||||
CFRelease(resourcesURL);
|
||||
chdir(path);
|
||||
#endif
|
||||
|
||||
if (!wxApp::OnInit())
|
||||
return false;
|
||||
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/thread.h"
|
||||
|
||||
#include "AudioThread.h"
|
||||
#include "ThreadQueue.h"
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/thread.h"
|
||||
|
||||
#include "liquid/liquid.h"
|
||||
#include "AudioThread.h"
|
||||
|
||||
@@ -2,15 +2,8 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
#include "rtl-sdr.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/thread.h"
|
||||
|
||||
#include "ThreadQueue.h"
|
||||
#include "DemodulatorMgr.h"
|
||||
|
||||
|
||||
@@ -39,15 +39,13 @@ void PrimaryGLContext::CheckGLError() {
|
||||
return;
|
||||
|
||||
if (err == errLast) {
|
||||
wxLogError
|
||||
(wxT("OpenGL error state couldn't be reset."));
|
||||
std::cout << "OpenGL error state couldn't be reset." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
errLast = err;
|
||||
|
||||
wxLogError
|
||||
(wxT("OpenGL error %d"), err);
|
||||
std::cout << "OpenGL Error " << err << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user