From 07f3e872bdee05f99706b6d2c3ed76ada0041da3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Apr 24 2016 06:33:04 +0000 Subject: Minor changes to preproc checks needed for building on Linux --- diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cpp index fb3a83f..6918478 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 b75e0e3..e32e2ed 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 71c0424..d54f644 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 f22de24..082ba83 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 6f7ac0b..83d5c84 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 6dfd27e..248e322 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 db50ab8..6510406 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 bdffd36..3852d90 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 169fa65..9bcbda1 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