diff --git a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj index cee2231d16..1ecff86afe 100644 --- a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj +++ b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj @@ -188,6 +188,8 @@ 2BA7CD667A4D3962F968735B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 6E0B0A8EDCC37862B7ECBEBC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 875C1BC09CB8295D6799B5F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + DF2E980AB106BC34560B6636 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 0CFE85845D2C6ABBA077A319 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 0A8AE7AC4AEF66AD97735443 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 23E4DA8F3BD72654C717FAF9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 9854BAFA65D92D059DF49F71 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -891,6 +893,8 @@ 6E0B0A8EDCC37862B7ECBEBC, 875C1BC09CB8295D6799B5F8 ); name = containers; sourceTree = ""; }; 2C3262AC916A51359D03A579 = { isa = PBXGroup; children = ( + DF2E980AB106BC34560B6636, + 0CFE85845D2C6ABBA077A319, 0A8AE7AC4AEF66AD97735443, 23E4DA8F3BD72654C717FAF9, 9854BAFA65D92D059DF49F71, diff --git a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj index 0cda318f4a..9820abdc02 100644 --- a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj +++ b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj @@ -548,6 +548,17 @@ + + + + + + + + + diff --git a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj index b85252a04c..7905817648 100644 --- a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj +++ b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj @@ -548,6 +548,17 @@ + + + + + + + + + diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj index 76eaa62d19..9e1883f22e 100644 --- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj +++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj @@ -215,6 +215,9 @@ true + + true + true @@ -1039,6 +1042,7 @@ + diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters index e43d2169a9..f032dffaca 100644 --- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters +++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters @@ -379,6 +379,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads @@ -1473,6 +1476,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h index 08359b0f3d..bbcef794ba 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -244,6 +244,19 @@ private: << "include $(BUILD_SHARED_LIBRARY)" << newLine; } + String createIncludePathFlags (const Project::BuildConfiguration& config) + { + String flags; + StringArray searchPaths (extraSearchPaths); + searchPaths.addArray (config.getHeaderSearchPaths()); + searchPaths.removeDuplicates (false); + + for (int i = 0; i < searchPaths.size(); ++i) + flags << " -I " << FileHelpers::unixStylePath (replacePreprocessorTokens (config, searchPaths[i])).quoted(); + + return flags; + } + String createCPPFlags (bool forDebug) { String flags ("-fsigned-char -fexceptions -frtti"); @@ -251,6 +264,15 @@ private: if (forDebug) flags << " -g"; + for (int i = 0; i < configs.size(); ++i) + { + if (configs.getReference(i).isDebug() == forDebug) + { + flags << createIncludePathFlags (configs.getReference(i)); + break; + } + } + StringPairArray defines; defines.set ("JUCE_ANDROID", "1"); diff --git a/extras/JuceDemo/Builds/Android/jni/Android.mk b/extras/JuceDemo/Builds/Android/jni/Android.mk index 9e77887a74..22bce1475e 100644 --- a/extras/JuceDemo/Builds/Android/jni/Android.mk +++ b/extras/JuceDemo/Builds/Android/jni/Android.mk @@ -47,9 +47,9 @@ LOCAL_SRC_FILES := \ ../../../../../modules/juce_video/juce_video.cpp\ ifeq ($(CONFIG),Debug) - LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -g -O0 -D "JUCE_ANDROID=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" + LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -g -I "../../JuceLibraryCode" -O0 -D "JUCE_ANDROID=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" else - LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -Os -D "JUCE_ANDROID=1" -D "NDEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" + LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -I "../../JuceLibraryCode" -Os -D "JUCE_ANDROID=1" -D "NDEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" endif include $(BUILD_SHARED_LIBRARY) diff --git a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj index db3548a7d6..bd6a0b151e 100644 --- a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj +++ b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj @@ -315,6 +315,8 @@ 427FE8BEB90565F99AEAF9E3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 85D325D62B8AA3E9586E4533 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; AE233608DB7055E4081B3C70 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + F5F5B442F0CEF8BBF78DECBE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 23C5A1CC9CE4A632410A3A91 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 215202E499A7A22438F5DACA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 4ABBF6D78A8F52DB78A97171 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; BE2CD642B591698C3E8615F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1191,6 +1193,8 @@ 85D325D62B8AA3E9586E4533, AE233608DB7055E4081B3C70 ); name = containers; sourceTree = ""; }; 420A8DE4E0228CBC3D953B00 = { isa = PBXGroup; children = ( + F5F5B442F0CEF8BBF78DECBE, + 23C5A1CC9CE4A632410A3A91, 215202E499A7A22438F5DACA, 4ABBF6D78A8F52DB78A97171, BE2CD642B591698C3E8615F8, diff --git a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj index 4b239422ea..de6485eac6 100644 --- a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj +++ b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj @@ -1282,6 +1282,17 @@ + + + + + + + + + diff --git a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj index 5738571cde..3d04322989 100644 --- a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj +++ b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj @@ -1282,6 +1282,17 @@ + + + + + + + + + diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj index e14caf2077..60ca35608f 100644 --- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj +++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj @@ -398,6 +398,9 @@ true + + true + true @@ -1292,6 +1295,7 @@ + diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters index 251f32fb55..3080fbfa91 100644 --- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters +++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters @@ -670,6 +670,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads @@ -1944,6 +1947,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads diff --git a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj index 8e712071b1..3259bd7a5f 100644 --- a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj +++ b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj @@ -305,6 +305,8 @@ 427FE8BEB90565F99AEAF9E3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 85D325D62B8AA3E9586E4533 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; AE233608DB7055E4081B3C70 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + F5F5B442F0CEF8BBF78DECBE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 23C5A1CC9CE4A632410A3A91 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 215202E499A7A22438F5DACA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 4ABBF6D78A8F52DB78A97171 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; BE2CD642B591698C3E8615F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1181,6 +1183,8 @@ 85D325D62B8AA3E9586E4533, AE233608DB7055E4081B3C70 ); name = containers; sourceTree = ""; }; 420A8DE4E0228CBC3D953B00 = { isa = PBXGroup; children = ( + F5F5B442F0CEF8BBF78DECBE, + 23C5A1CC9CE4A632410A3A91, 215202E499A7A22438F5DACA, 4ABBF6D78A8F52DB78A97171, BE2CD642B591698C3E8615F8, diff --git a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj index e1468a1cd4..cd2adf5afc 100644 --- a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -301,6 +301,8 @@ B9387C0717F60E8448CD4A93 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; FB9CB92E796C4C73074186E4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 14EDCA503A51FE7FB7FE8D30 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 6CBF37AA5FAF9146A5602E7E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 9A8F3414FBC54FDDF0DD7B52 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 981B963DE7884BBEE6D82B8B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; B075892FD970FB65267CB231 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 25E5699A13720227ED5966B9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1143,6 +1145,8 @@ FB9CB92E796C4C73074186E4, 14EDCA503A51FE7FB7FE8D30 ); name = containers; sourceTree = ""; }; B9C3113C3E132546EC787CB1 = { isa = PBXGroup; children = ( + 6CBF37AA5FAF9146A5602E7E, + 9A8F3414FBC54FDDF0DD7B52, 981B963DE7884BBEE6D82B8B, B075892FD970FB65267CB231, 25E5699A13720227ED5966B9, diff --git a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj index aa112d9957..e6cf4d24da 100644 --- a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj +++ b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj @@ -1291,6 +1291,17 @@ + + + + + + + + + diff --git a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj index 95759507a2..8f1f7acd57 100644 --- a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj +++ b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj @@ -1291,6 +1291,17 @@ + + + + + + + + + diff --git a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj index 5cf39eab0f..bba787ee7e 100644 --- a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj +++ b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj @@ -258,6 +258,8 @@ 54083520C7AA5911B1F0371D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 976D73482A1F97017074727D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; B0BD847AEA05490C202179B9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 078F01B40F52ECD31E932AF8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 255FFE3EAB799A5A680067DB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 23FC5056A83C964C5F0B1704 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 5B454349892346F39FAFBEBA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; B0B523A4C3265DA5568C5232 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1082,6 +1084,8 @@ 976D73482A1F97017074727D, B0BD847AEA05490C202179B9 ); name = containers; sourceTree = ""; }; 4494DB56EFB670D455AB683A = { isa = PBXGroup; children = ( + 078F01B40F52ECD31E932AF8, + 255FFE3EAB799A5A680067DB, 23FC5056A83C964C5F0B1704, 5B454349892346F39FAFBEBA, B0B523A4C3265DA5568C5232, diff --git a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj index 83e28adcf6..05b8b7eb2b 100644 --- a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj +++ b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj @@ -1133,6 +1133,17 @@ + + + + + + + + + diff --git a/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj b/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj index 7b0d3bbf8e..ef9aece5e7 100644 --- a/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj +++ b/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj @@ -1133,6 +1133,17 @@ + + + + + + + + + diff --git a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index e7d3b412d6..8933d97617 100644 --- a/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -73,6 +73,8 @@ 99513107F04F61661876FA4A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; DBC57E2F62B5AF65D6FA359A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; F4058F5113AA515196A62CD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 4CD70C9B37F8E4387419DD15 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 69B70915D41E92BFDF952AF8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 78445B3DD0D19EA0B681DA22 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 90AD4E20C2C95D57F53561D8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 050E3E8AFCCB5509CC12155F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -259,6 +261,8 @@ DBC57E2F62B5AF65D6FA359A, F4058F5113AA515196A62CD7 ); name = containers; sourceTree = ""; }; 99FCE63C175C8838BB212B67 = { isa = PBXGroup; children = ( + 4CD70C9B37F8E4387419DD15, + 69B70915D41E92BFDF952AF8, 78445B3DD0D19EA0B681DA22, 90AD4E20C2C95D57F53561D8, 050E3E8AFCCB5509CC12155F, diff --git a/extras/binarybuilder/Builds/VisualStudio2008/BinaryBuilder.vcproj b/extras/binarybuilder/Builds/VisualStudio2008/BinaryBuilder.vcproj index bf4fd03834..20c1410d51 100644 --- a/extras/binarybuilder/Builds/VisualStudio2008/BinaryBuilder.vcproj +++ b/extras/binarybuilder/Builds/VisualStudio2008/BinaryBuilder.vcproj @@ -346,6 +346,17 @@ + + + + + + + + + diff --git a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj index 279515be43..94082d0379 100644 --- a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj +++ b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj @@ -88,6 +88,8 @@ EF68F092DAC017371B6454B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 21CD3EBA3C464526D9E89004 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 4B1D4FFCFC3CF72289959650 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 92EFCC3611899AF97808479F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + C0BFB9B0BDAF4870D2748462 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; CE5C1AD8AA624461B97F359B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; E6A50EBB9B5AF418F913DB41 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 5B15FE26C55D0BCABFF070C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -693,6 +695,8 @@ 21CD3EBA3C464526D9E89004, 4B1D4FFCFC3CF72289959650 ); name = containers; sourceTree = ""; }; EFF4A6D8F1ED2FF9BE1F86D1 = { isa = PBXGroup; children = ( + 92EFCC3611899AF97808479F, + C0BFB9B0BDAF4870D2748462, CE5C1AD8AA624461B97F359B, E6A50EBB9B5AF418F913DB41, 5B15FE26C55D0BCABFF070C9, diff --git a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj index eb176b6215..2614dd1425 100644 --- a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj +++ b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj @@ -348,6 +348,17 @@ + + + + + + + + + diff --git a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj index f0bc9fc9c5..4b5db7e8c9 100644 --- a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj +++ b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj @@ -348,6 +348,17 @@ + + + + + + + + + diff --git a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj index 9a18ab2703..e1156564fc 100644 --- a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj +++ b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj @@ -86,6 +86,8 @@ EF68F092DAC017371B6454B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 21CD3EBA3C464526D9E89004 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 4B1D4FFCFC3CF72289959650 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 92EFCC3611899AF97808479F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + C0BFB9B0BDAF4870D2748462 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; CE5C1AD8AA624461B97F359B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; E6A50EBB9B5AF418F913DB41 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 5B15FE26C55D0BCABFF070C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -691,6 +693,8 @@ 21CD3EBA3C464526D9E89004, 4B1D4FFCFC3CF72289959650 ); name = containers; sourceTree = ""; }; EFF4A6D8F1ED2FF9BE1F86D1 = { isa = PBXGroup; children = ( + 92EFCC3611899AF97808479F, + C0BFB9B0BDAF4870D2748462, CE5C1AD8AA624461B97F359B, E6A50EBB9B5AF418F913DB41, 5B15FE26C55D0BCABFF070C9, diff --git a/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj b/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj index 837cc32f51..c0cab51f6c 100644 --- a/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj +++ b/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj @@ -215,6 +215,8 @@ A4F1CA6B07A550F9E78F82C6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; E6550782791B9FE9A603CD27 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 0FA528C43A0141E466B0C463 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 5777950E4F5ED4BB442275A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 75479288EB748232AFAFB285 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 73E4E4A1E8378E23859A63BE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; 9B3DD783D92F4DDBC54E0964 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 00AEC7FE0322458C9C2BAEEC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1032,6 +1034,8 @@ E6550782791B9FE9A603CD27, 0FA528C43A0141E466B0C463 ); name = containers; sourceTree = ""; }; 948C7FA03FC278BC8B3AC4E4 = { isa = PBXGroup; children = ( + 5777950E4F5ED4BB442275A1, + 75479288EB748232AFAFB285, 73E4E4A1E8378E23859A63BE, 9B3DD783D92F4DDBC54E0964, 00AEC7FE0322458C9C2BAEEC, diff --git a/extras/static library/Builds/VisualStudio2008/juce.vcproj b/extras/static library/Builds/VisualStudio2008/juce.vcproj index bf42ca6883..b028798098 100644 --- a/extras/static library/Builds/VisualStudio2008/juce.vcproj +++ b/extras/static library/Builds/VisualStudio2008/juce.vcproj @@ -1096,6 +1096,17 @@ + + + + + + + + + diff --git a/extras/static library/Builds/VisualStudio2010/juce.vcxproj b/extras/static library/Builds/VisualStudio2010/juce.vcxproj index ace301daf8..cbbfa2e36c 100644 --- a/extras/static library/Builds/VisualStudio2010/juce.vcxproj +++ b/extras/static library/Builds/VisualStudio2010/juce.vcxproj @@ -361,6 +361,9 @@ true + + true + true @@ -1238,6 +1241,7 @@ + diff --git a/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters b/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters index ffb900c57f..890bd284e6 100644 --- a/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters +++ b/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters @@ -556,6 +556,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads @@ -1779,6 +1782,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads diff --git a/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj b/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj index 0527ee7192..d402983c5c 100644 --- a/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj +++ b/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj @@ -224,6 +224,8 @@ CCF4492B4B4F31BDA891E22C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SparseSet.h"; path = "../../../../modules/juce_core/containers/juce_SparseSet.h"; sourceTree = "SOURCE_ROOT"; }; 0F688642BDC57FBD67152E7D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; }; 28A897747DBB21A827C215C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Variant.h"; path = "../../../../modules/juce_core/containers/juce_Variant.h"; sourceTree = "SOURCE_ROOT"; }; + 707A14CE8208B48F0535C507 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; }; + 9D5A01382E2E62066FA112DA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChildProcess.h"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.h"; sourceTree = "SOURCE_ROOT"; }; 9BE763502BE26EF846ACC304 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CriticalSection.h"; path = "../../../../modules/juce_core/threads/juce_CriticalSection.h"; sourceTree = "SOURCE_ROOT"; }; B44056431CD92E9F864059BA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../../../modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; }; 29A146BE47DC25505D2D0E31 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; }; @@ -953,6 +955,8 @@ 0F688642BDC57FBD67152E7D, 28A897747DBB21A827C215C9 ); name = containers; sourceTree = ""; }; BD8FFE50726C48804C3C144A = { isa = PBXGroup; children = ( + 707A14CE8208B48F0535C507, + 9D5A01382E2E62066FA112DA, 9BE763502BE26EF846ACC304, B44056431CD92E9F864059BA, 29A146BE47DC25505D2D0E31, diff --git a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj index 35e685f4bc..1a5d17c7c8 100644 --- a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj +++ b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj @@ -515,6 +515,17 @@ + + + + + + + + + diff --git a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj index 295dacac17..1362d5e9df 100644 --- a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj +++ b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj @@ -206,6 +206,9 @@ true + + true + true @@ -1042,6 +1045,7 @@ + diff --git a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters index 1caf5f06e0..a093acd206 100644 --- a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters +++ b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters @@ -391,6 +391,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads @@ -1548,6 +1551,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\threads + Juce Modules\juce_core\threads diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index ac64d9857d..97e3f04ebc 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -298,7 +298,7 @@ public: { public: typedef const void VoidType; - static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast (v); } + static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast (v); } enum { isConst = 1 }; }; #endif diff --git a/modules/juce_audio_basics/juce_audio_basics.mm b/modules/juce_audio_basics/juce_audio_basics.mm index a42a88417c..3feb355de8 100644 --- a/modules/juce_audio_basics/juce_audio_basics.mm +++ b/modules/juce_audio_basics/juce_audio_basics.mm @@ -23,4 +23,4 @@ ============================================================================== */ -#include "juce_audio_basics.cpp" \ No newline at end of file +#include "juce_audio_basics.cpp" diff --git a/modules/juce_audio_basics/juce_module_info b/modules/juce_audio_basics/juce_module_info index 741fdc3b12..14d781b47b 100644 --- a/modules/juce_audio_basics/juce_module_info +++ b/modules/juce_audio_basics/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_basics", "name": "JUCE audio and midi data classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for audio buffer manipulation, midi message handling, synthesis, etc", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_audio_devices/juce_module_info b/modules/juce_audio_devices/juce_module_info index cb82614c7e..3b91d64df9 100644 --- a/modules/juce_audio_devices/juce_module_info +++ b/modules/juce_audio_devices/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_devices", "name": "JUCE audio and midi I/O device classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes to play and record from audio and midi i/o devices.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp b/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp index 999a4158df..c48be0b74f 100644 --- a/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp +++ b/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp @@ -385,7 +385,7 @@ private: if (callback != nullptr) { - callback->audioDeviceIOCallback (const_cast (inChans.getData()), numActiveInChans, + callback->audioDeviceIOCallback (const_cast (inChans.getData()), numActiveInChans, outChans, numActiveOutChans, numSamples); } else diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 616d7239d7..63ed89d088 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -375,7 +375,7 @@ public: destData[j] = (samplesToWrite[i][j] >> bitsToShift); } - samplesToWrite = const_cast (channels.getData()); + samplesToWrite = const_cast (channels.getData()); } return FLAC__stream_encoder_process (encoder, (const FLAC__int32**) samplesToWrite, numSamples) != 0; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp index 15b5033e23..074f274abe 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp @@ -69,7 +69,7 @@ bool AudioFormatReader::read (int* const* destSamples, if (numSamplesToRead <= 0) return true; - if (! readSamples (const_cast (destSamples), + if (! readSamples (const_cast (destSamples), jmin ((int) numChannels, numDestChannels), startOffsetInDestBuffer, startSampleInSource, numSamplesToRead)) return false; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp index dcf2a98daa..a371693c7d 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp @@ -101,7 +101,7 @@ bool AudioFormatWriter::writeFromAudioReader (AudioFormatReader& reader, } } - if (! write (const_cast (buffers), numToDo)) + if (! write (const_cast (buffers), numToDo)) return false; numSamplesToRead -= numToDo; diff --git a/modules/juce_audio_formats/juce_module_info b/modules/juce_audio_formats/juce_module_info index 33cbbbb60d..bc7be4853b 100644 --- a/modules/juce_audio_formats/juce_module_info +++ b/modules/juce_audio_formats/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_formats", "name": "JUCE audio file format codecs", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for reading and writing various audio file formats.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_audio_plugin_client/juce_module_info b/modules/juce_audio_plugin_client/juce_module_info index 0654544358..72bbc6f63c 100644 --- a/modules/juce_audio_plugin_client/juce_module_info +++ b/modules/juce_audio_plugin_client/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_plugin_client", "name": "JUCE audio plugin wrapper classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for building VST, RTAS and AU plugins.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_audio_processors/juce_module_info b/modules/juce_audio_processors/juce_module_info index dd2498438b..da62e6fd90 100644 --- a/modules/juce_audio_processors/juce_module_info +++ b/modules/juce_audio_processors/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_processors", "name": "JUCE audio plugin hosting classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for loading and playing VST, AU, or internally-generated audio processors.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_audio_utils/juce_module_info b/modules/juce_audio_utils/juce_module_info index 12caeb65f8..1a8a913ab3 100644 --- a/modules/juce_audio_utils/juce_module_info +++ b/modules/juce_audio_utils/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_audio_utils", "name": "JUCE extra audio utility classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for audio-related GUI and miscellaneous tasks.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_browser_plugin/juce_module_info b/modules/juce_browser_plugin/juce_module_info index 7dce38101e..61821c8e7e 100644 --- a/modules/juce_browser_plugin/juce_module_info +++ b/modules/juce_browser_plugin/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_browser_plugin_client", "name": "JUCE browser plugin wrapper classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for building NPAPI and ActiveX browser plugins.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index 1c1d257b78..5c2ef40d9d 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -84,6 +84,7 @@ #include "text/juce_StringArray.cpp" #include "text/juce_StringPairArray.cpp" #include "text/juce_StringPool.cpp" +#include "threads/juce_ChildProcess.cpp" #include "threads/juce_ReadWriteLock.cpp" #include "threads/juce_Thread.cpp" #include "threads/juce_ThreadPool.cpp" diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index 3d19374272..17c4663416 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -326,6 +326,9 @@ BEGIN_JUCE_NAMESPACE #ifndef __JUCE_STRINGPOOL_JUCEHEADER__ #include "text/juce_StringPool.h" #endif +#ifndef __JUCE_CHILDPROCESS_JUCEHEADER__ + #include "threads/juce_ChildProcess.h" +#endif #ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ #include "threads/juce_CriticalSection.h" #endif diff --git a/modules/juce_core/juce_module_info b/modules/juce_core/juce_module_info index 14de580182..423d431a4c 100644 --- a/modules/juce_core/juce_module_info +++ b/modules/juce_core/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_core", "name": "JUCE core classes", - "version": "2.0.2", + "version": "2.0.3", "description": "The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index 51866a7aa8..0d9ebaa742 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -905,7 +905,7 @@ String BigInteger::toString (const int base, const int minimumNumCharacters) con if (base == 2 || base == 8 || base == 16) { const int bits = (base == 2) ? 1 : (base == 8 ? 3 : 4); - static const char* const hexDigits = "0123456789abcdef"; + static const char hexDigits[] = "0123456789abcdef"; for (;;) { diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index b2f3bfdec1..5d9a9dadea 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -199,6 +199,7 @@ #include #include #include + #include #endif // Need to clear various moronic redefinitions made by system headers.. diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index cf7bd95fa4..dd986e9ea0 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -919,3 +919,116 @@ void* DynamicLibrary::getFunction (const String& functionName) noexcept { return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr; } + + + +//============================================================================== +class ChildProcess::ActiveProcess +{ +public: + ActiveProcess (const StringArray& arguments) + : childPID (0), pipeHandle (0), readHandle (0) + { + int pipeHandles[2] = { 0 }; + + if (pipe (pipeHandles) == 0) + { + const int result = fork(); + + if (result < 0) + { + close (pipeHandles[0]); + close (pipeHandles[1]); + } + else if (result == 0) + { + // we're the child process.. + close (pipeHandles[0]); // close the read handle + dup2 (pipeHandles[1], 1); // turns the pipe into stdout + + Array argv; + for (int i = 0; i < arguments.size(); ++i) + argv.add (arguments[i].toUTF8().getAddress()); + + argv.add (nullptr); + + execvp (argv[0], argv.getRawDataPointer()); + exit (-1); + } + else + { + // we're the parent process.. + childPID = result; + pipeHandle = pipeHandles[0]; + close (pipeHandles[1]); // close the write handle + } + } + } + + ~ActiveProcess() + { + if (readHandle != 0) + fclose (readHandle); + + if (pipeHandle != 0) + close (pipeHandle); + } + + bool isRunning() const + { + if (childPID != 0) + { + int childState; + const int pid = waitpid (childPID, &childState, WNOHANG); + return pid > 0 && ! (WIFEXITED (childState) || WIFSIGNALED (childState)); + } + + return false; + } + + int read (void* const dest, const int numBytes) + { + if (readHandle == 0 && childPID != 0) + readHandle = fdopen (pipeHandle, "r"); + + if (readHandle != 0) + return fread (dest, 1, numBytes, readHandle); + + return 0; + } + + int childPID; + +private: + int pipeHandle; + FILE* readHandle; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActiveProcess); +}; + +bool ChildProcess::start (const String& command) +{ + StringArray tokens; + tokens.addTokens (command, true); + tokens.removeEmptyStrings (true); + + if (tokens.size() == 0) + return false; + + activeProcess = new ActiveProcess (tokens); + + if (activeProcess->childPID == 0) + activeProcess = nullptr; + + return activeProcess != nullptr; +} + +bool ChildProcess::isRunning() const +{ + return activeProcess != nullptr && activeProcess->isRunning(); +} + +int ChildProcess::readProcessOutput (void* dest, int numBytes) +{ + return activeProcess != nullptr ? activeProcess->read (dest, numBytes) : 0; +} diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index c02d63833f..27c6139c34 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -30,6 +30,11 @@ //============================================================================== namespace WindowsFileHelpers { + DWORD getAtts (const String& path) + { + return GetFileAttributes (path.toWideCharPointer()); + } + int64 fileTimeToTime (const FILETIME* const ft) { static_jassert (sizeof (ULARGE_INTEGER) == sizeof (FILETIME)); // tell me if this fails! @@ -46,13 +51,14 @@ namespace WindowsFileHelpers { if (path.isNotEmpty() && path[1] == ':' && path[2] == 0) path << '\\'; - else - path = (path + " ").dropLastCharacters(1); // (mess with the string to make sure it's not sharing its internal storage) - WCHAR* p = const_cast (path.toWideCharPointer()); + const int numBytes = CharPointer_UTF16::getBytesRequiredFor (path.getCharPointer()) + 4; + HeapBlock pathCopy; + pathCopy.calloc (numBytes, 1); + path.copyToUTF16 (pathCopy, numBytes); - if (PathStripToRoot (p)) - return String ((const WCHAR*) p); + if (PathStripToRoot (pathCopy)) + path = static_cast (pathCopy); return path; } @@ -104,25 +110,25 @@ const String File::separatorString ("\\"); bool File::exists() const { return fullPath.isNotEmpty() - && GetFileAttributes (fullPath.toWideCharPointer()) != INVALID_FILE_ATTRIBUTES; + && WindowsFileHelpers::getAtts (fullPath) != INVALID_FILE_ATTRIBUTES; } bool File::existsAsFile() const { return fullPath.isNotEmpty() - && (GetFileAttributes (fullPath.toWideCharPointer()) & FILE_ATTRIBUTE_DIRECTORY) == 0; + && (WindowsFileHelpers::getAtts (fullPath) & FILE_ATTRIBUTE_DIRECTORY) == 0; } bool File::isDirectory() const { - const DWORD attr = GetFileAttributes (fullPath.toWideCharPointer()); + const DWORD attr = WindowsFileHelpers::getAtts (fullPath); return ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) && (attr != INVALID_FILE_ATTRIBUTES); } bool File::hasWriteAccess() const { if (exists()) - return (GetFileAttributes (fullPath.toWideCharPointer()) & FILE_ATTRIBUTE_READONLY) == 0; + return (WindowsFileHelpers::getAtts (fullPath) & FILE_ATTRIBUTE_READONLY) == 0; // on windows, it seems that even read-only directories can still be written into, // so checking the parent directory's permissions would return the wrong result.. @@ -131,25 +137,20 @@ bool File::hasWriteAccess() const bool File::setFileReadOnlyInternal (const bool shouldBeReadOnly) const { - DWORD attr = GetFileAttributes (fullPath.toWideCharPointer()); + const DWORD oldAtts = WindowsFileHelpers::getAtts (fullPath); - if (attr == INVALID_FILE_ATTRIBUTES) + if (oldAtts == INVALID_FILE_ATTRIBUTES) return false; - if (shouldBeReadOnly == ((attr & FILE_ATTRIBUTE_READONLY) != 0)) - return true; - - if (shouldBeReadOnly) - attr |= FILE_ATTRIBUTE_READONLY; - else - attr &= ~FILE_ATTRIBUTE_READONLY; - - return SetFileAttributes (fullPath.toWideCharPointer(), attr) != FALSE; + const DWORD newAtts = shouldBeReadOnly ? (oldAtts | FILE_ATTRIBUTE_READONLY) + : (oldAtts & ~FILE_ATTRIBUTE_READONLY); + return newAtts == oldAtts + || SetFileAttributes (fullPath.toWideCharPointer(), newAtts) != FALSE; } bool File::isHidden() const { - return (GetFileAttributes (getFullPathName().toWideCharPointer()) & FILE_ATTRIBUTE_HIDDEN) != 0; + return (WindowsFileHelpers::getAtts (fullPath) & FILE_ATTRIBUTE_HIDDEN) != 0; } //============================================================================== @@ -170,12 +171,13 @@ bool File::moveToTrash() const SHFILEOPSTRUCT fos = { 0 }; // The string we pass in must be double null terminated.. - String doubleNullTermPath (getFullPathName() + " "); - WCHAR* const p = const_cast (doubleNullTermPath.toWideCharPointer()); - p [getFullPathName().length()] = 0; + const int numBytes = CharPointer_UTF16::getBytesRequiredFor (fullPath.getCharPointer()) + 8; + HeapBlock doubleNullTermPath; + doubleNullTermPath.calloc (numBytes, 1); + fullPath.copyToUTF16 (doubleNullTermPath, numBytes); fos.wFunc = FO_DELETE; - fos.pFrom = p; + fos.pFrom = doubleNullTermPath; fos.fFlags = FOF_ALLOWUNDO | FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_RENAMEONCOLLISION; diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp index 27784c3e17..067f17e16c 100644 --- a/modules/juce_core/native/juce_win32_Threads.cpp +++ b/modules/juce_core/native/juce_win32_Threads.cpp @@ -390,14 +390,14 @@ public: switch (WaitForSingleObject (handle, timeOutMillisecs < 0 ? INFINITE : timeOutMillisecs)) { - case WAIT_OBJECT_0: - case WAIT_ABANDONED: - break; - - case WAIT_TIMEOUT: - default: - close(); - break; + case WAIT_OBJECT_0: + case WAIT_ABANDONED: + break; + + case WAIT_TIMEOUT: + default: + close(); + break; } } } @@ -459,3 +459,113 @@ void InterProcessLock::exit() if (pimpl != nullptr && --(pimpl->refCount) == 0) pimpl = nullptr; } + +//============================================================================== +class ChildProcess::ActiveProcess +{ +public: + ActiveProcess (const String& command) + : ok (false), readPipe (0), writePipe (0) + { + SECURITY_ATTRIBUTES securityAtts = { 0 }; + securityAtts.nLength = sizeof (securityAtts); + securityAtts.bInheritHandle = TRUE; + + if (CreatePipe (&readPipe, &writePipe, &securityAtts, 0) + && SetHandleInformation (readPipe, HANDLE_FLAG_INHERIT, 0)) + { + STARTUPINFOW startupInfo = { 0 }; + startupInfo.cb = sizeof (startupInfo); + startupInfo.hStdError = writePipe; + startupInfo.hStdOutput = writePipe; + startupInfo.dwFlags = STARTF_USESTDHANDLES; + + ok = CreateProcess (nullptr, const_cast (command.toWideCharPointer()), + nullptr, nullptr, TRUE, CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT, + nullptr, nullptr, &startupInfo, &processInfo) != FALSE; + } + } + + ~ActiveProcess() + { + if (ok) + { + CloseHandle (processInfo.hThread); + CloseHandle (processInfo.hProcess); + } + + if (readPipe != 0) + CloseHandle (readPipe); + + if (writePipe != 0) + CloseHandle (writePipe); + } + + bool isRunning() const + { + return WaitForSingleObject (processInfo.hProcess, 0) != WAIT_OBJECT_0; + } + + int read (void* dest, int numNeeded) const + { + int total = 0; + + while (ok && numNeeded > 0) + { + DWORD available = 0; + + if (! PeekNamedPipe ((HANDLE) readPipe, nullptr, 0, nullptr, &available, nullptr)) + break; + + const int numToDo = jmin ((int) available, numNeeded); + + if (available == 0) + { + if (! isRunning()) + break; + + Thread::yield(); + } + else + { + DWORD numRead = 0; + if (! ReadFile ((HANDLE) readPipe, dest, numToDo, &numRead, nullptr)) + break; + + total += numRead; + dest = addBytesToPointer (dest, numRead); + numNeeded -= numRead; + } + } + + return total; + } + + bool ok; + +private: + HANDLE readPipe, writePipe; + PROCESS_INFORMATION processInfo; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActiveProcess); +}; + +bool ChildProcess::start (const String& command) +{ + activeProcess = new ActiveProcess (command); + + if (! activeProcess->ok) + activeProcess = nullptr; + + return activeProcess != nullptr; +} + +bool ChildProcess::isRunning() const +{ + return activeProcess != nullptr && activeProcess->isRunning(); +} + +int ChildProcess::readProcessOutput (void* dest, int numBytes) +{ + return activeProcess != nullptr ? activeProcess->read (dest, numBytes) : 0; +} diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 56875261a1..cb392e53b0 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -431,7 +431,7 @@ String URL::addEscapeChars (const String& s, const bool isParameter) } else { - static const char* const hexDigits = "0123456789abcdef"; + static const char hexDigits[] = "0123456789abcdef"; utf8.set (i, '%'); utf8.insert (++i, hexDigits [((uint8) c) >> 4]); diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 54d6dfe83a..cf99c5dd73 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 2 #define JUCE_MINOR_VERSION 0 -#define JUCE_BUILDNUMBER 2 +#define JUCE_BUILDNUMBER 3 /** Current Juce version number. diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 7065cf1aa5..8233eaf524 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -1033,7 +1033,7 @@ bool String::matchesWildcard (const String& wildcard, const bool ignoreCase) con String String::repeatedString (const String& stringToRepeat, int numberOfTimesToRepeat) { if (numberOfTimesToRepeat <= 0) - return String::empty; + return empty; String result (PreallocationBytes (stringToRepeat.getByteOffsetOfEnd() * numberOfTimesToRepeat)); CharPointerType n (result.text); @@ -1953,7 +1953,7 @@ String String::createStringFromData (const void* const data_, const int size) } //============================================================================== -static juce_wchar emptyChar = 0; +static const juce_wchar emptyChar = 0; template struct StringEncodingConverter @@ -2011,7 +2011,7 @@ CharPointer_UTF32 String::toUTF32() const { return StringEncodingConverter ::convert (*this).getAddress(); + return StringEncodingConverter ::convert (*this).getAddress(); } //============================================================================== diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp new file mode 100644 index 0000000000..9324fd114e --- /dev/null +++ b/modules/juce_core/threads/juce_ChildProcess.cpp @@ -0,0 +1,95 @@ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-11 by Raw Material Software Ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the GNU General + Public License (Version 2), as published by the Free Software Foundation. + A copy of the license is included in the JUCE distribution, or can be found + online at www.gnu.org/licenses. + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.rawmaterialsoftware.com/juce for more information. + + ============================================================================== +*/ + +BEGIN_JUCE_NAMESPACE + +ChildProcess::ChildProcess() {} +ChildProcess::~ChildProcess() {} + +bool ChildProcess::waitForProcessToFinish (const int timeoutMs) const +{ + const int64 timeoutTime = Time::getMillisecondCounter() + timeoutMs; + + do + { + if (! isRunning()) + return true; + } + while (timeoutMs < 0 || Time::getMillisecondCounter() < timeoutTime); + + return false; +} + +String ChildProcess::readAllProcessOutput() +{ + MemoryOutputStream result; + + for (;;) + { + char buffer [512]; + const int num = readProcessOutput (buffer, sizeof (buffer)); + + if (num <= 0) + break; + + result.write (buffer, num); + } + + return result.toString(); +} + +//============================================================================== +#if JUCE_UNIT_TESTS + +#include "../unit_tests/juce_UnitTest.h" + +class ChildProcessTests : public UnitTest +{ +public: + ChildProcessTests() : UnitTest ("ChildProcess") {} + + void runTest() + { + #if JUCE_WINDOWS || JUCE_MAC || JUCE_LINUX + ChildProcess p; + + #if JUCE_WINDOWS + expect (p.start ("tasklist")); + #else + expect (p.start ("ls /")); + #endif + + String output (p.readAllProcessOutput()); + expect (output.isNotEmpty()); + #endif + } +}; + +static ChildProcessTests childProcessUnitTests; + +#endif + + +END_JUCE_NAMESPACE diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h new file mode 100644 index 0000000000..7c803a89a0 --- /dev/null +++ b/modules/juce_core/threads/juce_ChildProcess.h @@ -0,0 +1,87 @@ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-11 by Raw Material Software Ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the GNU General + Public License (Version 2), as published by the Free Software Foundation. + A copy of the license is included in the JUCE distribution, or can be found + online at www.gnu.org/licenses. + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.rawmaterialsoftware.com/juce for more information. + + ============================================================================== +*/ + +#ifndef __JUCE_CHILDPROCESS_JUCEHEADER__ +#define __JUCE_CHILDPROCESS_JUCEHEADER__ + + +//============================================================================== +/** + Launches and monitors a child process. + + This class lets you launch an executable, and read its output. You can also + use it to check whether the child process has finished. +*/ +class ChildProcess +{ +public: + /** Creates a process object. + To actually launch the process, use start(). + */ + ChildProcess(); + + /** Destructor. + Note that deleting this object won't terminate the child process. + */ + ~ChildProcess(); + + /** Attempts to launch a child process command. + + The command should be the name of the executable file, followed by any arguments + that are required. + If the process has already been launched, this will launch it again. If a problem + occurs, the method will return false. + */ + bool start (const String& command); + + /** Returns true if the child process is alive. */ + bool isRunning() const; + + /** Attempts to read some output from the child process. + This will attempt to read up to the given number of bytes of data from the + process. It returns the number of bytes that were actually read. + */ + int readProcessOutput (void* destBuffer, int numBytesToRead); + + /** Blocks until the process has finished, and then returns its complete output + as a string. + */ + String readAllProcessOutput(); + + /** Blocks until the process is no longer running. */ + bool waitForProcessToFinish (int timeoutMs) const; + + +private: + //============================================================================== + class ActiveProcess; + friend class ScopedPointer; + ScopedPointer activeProcess; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess); +}; + + +#endif // __JUCE_CHILDPROCESS_JUCEHEADER__ diff --git a/modules/juce_cryptography/juce_module_info b/modules/juce_cryptography/juce_module_info index abc5f77add..5f59582f2c 100644 --- a/modules/juce_cryptography/juce_module_info +++ b/modules/juce_cryptography/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_cryptography", "name": "JUCE cryptography classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_data_structures/juce_module_info b/modules/juce_data_structures/juce_module_info index bdf8bc3f5d..40ba831c08 100644 --- a/modules/juce_data_structures/juce_module_info +++ b/modules/juce_data_structures/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_data_structures", "name": "JUCE data model helper classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for undo/redo management, and smart data structures.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_events/juce_module_info b/modules/juce_events/juce_module_info index 2d2e9fc0a6..9839b9660d 100644 --- a/modules/juce_events/juce_module_info +++ b/modules/juce_events/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_events", "name": "JUCE message and event handling classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for running an application's main event loop and sending/receiving messages, timers, etc.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_graphics/juce_graphics.mm b/modules/juce_graphics/juce_graphics.mm index 2112b319ec..22772e4cbe 100644 --- a/modules/juce_graphics/juce_graphics.mm +++ b/modules/juce_graphics/juce_graphics.mm @@ -23,4 +23,4 @@ ============================================================================== */ -#include "juce_graphics.cpp" \ No newline at end of file +#include "juce_graphics.cpp" diff --git a/modules/juce_graphics/juce_module_info b/modules/juce_graphics/juce_module_info index 6ab57dc443..4d9340a5d0 100644 --- a/modules/juce_graphics/juce_module_info +++ b/modules/juce_graphics/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_graphics", "name": "JUCE graphics classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for 2D vector graphics, image loading/saving, font handling, etc.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_gui_basics/juce_module_info b/modules/juce_gui_basics/juce_module_info index feafbed820..a9fb1fbda7 100644 --- a/modules/juce_gui_basics/juce_module_info +++ b/modules/juce_gui_basics/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_gui_basics", "name": "JUCE GUI core classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Basic user-interface components and related classes.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp index 022eb5a4ab..080eb75d20 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp @@ -207,8 +207,7 @@ const KeyPress KeyPress::createFromDescription (const String& desc) { // give up and use the hex code.. const int hexCode = desc.fromFirstOccurrenceOf ("#", false, false) - .toLowerCase() - .retainCharacters ("0123456789abcdef") + .retainCharacters ("0123456789abcdefABCDEF") .getHexValue32(); if (hexCode > 0) diff --git a/modules/juce_gui_basics/positioning/juce_MarkerList.cpp b/modules/juce_gui_basics/positioning/juce_MarkerList.cpp index 3fe4001e3c..4d6479bf21 100644 --- a/modules/juce_gui_basics/positioning/juce_MarkerList.cpp +++ b/modules/juce_gui_basics/positioning/juce_MarkerList.cpp @@ -88,10 +88,15 @@ const MarkerList::Marker* MarkerList::getMarker (const int index) const noexcept } const MarkerList::Marker* MarkerList::getMarker (const String& name) const noexcept +{ + return getMarkerByName (name); +} + +MarkerList::Marker* MarkerList::getMarkerByName (const String& name) const noexcept { for (int i = 0; i < markers.size(); ++i) { - const Marker* const m = markers.getUnchecked(i); + Marker* const m = markers.getUnchecked(i); if (m->name == name) return m; @@ -102,7 +107,7 @@ const MarkerList::Marker* MarkerList::getMarker (const String& name) const noexc void MarkerList::setMarker (const String& name, const RelativeCoordinate& position) { - Marker* const m = const_cast (getMarker (name)); + Marker* const m = getMarkerByName (name); if (m != nullptr) { diff --git a/modules/juce_gui_basics/positioning/juce_MarkerList.h b/modules/juce_gui_basics/positioning/juce_MarkerList.h index d42b9cafe4..7f37b74cf9 100644 --- a/modules/juce_gui_basics/positioning/juce_MarkerList.h +++ b/modules/juce_gui_basics/positioning/juce_MarkerList.h @@ -179,6 +179,8 @@ private: OwnedArray markers; ListenerList listeners; + Marker* getMarkerByName (const String& name) const noexcept; + JUCE_LEAK_DETECTOR (MarkerList); }; diff --git a/modules/juce_gui_extra/juce_module_info b/modules/juce_gui_extra/juce_module_info index 0be56fb6cb..f63d11814a 100644 --- a/modules/juce_gui_extra/juce_module_info +++ b/modules/juce_gui_extra/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_gui_extra", "name": "JUCE extended GUI classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Miscellaneous GUI classes for specialised tasks.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_opengl/juce_module_info b/modules/juce_opengl/juce_module_info index 59dcff731a..4cb665aeec 100644 --- a/modules/juce_opengl/juce_module_info +++ b/modules/juce_opengl/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_opengl", "name": "JUCE OpenGL classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for rendering OpenGL in a JUCE window.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial", diff --git a/modules/juce_video/juce_module_info b/modules/juce_video/juce_module_info index 9473707570..832f18cb3e 100644 --- a/modules/juce_video/juce_module_info +++ b/modules/juce_video/juce_module_info @@ -1,7 +1,7 @@ { "id": "juce_video", "name": "JUCE video playback and capture classes", - "version": "2.0.2", + "version": "2.0.3", "description": "Classes for playing video and capturing camera input.", "website": "http://www.juce.com/juce", "license": "GPL/Commercial",