From 07f3e872bdee05f99706b6d2c3ed76ada0041da3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 24 Apr 2016 16:33:04 +1000 Subject: [PATCH] Minor changes to preproc checks needed for building on Linux --- toonz/sources/common/tiio/movsettings.cpp | 2 +- toonz/sources/include/movsettings.h | 2 +- toonz/sources/include/tgl.h | 6 ++++++ toonz/sources/include/tsound_t.h | 2 +- toonz/sources/t32bitsrv/main.cpp | 2 +- toonz/sources/t32bitsrv/t323gpmsg.cpp | 2 +- toonz/sources/t32bitsrv/t32movmsg.cpp | 2 +- toonz/sources/toonz/main.cpp | 6 +++++- toonz/sources/toonz/sceneviewer.cpp | 2 +- 9 files changed, 18 insertions(+), 8 deletions(-) diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cpp index fb3a83ff..6918478d 100644 --- a/toonz/sources/common/tiio/movsettings.cpp +++ b/toonz/sources/common/tiio/movsettings.cpp @@ -7,7 +7,7 @@ #include "tproperty.h" #include "tiio.h" -#if !(defined(x64) || defined(__LP64__)) +#if !(defined(x64) || defined(__LP64__) || defined(LINUX)) //******************************************************************************* // 32-bit version diff --git a/toonz/sources/include/movsettings.h b/toonz/sources/include/movsettings.h index b75e0e35..e32e2ed3 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__)) +#if !(defined(x64) || defined(__LP64__) || defined(LINUX)) #ifdef _WIN32 diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h index 71c0424b..d54f644d 100644 --- a/toonz/sources/include/tgl.h +++ b/toonz/sources/include/tgl.h @@ -21,6 +21,12 @@ #define GLUT_NO_WARNING_DISABLE #endif +#ifdef LINUX +#include +#include +#include +#endif + //#include "tcurves.h" #include "traster.h" //#include "tfilepath.h" diff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.h index f22de249..082ba835 100644 --- a/toonz/sources/include/tsound_t.h +++ b/toonz/sources/include/tsound_t.h @@ -431,7 +431,7 @@ public: }; //============================================================================== -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) template DVAPI TSoundTrackP TSoundTrackT::apply(TSoundTransform *transform) { diff --git a/toonz/sources/t32bitsrv/main.cpp b/toonz/sources/t32bitsrv/main.cpp index 6f7ac0bd..83d5c846 100644 --- a/toonz/sources/t32bitsrv/main.cpp +++ b/toonz/sources/t32bitsrv/main.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX))) //Toonz includes #include "tiio_std.h" diff --git a/toonz/sources/t32bitsrv/t323gpmsg.cpp b/toonz/sources/t32bitsrv/t323gpmsg.cpp index 6dfd27e9..248e322e 100644 --- a/toonz/sources/t32bitsrv/t323gpmsg.cpp +++ b/toonz/sources/t32bitsrv/t323gpmsg.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX))) //Toonz stuff #include "tiio.h" diff --git a/toonz/sources/t32bitsrv/t32movmsg.cpp b/toonz/sources/t32bitsrv/t32movmsg.cpp index db50ab81..65104067 100644 --- a/toonz/sources/t32bitsrv/t32movmsg.cpp +++ b/toonz/sources/t32bitsrv/t32movmsg.cpp @@ -1,6 +1,6 @@ -#if (!(defined(x64) || defined(__LP64__))) +#if (!(defined(x64) || defined(__LP64__) || defined(LINUX))) //Toonz stuff #include "tiio.h" diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index bdffd36a..3852d901 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -437,6 +437,10 @@ int main(int argc, char *argv[]) fmt.setStencil(true); QGLFormat::setDefaultFormat(fmt); +#ifdef LINUX + glutInit(&argc, argv); +#endif + splash.showMessage(offsetStr + "Initializing Toonz environment ...", Qt::AlignCenter, Qt::white); a.processEvents(); @@ -495,7 +499,7 @@ int main(int argc, char *argv[]) // Carico la traduzione contenuta in toonz.qm (se � presente) QString languagePathString = QString::fromStdString(toString(TEnv::getConfigDir() + "loc")); -#ifdef MACOSX +#ifndef WIN32 //the merge of menu on osx can cause problems with different languages with the Preferences menu //qt_mac_set_menubar_merge(false); languagePathString += "/" + Preferences::instance()->getCurrentLanguage(); diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp index 169fa65d..9bcbda13 100644 --- a/toonz/sources/toonz/sceneviewer.cpp +++ b/toonz/sources/toonz/sceneviewer.cpp @@ -1422,7 +1422,7 @@ void SceneViewer::paintGL() /* QGLWidget の widget 生成/削除のタイミングで(platform によって?) GL_FRAMEBUFFER_UNDEFINED の状態で paintGL() が呼ばれてしまうようだ */ return; } -#ifndef MACOSX +#ifdef WIN32 //following line is necessary to solve a problem Windows 7 SetWindowRgn((HWND)winId(), 0, FALSE); #else