Notes for LibreCAD build:
Download sources and extract zip:
Make build folder and cd to it:
cd “/MyStuff/compiled_apps/LibreCAD-2.2.1.5”
mkdir build
cd build
Install Boost:
pkgman install boost1.91_devel
Find following:
#ifdef Q_OS_WIN
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <dbghelp.h>
# include <fcntl.h>
# include <io.h>
# include <process.h>
# include <sys/stat.h>
#else
# include <csignal>
# include <execinfo.h>
# include <fcntl.h>
# include <sys/types.h>
# include <unistd.h>
#endif
Change it to:
#ifdef Q_OS_WIN
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <dbghelp.h>
# include <fcntl.h>
# include <io.h>
# include <process.h>
# include <sys/stat.h>
#else
# include <csignal>
# ifndef Q_OS_HAIKU
# include <execinfo.h>
# endif
# include <fcntl.h>
# include <sys/types.h>
# include <unistd.h>
#endif
Find:
#if !defined(Q_OS_WIN)
char g_altStack[kAltStackSize];
#endif
Change it to:
#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
char g_altStack[kAltStackSize];
#endif
Find POSIX signal handler section and change:
#if !defined(Q_OS_WIN)
To:
#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
Close to end of the file find:
void LC_CrashHandler::install()
{
static std::once_flag once;
std::call_once(once, []() {
preparePath();
buildHeader();
std::set_terminate(&terminateHandler);
g_prevQtHandler = qInstallMessageHandler(&qtMessageHandler);
#ifdef Q_OS_WIN
installWindows();
void installPosix();
#endif
});
}
Change it to:
void LC_CrashHandler::install()
{
static std::once_flag once;
std::call_once(once, []() {
preparePath();
buildHeader();
std::set_terminate(&terminateHandler);
g_prevQtHandler = qInstallMessageHandler(&qtMessageHandler);
#ifdef Q_OS_WIN
installWindows();
#elif defined(Q_OS_HAIKU)
// Haiku: crash handler not implemented yet.
#else
void installPosix();
#endif
});
}
Run:
cmake ..
If okay, run:
make -j2
Test build:
./build/librecad -style Fusion
Why -style Fusion? Because of window scaling, without it bottom of window is outside screen..
