Add hacks to make it build on MacOS 12.3
you need to install icu4c in brew
This commit is contained in:
parent
c56a020781
commit
6cb2fb15eb
|
@ -13,7 +13,13 @@ isEmpty(APP_VERSION) {
|
||||||
APP_VERSION=1.0.8
|
APP_VERSION=1.0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macos: {
|
||||||
|
# This package needs to be installed via homebrew before we can compile it
|
||||||
|
INCLUDEPATH += \
|
||||||
|
/opt/homebrew/opt/icu4c/include
|
||||||
|
|
||||||
|
QT += gui-private
|
||||||
|
}
|
||||||
|
|
||||||
win32: VERSION = $${APP_VERSION}.0
|
win32: VERSION = $${APP_VERSION}.0
|
||||||
else: VERSION = $${APP_VERSION}
|
else: VERSION = $${APP_VERSION}
|
||||||
|
|
|
@ -52,7 +52,7 @@ SynEdit::SynEdit(QWidget *parent) : QAbstractScrollArea(parent),
|
||||||
mPainting = false;
|
mPainting = false;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
mFontDummy = QFont("Consolas",12);
|
mFontDummy = QFont("Consolas",12);
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
|
||||||
mFontDummy = QFont("terminal",14);
|
mFontDummy = QFont("terminal",14);
|
||||||
#else
|
#else
|
||||||
#error "Not supported!"
|
#error "Not supported!"
|
||||||
|
|
|
@ -185,15 +185,20 @@ QString Settings::Dirs::appResourceDir() const
|
||||||
return appDir();
|
return appDir();
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
return includeTrailingPathDelimiter(PREFIX)+"share/"+APP_NAME;
|
return includeTrailingPathDelimiter(PREFIX)+"share/"+APP_NAME;
|
||||||
|
#elif defined(Q_OS_MACOS)
|
||||||
|
return "";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString Settings::Dirs::appLibexecDir() const
|
QString Settings::Dirs::appLibexecDir() const
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
return appDir();
|
return appDir();
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
return includeTrailingPathDelimiter(PREFIX)+"libexec/"+APP_NAME;
|
return includeTrailingPathDelimiter(PREFIX)+"libexec/"+APP_NAME;
|
||||||
|
#elif defined(Q_OS_MACOS)
|
||||||
|
return "";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,21 @@
|
||||||
#define CLANG_PROGRAM "clang"
|
#define CLANG_PROGRAM "clang"
|
||||||
#define CLANG_CPP_PROGRAM "clang++"
|
#define CLANG_CPP_PROGRAM "clang++"
|
||||||
#define LLDB_MI_PROGRAM "lldb-mi"
|
#define LLDB_MI_PROGRAM "lldb-mi"
|
||||||
|
#elif defined(Q_OS_MACOS)
|
||||||
|
#define GCC_PROGRAM "gcc"
|
||||||
|
#define GPP_PROGRAM "g++"
|
||||||
|
#define GDB_PROGRAM "gdb"
|
||||||
|
#define GDB_SERVER_PROGRAM "gdbserver"
|
||||||
|
#define GDB32_PROGRAM "gdb32"
|
||||||
|
#define MAKE_PROGRAM "make"
|
||||||
|
#define WINDRES_PROGRAM ""
|
||||||
|
#define GPROF_PROGRAM "gprof"
|
||||||
|
#define CLEAN_PROGRAM "rm -rf"
|
||||||
|
#define CPP_PROGRAM "cpp"
|
||||||
|
#define GIT_PROGRAM "git"
|
||||||
|
#define CLANG_PROGRAM "clang"
|
||||||
|
#define CLANG_CPP_PROGRAM "clang++"
|
||||||
|
#define LLDB_MI_PROGRAM "lldb-mi"
|
||||||
#else
|
#else
|
||||||
#error "Only support windows and linux now!"
|
#error "Only support windows and linux now!"
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,7 +100,7 @@
|
||||||
# define DYNAMIC_LIB_EXT "dll"
|
# define DYNAMIC_LIB_EXT "dll"
|
||||||
# define MAKEFILE_NAME "makefile.win"
|
# define MAKEFILE_NAME "makefile.win"
|
||||||
# define ALL_FILE_WILDCARD "*.*"
|
# define ALL_FILE_WILDCARD "*.*"
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
|
||||||
# define PATH_SENSITIVITY Qt::CaseSensitive
|
# define PATH_SENSITIVITY Qt::CaseSensitive
|
||||||
# define PATH_SEPARATOR ":"
|
# define PATH_SEPARATOR ":"
|
||||||
# define LINE_BREAKER "\n"
|
# define LINE_BREAKER "\n"
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
#include <QSvgRenderer>
|
#include <QSvgRenderer>
|
||||||
#include "../settings.h"
|
#include "../settings.h"
|
||||||
|
|
||||||
|
#if defined(Q_OS_MACX)
|
||||||
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
#include <QtGui/qpa/qplatformtheme.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BEGIN_STYLE_PIXMAPCACHE(a) \
|
#define BEGIN_STYLE_PIXMAPCACHE(a) \
|
||||||
QRect rect = option->rect; \
|
QRect rect = option->rect; \
|
||||||
QPixmap internalPixmapCache; \
|
QPixmap internalPixmapCache; \
|
||||||
|
|
|
@ -10,7 +10,7 @@ SUBDIRS += \
|
||||||
redpanda-win-git-askpass
|
redpanda-win-git-askpass
|
||||||
}
|
}
|
||||||
|
|
||||||
linux: {
|
macos,linux: {
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
redpanda-git-askpass
|
redpanda-git-askpass
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,15 @@ SOURCES += \
|
||||||
unix: {
|
unix: {
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.unix.cpp
|
main.unix.cpp
|
||||||
LIBS+= \
|
|
||||||
-lrt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# macOS does not provide rt library, only use it for Linux
|
||||||
|
linux: {
|
||||||
|
LIBS+= \
|
||||||
|
-lrt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CONFIG += lrelease
|
CONFIG += lrelease
|
||||||
CONFIG += embed_translations
|
CONFIG += embed_translations
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,9 @@ int ExecuteCommand(vector<string>& command,bool reInp) {
|
||||||
if (result) {
|
if (result) {
|
||||||
printf("Failed to start command %s %s!\n",path_to_command.c_str(), file.c_str());
|
printf("Failed to start command %s %s!\n",path_to_command.c_str(), file.c_str());
|
||||||
printf("errno %d: %s\n",errno,strerror(errno));
|
printf("errno %d: %s\n",errno,strerror(errno));
|
||||||
printf("current dir: %s",get_current_dir_name());
|
char* current_dir = getcwd(nullptr, 0);
|
||||||
|
printf("current dir: %s",current_dir);
|
||||||
|
free(current_dir);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue