Browse Source

better double comparisons for var. Fix for VS2005/VS2010 RTAS exporting. Minor GL cleanups and project updates.

tags/2021-05-28
jules 13 years ago
parent
commit
4e1a9f6526
10 changed files with 47 additions and 65 deletions
  1. +3
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  2. +5
    -4
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h
  3. +23
    -16
      extras/Introjucer/Source/Project/jucer_AudioPluginModule.h
  4. +2
    -0
      extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
  5. +1
    -1
      extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj
  6. +1
    -1
      modules/juce_core/containers/juce_Variant.cpp
  7. +4
    -18
      modules/juce_opengl/native/juce_OpenGL_android.h
  8. +1
    -3
      modules/juce_opengl/native/juce_OpenGL_ios.h
  9. +2
    -1
      modules/juce_opengl/native/juce_OpenGL_linux.h
  10. +5
    -21
      modules/juce_opengl/native/juce_OpenGL_win32.h

+ 3
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -494,6 +494,7 @@ public:
static const char* getName() { return "Visual Studio 2008"; }
static const char* getValueTreeTypeName() { return "VS2008"; }
int getVisualStudioVersion() const { return 9; }
void launchProject() { getSLNFile().startAsProcess(); }
@@ -846,6 +847,7 @@ public:
static const char* getName() { return "Visual Studio 2005"; }
static const char* getValueTreeTypeName() { return "VS2005"; }
int getVisualStudioVersion() const { return 8; }
int getLaunchPreferenceOrderForCurrentOS()
{
@@ -883,6 +885,7 @@ public:
static const char* getName() { return "Visual Studio 2010"; }
static const char* getValueTreeTypeName() { return "VS2010"; }
int getVisualStudioVersion() const { return 10; }
int getLaunchPreferenceOrderForCurrentOS()
{


+ 5
- 4
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h View File

@@ -59,10 +59,11 @@ public:
virtual bool shouldFileBeCompiledByDefault (const RelativePath& path) const;
virtual bool canCopeWithDuplicateFiles() = 0;
virtual bool isXcode() const { return false; }
virtual bool isVisualStudio() const { return false; }
virtual bool isLinux() const { return false; }
virtual bool isOSX() const { return false; }
virtual bool isXcode() const { return false; }
virtual bool isVisualStudio() const { return false; }
virtual int getVisualStudioVersion() const { return 0; }
virtual bool isLinux() const { return false; }
virtual bool isOSX() const { return false; }
//==============================================================================
String getName() const { return name; }


+ 23
- 16
extras/Introjucer/Source/Project/jucer_AudioPluginModule.h View File

@@ -302,24 +302,27 @@ namespace RTASHelpers
{
fixMissingRTASValues (exporter);
exporter.xcodeCanUseDwarf = false;
if (exporter.isVisualStudio())
{
exporter.msvcTargetSuffix = ".dpm";
exporter.msvcNeedsDLLRuntimeLib = true;
exporter.msvcTargetSuffix = ".dpm";
exporter.msvcNeedsDLLRuntimeLib = true;
String winbag (CodeHelpers::addEscapeChars (getRTASFolderRelativePath (exporter)
.getChildFile ("WinBag")
.toWindowsStyle()).quoted());
exporter.msvcExtraPreprocessorDefs.set ("JucePlugin_WinBag_path",
CodeHelpers::addEscapeChars (getRTASFolderRelativePath (exporter)
.getChildFile ("WinBag")
.toWindowsStyle()).quoted());
// (VS10 automatically adds escape characters to the quotes for this definition)
winbag = (exporter.getVisualStudioVersion() < 10) ? CodeHelpers::addEscapeChars (winbag.quoted())
: CodeHelpers::addEscapeChars (winbag).quoted();
String msvcPathToRTASFolder (exporter.getJucePathFromTargetFolder()
.getChildFile ("juce_audio_plugin_client/RTAS")
.toWindowsStyle() + "\\");
exporter.msvcExtraPreprocessorDefs.set ("JucePlugin_WinBag_path", winbag);
exporter.msvcDelayLoadedDLLs = "DAE.dll; DigiExt.dll; DSI.dll; PluginLib.dll; DSPManager.dll";
String msvcPathToRTASFolder (exporter.getJucePathFromTargetFolder()
.getChildFile ("juce_audio_plugin_client/RTAS")
.toWindowsStyle() + "\\");
exporter.msvcDelayLoadedDLLs = "DAE.dll; DigiExt.dll; DSI.dll; PluginLib.dll; DSPManager.dll";
if (exporter.isVisualStudio())
{
if (! exporter.getExtraLinkerFlags().toString().contains ("/FORCE:multiple"))
exporter.getExtraLinkerFlags() = exporter.getExtraLinkerFlags().toString() + " /FORCE:multiple";
@@ -332,10 +335,14 @@ namespace RTASHelpers
+ "\" \"$(TargetPath)\".rsr";
}
}
else
{
exporter.xcodeCanUseDwarf = false;
RelativePath rtasFolder (getRTASFolder (exporter).toString(), RelativePath::projectFolder);
exporter.xcodeExtraLibrariesDebug.add (rtasFolder.getChildFile ("MacBag/Libs/Debug/libPluginLibrary.a"));
exporter.xcodeExtraLibrariesRelease.add (rtasFolder.getChildFile ("MacBag/Libs/Release/libPluginLibrary.a"));
RelativePath rtasFolder (getRTASFolder (exporter).toString(), RelativePath::projectFolder);
exporter.xcodeExtraLibrariesDebug.add (rtasFolder.getChildFile ("MacBag/Libs/Debug/libPluginLibrary.a"));
exporter.xcodeExtraLibrariesRelease.add (rtasFolder.getChildFile ("MacBag/Libs/Release/libPluginLibrary.a"));
}
writePluginCharacteristicsFile (projectSaver);


+ 2
- 0
extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj View File

@@ -514,6 +514,7 @@
7FC1A0B1663AC9262104D715 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_KeyListener.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyListener.h"; sourceTree = "SOURCE_ROOT"; };
8042D0D2B38EBD19652CBA55 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
805B94425CD56EA78E0A705B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioDemoPlaybackPage.h; path = ../../Source/demos/AudioDemoPlaybackPage.h; sourceTree = "SOURCE_ROOT"; };
80945993EC383052DA7BB92D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGLRenderer.h"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLRenderer.h"; sourceTree = "SOURCE_ROOT"; };
80E7D8D4E601BCC20054475E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ActionBroadcaster.h"; path = "../../../../modules/juce_events/broadcasters/juce_ActionBroadcaster.h"; sourceTree = "SOURCE_ROOT"; };
80EEC26431102B212C9F873B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PathIterator.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_PathIterator.cpp"; sourceTree = "SOURCE_ROOT"; };
814313374CD209A40282985E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PluginDescription.h"; path = "../../../../modules/juce_audio_processors/processors/juce_PluginDescription.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1909,6 +1910,7 @@
17422D876DAAF091ED089B8D,
AAAA086F74F507C87200AD2E,
B81FA2ED22BCC03D124031ED,
80945993EC383052DA7BB92D,
58864C3D7F369EBE01E42C5C,
8EEB4DEB11F3DF01BA6F7528,
FE9A5898294228EB7F439951,


+ 1
- 1
extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj View File

@@ -611,7 +611,7 @@
B9E3D8A5B69F14C6404E2AB2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_SystemStats.cpp"; path = "../../../../modules/juce_core/native/juce_android_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; };
BA94000B8C2FCD758F5152FC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Path.h"; path = "../../../../modules/juce_graphics/geometry/juce_Path.h"; sourceTree = "SOURCE_ROOT"; };
BAF325E9748B0670F34129BE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileInputStream.h"; path = "../../../../modules/juce_core/files/juce_FileInputStream.h"; sourceTree = "SOURCE_ROOT"; };
BB3752B34C9A609E300D679B = { isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = sourcecode.c.h; sourceTree = "BUILT_PRODUCTS_DIR"; };
BB3752B34C9A609E300D679B = { isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjucedebug.a; sourceTree = "BUILT_PRODUCTS_DIR"; };
BBB6077B7D799C2FD4187355 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PathStrokeType.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_PathStrokeType.cpp"; sourceTree = "SOURCE_ROOT"; };
BC2411690315F3F1612A9A13 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
BCA1200B13A683E6A3DC3CEB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileSearchPath.h"; path = "../../../../modules/juce_core/files/juce_FileSearchPath.h"; sourceTree = "SOURCE_ROOT"; };


+ 1
- 1
modules/juce_core/containers/juce_Variant.cpp View File

@@ -147,7 +147,7 @@ public:
bool equals (const ValueUnion& data, const ValueUnion& otherData, const VariantType& otherType) const noexcept
{
return otherType.toDouble (otherData) == data.doubleValue;
return std::abs (otherType.toDouble (otherData) - data.doubleValue) < std::numeric_limits<double>::epsilon();
}
void writeToStream (const ValueUnion& data, OutputStream& output) const


+ 4
- 18
modules/juce_opengl/native/juce_OpenGL_android.h View File

@@ -63,13 +63,8 @@ public:
glView.clear();
}
void initialiseOnRenderThread()
{
}
void shutdownOnRenderThread()
{
}
void initialiseOnRenderThread() {}
void shutdownOnRenderThread() {}
bool makeActive() const noexcept { return isInsideGLCallback; }
bool isActive() const noexcept { return isInsideGLCallback; }
@@ -93,10 +88,6 @@ public:
}
}
void contextChangedSize()
{
}
void triggerRepaint()
{
glView.callVoidMethod (OpenGLView.requestRender);
@@ -104,6 +95,7 @@ public:
//==============================================================================
void contextCreatedCallback();
void contextChangedSize() {}
void renderCallback();
//==============================================================================
@@ -168,16 +160,10 @@ JUCE_JNI_CALLBACK (GL_VIEW_CLASS_NAME, contextCreated, void, (JNIEnv* env, jobje
threadLocalJNIEnvHolder.getOrAttach();
OpenGLContext::NativeContext* const context = OpenGLContext::NativeContext::findContextFor (env, view);
jassert (context != nullptr);
if (context != nullptr)
{
context->contextCreatedCallback();
JUCE_CHECK_OPENGL_ERROR
}
else
{
jassertfalse;
}
}
JUCE_JNI_CALLBACK (GL_VIEW_CLASS_NAME, contextChangedSize, void, (JNIEnv* env, jobject view))


+ 1
- 3
modules/juce_opengl/native/juce_OpenGL_ios.h View File

@@ -93,9 +93,7 @@ public:
[view release];
}
void initialiseOnRenderThread()
{
}
void initialiseOnRenderThread() {}
void shutdownOnRenderThread()
{


+ 2
- 1
modules/juce_opengl/native/juce_OpenGL_linux.h View File

@@ -142,7 +142,8 @@ public:
ScopedXLock xlock;
XMoveResizeWindow (display, embeddedWindow,
bounds.getX(), bounds.getY(),
jmax (1, bounds.getWidth()), jmax (1, bounds.getHeight()));
jmax (1, bounds.getWidth()),
jmax (1, bounds.getHeight()));
}
bool setSwapInterval (int numFramesPerSwap)


+ 5
- 21
modules/juce_opengl/native/juce_OpenGL_win32.h View File

@@ -81,28 +81,12 @@ public:
releaseDC();
}
void initialiseOnRenderThread()
{
}
void initialiseOnRenderThread() {}
void shutdownOnRenderThread() {}
void shutdownOnRenderThread()
{
}
bool makeActive() const noexcept
{
return wglMakeCurrent (dc, renderContext) != FALSE;
}
bool isActive() const noexcept
{
return wglGetCurrentContext() == renderContext;
}
void swapBuffers() const noexcept
{
SwapBuffers (dc);
}
bool makeActive() const noexcept { return wglMakeCurrent (dc, renderContext) != FALSE; }
bool isActive() const noexcept { return wglGetCurrentContext() == renderContext; }
void swapBuffers() const noexcept { SwapBuffers (dc); }
bool setSwapInterval (int numFramesPerSwap)
{


Loading…
Cancel
Save