diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index e01cde8..9eb1149 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -188,8 +188,12 @@ elseif(BUILD_ENV_APPLE) elseif(BUILD_ENV_UNIXLIKE) # Needed for correct Qt detection cmake_minimum_required(VERSION 2.8.12) + set(PRELOAD_VARIABLE "LD_LIBRARY_PATH") if(CMAKE_SYSTEM_NAME MATCHES "Linux") add_definitions(-DLINUX) + elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku") + add_definitions(-DHAIKU) + set(PRELOAD_VARIABLE "LIBRARY_PATH") elseif(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$|DragonFly") set(BUILD_TARGET_BSD ON) add_definitions(-D_BSD_SOURCE -DFREEBSD) @@ -472,6 +476,9 @@ elseif(BUILD_ENV_UNIXLIKE) find_package(LZO REQUIRED) message("LZO:" ${LZO_INCLUDE_DIR}) + if(HAIKU) + find_library(EXECINFO_LIBRARY execinfo) + endif() find_library(PTHREAD_LIBRARY pthread) if(NOT BUILD_TARGET_WIN) diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp index 173c349..8f83764 100644 --- a/toonz/sources/common/tapptools/tenv.cpp +++ b/toonz/sources/common/tapptools/tenv.cpp @@ -6,6 +6,7 @@ #include #include +#include #ifdef LEVO_MACOSX @@ -79,6 +80,9 @@ public: settingsPath = QString::fromStdString(getApplicationFileName()) + QString(".app") + QString("/Contents/Resources/SystemVar.ini"); +#else +#ifdef HAIKU + settingsPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/SystemVar.ini"; #else /* Generic Unix */ // TODO: use QStandardPaths::ConfigLocation when we drop Qt4 settingsPath = QDir::homePath(); @@ -86,6 +90,7 @@ public: settingsPath.append(getApplicationName().c_str()); settingsPath.append("/SystemVar.ini"); #endif +#endif QSettings settings(settingsPath, QSettings::IniFormat); QString qStr = QString::fromStdString(varName); diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp index 453c07a..88c6989 100644 --- a/toonz/sources/common/tgl/tgl.cpp +++ b/toonz/sources/common/tgl/tgl.cpp @@ -12,14 +12,14 @@ #ifdef _WIN32 #include #include -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #else #include #endif #endif -#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) +#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #endif @@ -617,7 +617,7 @@ void tglMakeCurrent(TGlContext context) { void tglDoneCurrent(TGlContext) { wglMakeCurrent(NULL, NULL); } -#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(MACOSX) +#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(MACOSX) || defined(HAIKU) TGlContext tglGetCurrentContext() { return reinterpret_cast( diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cpp index dcb302c..4904050 100644 --- a/toonz/sources/common/tiio/movsettings.cpp +++ b/toonz/sources/common/tiio/movsettings.cpp @@ -8,7 +8,7 @@ #include "tiio.h" #if !defined(x64) && !defined(__LP64__) && \ - !(defined(LINUX) || defined(FREEBSD)) && \ + !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU)) && \ !(defined(__GNUC__) && defined(_WIN32)) //******************************************************************************* diff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cpp index d61b973..df5877b 100644 --- a/toonz/sources/common/tipc/tipc.cpp +++ b/toonz/sources/common/tipc/tipc.cpp @@ -18,7 +18,7 @@ #elif defined(MACOSX) #include #include -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #include #endif diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp index a82fce8..4c0d20c 100644 --- a/toonz/sources/common/tsystem/tpluginmanager.cpp +++ b/toonz/sources/common/tsystem/tpluginmanager.cpp @@ -20,12 +20,16 @@ #endif #include #include +#ifndef HAIKU #include +#endif #include // for getfsstat #ifdef MACOSX #include #endif +#ifndef HAIKU #include +#endif #include #include #endif @@ -172,7 +176,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) { void TPluginManager::loadPlugins(const TFilePath &dir) { #if defined(_WIN32) const std::string extension = "dll"; -#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) +#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(HAIKU) const std::string extension = "so"; #elif defined(MACOSX) const std::string extension = "dylib"; diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cpp index 130d28b..524cc5f 100644 --- a/toonz/sources/common/tsystem/tsystempd.cpp +++ b/toonz/sources/common/tsystem/tsystempd.cpp @@ -123,6 +123,23 @@ #endif +#ifdef HAIKU +#define PLATFORM HAIKU +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + #ifndef PLATFORM PLATFORM_NOT_SUPPORTED #endif @@ -216,6 +233,11 @@ bool TSystem::memoryShortage() { // to be done... return false; +#elif defined(HAIKU) + + // to be done... + return false; + #else @ @ @ERROR : PLATFORM NOT SUPPORTED @@ -308,6 +330,11 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhysicalMemory) { // to be done... totalFree = 512 * 1024; +#elif defined(HAIKU) + + // to be done... + totalFree = 512 * 1024; + #else @ @ @ERROR : PLATFORM NOT SUPPORTED #endif @@ -336,6 +363,9 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName) { return 0; } #ifndef _WIN32 +#ifdef HAIKU + size = 0; +#else struct statfs buf; #ifdef __sgi statfs(::to_string(diskName).c_str(), &buf, sizeof(struct statfs), 0); @@ -343,6 +373,7 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName) { statfs(::to_string(diskName).c_str(), &buf); #endif size = (TINT64)((buf.f_blocks * buf.f_bsize) >> 10); +#endif #else DWORD sectorsPerCluster; // sectors per cluster DWORD bytesPerSector; // bytes per sector @@ -373,6 +404,9 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) { return 0; } #ifndef _WIN32 +#ifdef HAIKU + size = 0; +#else struct statfs buf; #ifdef __sgi statfs(diskName.getWideString().c_str(), &buf, sizeof(struct statfs), 0); @@ -380,6 +414,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) { statfs(::to_string(diskName).c_str(), &buf); #endif size = (TINT64)(buf.f_bfree * buf.f_bsize) >> 10; +#endif #else DWORD sectorsPerCluster; // sectors per cluster DWORD bytesPerSector; // bytes per sector @@ -465,6 +500,11 @@ TINT64 TSystem::getMemorySize(bool onlyPhysicalMemory) { // to be done... return 512 * 1024; +#elif defined(HAIKU) + + // to be done... + return 512 * 1024; + #else @ @ @ERROR : PLATFORM NOT SUPPORTED #endif diff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cpp index 3b50a5a..0908fe8 100644 --- a/toonz/sources/common/tvrender/tofflinegl.cpp +++ b/toonz/sources/common/tvrender/tofflinegl.cpp @@ -19,7 +19,7 @@ #include "tthread.h" -#elif defined(MACOSX) +#elif defined(MACOSX) || defined(HAIKU) #include "qtofflinegl.h" @@ -500,7 +500,7 @@ static std::shared_ptr defaultOfflineGLGenerator( return std::make_shared(dim, shared); } -#elif defined(MACOSX) +#elif defined(MACOSX) || defined(HAIKU) std::shared_ptr defaultOfflineGLGenerator( const TDimension &dim, std::shared_ptr shared) { diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cpp index a6ecdf8..4362b97 100644 --- a/toonz/sources/common/tvrender/ttessellator.cpp +++ b/toonz/sources/common/tvrender/ttessellator.cpp @@ -94,7 +94,7 @@ static void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], GLfloat w[4], typedef GLvoid(CALLBACK *GluCallback)(void); #endif -#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) +#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) typedef GLvoid (*GluCallback)(); diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp index fca4c3e..fa0a2eb 100644 --- a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp +++ b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp @@ -1,7 +1,7 @@ #if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || \ - (defined(_WIN32) && defined(__GNUC__)) + defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__)) // Toonz includes #include "tfilepath.h" diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.h b/toonz/sources/image/3gp/tiio_3gp_proxy.h index d777839..810f3bd 100644 --- a/toonz/sources/image/3gp/tiio_3gp_proxy.h +++ b/toonz/sources/image/3gp/tiio_3gp_proxy.h @@ -3,7 +3,7 @@ #ifndef TIIO_3GP_PROXY_H #define TIIO_3GP_PROXY_H -#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__)) +#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__)) // Qt includes #include diff --git a/toonz/sources/image/compatibility/tfile_io.c b/toonz/sources/image/compatibility/tfile_io.c index 83c3ac1..bef8892 100644 --- a/toonz/sources/image/compatibility/tfile_io.c +++ b/toonz/sources/image/compatibility/tfile_io.c @@ -58,7 +58,7 @@ char *convertWCHAR2CHAR(const wchar_t *wc) { } #endif /*-----------------------------------*/ -#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) +#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) FILE *_wfopen(const wchar_t *fname, const wchar_t *mode) { char *cfname = convertWCHAR2CHAR(fname); diff --git a/toonz/sources/image/compatibility/tfile_io.h b/toonz/sources/image/compatibility/tfile_io.h index fa8a9f7..1bf9774 100644 --- a/toonz/sources/image/compatibility/tfile_io.h +++ b/toonz/sources/image/compatibility/tfile_io.h @@ -19,7 +19,7 @@ extern "C" { char *convertWCHAR2CHAR(const wchar_t *fname); -#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) +#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #include diff --git a/toonz/sources/image/compatibility/tnz4.h b/toonz/sources/image/compatibility/tnz4.h index e903fad..50eddbe 100644 --- a/toonz/sources/image/compatibility/tnz4.h +++ b/toonz/sources/image/compatibility/tnz4.h @@ -34,7 +34,7 @@ TNZ_LITTLE_ENDIAN undefined !! unsigned char b, g, r, m; #elif defined(__sgi) unsigned char m, b, g, r; -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) unsigned char r, g, b, m; #elif defined(MACOSX) unsigned char m, r, g, b; @@ -48,7 +48,7 @@ typedef struct SPIXEL { unsigned short b, g, r, m; #elif defined(__sgi) unsigned short m, b, g, r; -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) unsigned short r, g, b, m; #elif defined(MACOSX) unsigned char m, r, g, b; diff --git a/toonz/sources/image/mov/tiio_mov_proxy.cpp b/toonz/sources/image/mov/tiio_mov_proxy.cpp index 8718ed2..93b0dc2 100644 --- a/toonz/sources/image/mov/tiio_mov_proxy.cpp +++ b/toonz/sources/image/mov/tiio_mov_proxy.cpp @@ -1,7 +1,7 @@ #if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || \ - (defined(_WIN32) && defined(__GNUC__)) + defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__)) // Toonz includes #include "tfilepath.h" diff --git a/toonz/sources/image/mov/tiio_mov_proxy.h b/toonz/sources/image/mov/tiio_mov_proxy.h index fbd8213..3fdbe70 100644 --- a/toonz/sources/image/mov/tiio_mov_proxy.h +++ b/toonz/sources/image/mov/tiio_mov_proxy.h @@ -3,7 +3,7 @@ #ifndef TIIO_MOV_PROXY_H #define TIIO_MOV_PROXY_H -#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__)) +#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__)) // Qt includes #include diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cpp index df4d586..d003e5e 100644 --- a/toonz/sources/image/pli/pli_io.cpp +++ b/toonz/sources/image/pli/pli_io.cpp @@ -435,7 +435,7 @@ void ParsedPli::setMaxThickness(double maxThickness) { }; /* indirect inclusion of causes 'abs' to return double on Linux */ -#if defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__)) +#if defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__)) || defined(HAIKU) template T abs_workaround(T a) { return (a > 0) ? a : -a; diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cpp index 0bfd43f..97d766e 100644 --- a/toonz/sources/image/tiio.cpp +++ b/toonz/sources/image/tiio.cpp @@ -54,7 +54,7 @@ #include "./mov/tiio_movM.h" #include "./3gp/tiio_3gpM.h" -#elif defined(LINUX) || defined(FREEBSD) // No more supported by the way... +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) // No more supported by the way... // #include "./mov/tiio_movL.h" #include "./mov/tiio_mov_proxy.h" #include "./3gp/tiio_3gp_proxy.h" diff --git a/toonz/sources/include/movsettings.h b/toonz/sources/include/movsettings.h index 9008f7d..ad64de9 100644 --- a/toonz/sources/include/movsettings.h +++ b/toonz/sources/include/movsettings.h @@ -13,7 +13,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#if !defined(x64) && !defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD)) && !(defined(__GNUC__) && defined(_WIN32)) +#if !defined(x64) && !defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU)) && !(defined(__GNUC__) && defined(_WIN32)) #ifdef _WIN32 diff --git a/toonz/sources/include/tcg/hpp/triangulate.hpp b/toonz/sources/include/tcg/hpp/triangulate.hpp index 3b5e5b3..499d13b 100644 --- a/toonz/sources/include/tcg/hpp/triangulate.hpp +++ b/toonz/sources/include/tcg/hpp/triangulate.hpp @@ -14,7 +14,7 @@ #include #elif defined(MACOSX) #include -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #include #endif diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h index 09e64fb..5c993b1 100644 --- a/toonz/sources/include/tgl.h +++ b/toonz/sources/include/tgl.h @@ -21,7 +21,7 @@ #define GLUT_NO_WARNING_DISABLE #endif -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #include #include #include diff --git a/toonz/sources/include/tmachine.h b/toonz/sources/include/tmachine.h index ec67785..308a251 100644 --- a/toonz/sources/include/tmachine.h +++ b/toonz/sources/include/tmachine.h @@ -7,7 +7,7 @@ #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(__sgi) #define TNZ_MACHINE_CHANNEL_ORDER_MBGR 1 -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(MACOSX) #define TNZ_MACHINE_CHANNEL_ORDER_MRGB 1 diff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.h index 6aaaf84..5b1e56c 100644 --- a/toonz/sources/include/tnztypes.h +++ b/toonz/sources/include/tnztypes.h @@ -18,7 +18,7 @@ typedef uint32_t TUINT32; typedef int64_t TINT64; typedef uint64_t TUINT64; -#elif defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD)) +#elif defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU)) #define TINT32 \ ; \ @@ -40,6 +40,13 @@ typedef int32_t TINT32; typedef uint32_t TUINT32; typedef int64_t TINT64; typedef uint64_t TUINT64; + +#elif defined(HAIKU) +#include +#define TINT32 int32_t +typedef uint32_t TUINT32; +typedef int64_t TINT64; +typedef uint64_t TUINT64; #endif #endif diff --git a/toonz/sources/include/toonz4.6/machine.h b/toonz/sources/include/toonz4.6/machine.h index 75ebe74..e2efddb 100644 --- a/toonz/sources/include/toonz4.6/machine.h +++ b/toonz/sources/include/toonz4.6/machine.h @@ -17,7 +17,7 @@ #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(__sgi) #define TNZ_MACHINE_CHANNEL_ORDER_MBGR 1 -#elif defined(LINUX) || defined(FREEBSD) +#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(MACOSX) #define TNZ_MACHINE_CHANNEL_ORDER_MRGB 1 diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.h index 45a67a1..2b01366 100644 --- a/toonz/sources/include/tpixel.h +++ b/toonz/sources/include/tpixel.h @@ -177,7 +177,7 @@ undefined machine order !!!! TPixelRGBM64(int rr, int gg, int bb, int mm = maxChannelValue) : r(rr), g(gg), b(bb), m(mm){}; #else -#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) || defined(HAIKU) #ifdef powerpc diff --git a/toonz/sources/t32bitsrv/main.cpp b/toonz/sources/t32bitsrv/main.cpp index 806904f..44830cf 100644 --- a/toonz/sources/t32bitsrv/main.cpp +++ b/toonz/sources/t32bitsrv/main.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU))) // Toonz includes #include "tiio_std.h" diff --git a/toonz/sources/t32bitsrv/t323gpmsg.cpp b/toonz/sources/t32bitsrv/t323gpmsg.cpp index 84ead44..14dc606 100644 --- a/toonz/sources/t32bitsrv/t323gpmsg.cpp +++ b/toonz/sources/t32bitsrv/t323gpmsg.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU))) // Toonz stuff #include "tiio.h" diff --git a/toonz/sources/t32bitsrv/t32movmsg.cpp b/toonz/sources/t32bitsrv/t32movmsg.cpp index 9c8d49d..a3b2bbf 100644 --- a/toonz/sources/t32bitsrv/t32movmsg.cpp +++ b/toonz/sources/t32bitsrv/t32movmsg.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU))) // Toonz stuff #include "tiio.h" diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt index 770d6b7..d3aee49 100644 --- a/toonz/sources/toonz/CMakeLists.txt +++ b/toonz/sources/toonz/CMakeLists.txt @@ -540,7 +540,7 @@ elseif(BUILD_ENV_UNIXLIKE) # 変なところにライブラリ生成するカスども set(EXTRA_LIBS ${EXTRA_LIBS} "$" "$") - set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES} ${OPENBLAS_LIB}) + set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES} ${OPENBLAS_LIB} ${EXECINFO_LIBRARY}) if(PLATFORM EQUAL 64) set(EXTRA_LIBS ${EXTRA_LIBS} Qt5::SerialPort ${TURBOJPEG_LIB} ${OpenCV_LIBS}) endif() @@ -701,7 +701,7 @@ TOONZSTUDIOPALETTE=\"\$HOME/.config/OpenToonz/stuff/studiopalette\" EOF fi -export LD_LIBRARY_PATH=\${OPENTOONZ_BASE}/lib/opentoonz:\${LD_LIBRARY_PATH} +export ${PRELOAD_VARIABLE}=\${OPENTOONZ_BASE}/lib/opentoonz:\${${PRELOAD_VARIABLE}} exec \$OPENTOONZ_BASE/bin/OpenToonz \"\$@\" ") diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index 826615c..b7dc6fe 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -479,7 +479,9 @@ int main(int argc, char *argv[]) { fmt.setStencil(true); QGLFormat::setDefaultFormat(fmt); +#ifndef __HAIKU__ glutInit(&argc, argv); +#endif splash.showMessage(offsetStr + "Initializing Toonz environment ...", Qt::AlignCenter, Qt::white); diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp index 9b71873..ca4e52c 100644 --- a/toonz/sources/toonz/sceneviewer.cpp +++ b/toonz/sources/toonz/sceneviewer.cpp @@ -1,5 +1,5 @@ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(HAIKU) #define GL_GLEXT_PROTOTYPES #endif