diff --git a/extras/Jucer (experimental)/Source/Application/jucer_Application.h b/extras/Jucer (experimental)/Source/Application/jucer_Application.h index 18a27e776e..9c3249a9dd 100644 --- a/extras/Jucer (experimental)/Source/Application/jucer_Application.h +++ b/extras/Jucer (experimental)/Source/Application/jucer_Application.h @@ -365,11 +365,14 @@ public: ScopedPointer newProj (NewProjectWizard::runNewProjectWizard (mw)); if (newProj != 0) + { mw->setProject (newProj.release()); + mw->setVisible (true); + } else + { closeWindow (mw); - - mw->setVisible (true); + } } void askUserToOpenFile() diff --git a/extras/audio plugins/demo/Builds/Linux/Makefile b/extras/audio plugins/demo/Builds/Linux/Makefile new file mode 100644 index 0000000000..89d22442d3 --- /dev/null +++ b/extras/audio plugins/demo/Builds/Linux/Makefile @@ -0,0 +1,104 @@ +# Automatically generated makefile, created by the Jucer +# Don't edit this file! Your changes will be overwritten when you re-save the Jucer project! + +ifndef CONFIG + CONFIG=Debug +endif + +ifeq ($(TARGET_ARCH),) + TARGET_ARCH := -march=native +endif + +# (this disables dependency generation if multiple architectures are set) +DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) + +ifeq ($(CONFIG),Debug) + BINDIR := build + LIBDIR := build + OBJDIR := build/intermediate/Debug + OUTDIR := build + CPPFLAGS := $(DEPFLAGS) -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -I "../../JuceLibraryCode" -I "~/SDKs/vstsdk2.4" -I "/usr/include" -I "/usr/include/freetype2" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -fPIC -O0 + CXXFLAGS += $(CFLAGS) + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/X11R6/lib/" -L"../../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound + LDDEPS := + RESFLAGS := -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -I "../../JuceLibraryCode" -I "~/SDKs/vstsdk2.4" -I "/usr/include" -I "/usr/include/freetype2" + TARGET := JuceDemoPlugin.so + BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) +endif + +ifeq ($(CONFIG),Release) + BINDIR := build + LIBDIR := build + OBJDIR := build/intermediate/Release + OUTDIR := build + CPPFLAGS := $(DEPFLAGS) -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "LINUX=1" -D "NDEBUG=1" -I "../../JuceLibraryCode" -I "~/SDKs/vstsdk2.4" -I "/usr/include" -I "/usr/include/freetype2" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -Os + CXXFLAGS += $(CFLAGS) + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/X11R6/lib/" -L"../../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound + LDDEPS := + RESFLAGS := -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "LINUX=1" -D "NDEBUG=1" -I "../../JuceLibraryCode" -I "~/SDKs/vstsdk2.4" -I "/usr/include" -I "/usr/include/freetype2" + TARGET := JuceDemoPlugin.so + BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) +endif + +OBJECTS := \ + $(OBJDIR)/PluginProcessor_a059e380.o \ + $(OBJDIR)/PluginEditor_94d4fb09.o \ + $(OBJDIR)/JuceLibraryCode1_682c927f.o \ + $(OBJDIR)/JuceLibraryCode2_683aaa00.o \ + $(OBJDIR)/JuceLibraryCode3_6848c181.o \ + $(OBJDIR)/JuceLibraryCode4_6856d902.o \ + $(OBJDIR)/juce_VST_Wrapper_eb4c8b25.o \ + +.PHONY: clean + +$(OUTDIR)/$(TARGET): $(OBJECTS) $(LDDEPS) $(RESOURCES) + @echo Linking JuceDemoPlugin + -@mkdir -p $(BINDIR) + -@mkdir -p $(LIBDIR) + -@mkdir -p $(OUTDIR) + @$(BLDCMD) + +clean: + @echo Cleaning JuceDemoPlugin + -@rm -f $(OUTDIR)/$(TARGET) + -@rm -rf $(OBJDIR)/* + -@rm -rf $(OBJDIR) + +$(OBJDIR)/PluginProcessor_a059e380.o: ../../Source/PluginProcessor.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling PluginProcessor.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/PluginEditor_94d4fb09.o: ../../Source/PluginEditor.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling PluginEditor.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/JuceLibraryCode1_682c927f.o: ../../JuceLibraryCode/JuceLibraryCode1.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling JuceLibraryCode1.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/JuceLibraryCode2_683aaa00.o: ../../JuceLibraryCode/JuceLibraryCode2.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling JuceLibraryCode2.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/JuceLibraryCode3_6848c181.o: ../../JuceLibraryCode/JuceLibraryCode3.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling JuceLibraryCode3.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/JuceLibraryCode4_6856d902.o: ../../JuceLibraryCode/JuceLibraryCode4.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling JuceLibraryCode4.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_VST_Wrapper_eb4c8b25.o: ../../../../../../juce/extras/audio\ plugins/wrapper/VST/juce_VST_Wrapper.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling juce_VST_Wrapper.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) diff --git a/extras/audio plugins/demo/JuceDemoPlugin.jucer b/extras/audio plugins/demo/JuceDemoPlugin.jucer index e2a2873e1c..7c5823b250 100644 --- a/extras/audio plugins/demo/JuceDemoPlugin.jucer +++ b/extras/audio plugins/demo/JuceDemoPlugin.jucer @@ -16,6 +16,7 @@ rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../../.." libraryType="1"/> + 4) #endif { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL AudioUnitCocoaViewInfo* info = (AudioUnitCocoaViewInfo*) outData; @@ -1155,7 +1155,7 @@ public: ComponentResult CreateUI (Float32 /*inXOffset*/, Float32 /*inYOffset*/) { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL if (juceFilter == 0) { @@ -1220,7 +1220,7 @@ private: : parentView (parentHIView), recursive (false) { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL jassert (contentComp != 0); addAndMakeVisible (contentComp); @@ -1278,7 +1278,7 @@ private: if (comp != 0) comp->removeComponentListener (this); - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL NSWindow* pluginWindow = [((NSView*) getWindowHandle()) window]; [hostWindow removeChildWindow: pluginWindow]; diff --git a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm index b23f3ac35d..81930bc53f 100644 --- a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm +++ b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm @@ -50,7 +50,7 @@ void initialiseMacRTAS() void* attachSubWindow (void* hostWindowRef, Component* comp) { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: hostWindowRef]; [hostWindow retain]; @@ -103,7 +103,7 @@ void* attachSubWindow (void* hostWindowRef, Component* comp) void removeSubWindow (void* nsWindow, Component* comp) { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL NSView* pluginView = (NSView*) comp->getWindowHandle(); NSWindow* hostWindow = (NSWindow*) nsWindow; diff --git a/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp b/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp index 0711ae02f8..cf0fdf1979 100644 --- a/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp +++ b/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp @@ -170,6 +170,8 @@ public: ~JucePlugInProcess() { + JUCE_AUTORELEASEPOOL + if (mLoggedIn) MIDILogOut(); @@ -255,6 +257,7 @@ public: { if (port != 0) { + JUCE_AUTORELEASEPOOL updateSize(); #if JUCE_WINDOWS @@ -302,9 +305,7 @@ public: { if (editorComp != 0 || wrapper != 0) { -#if JUCE_MAC - const ScopedAutoReleasePool pool; -#endif + JUCE_AUTORELEASEPOOL PopupMenu::dismissAllActiveMenus(); JUCE_NAMESPACE::Component* const modalComponent = JUCE_NAMESPACE::Component::getCurrentlyModalComponent(); diff --git a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp index ebb8b78ac5..ed1de0e496 100644 --- a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp +++ b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp @@ -153,7 +153,7 @@ BEGIN_JUCE_NAMESPACE extern void initialiseMac(); extern void* attachComponentToWindowRef (Component* component, void* windowRef); extern void detachComponentFromWindowRef (Component* component, void* nsWindow); - extern void setNativeHostWindowSize (void* nsWindow, Component* editorComp, int newWidth, int newHeight); + extern void setNativeHostWindowSize (void* nsWindow, Component* editorComp, int newWidth, int newHeight, const PluginHostType& host); extern void checkWindowVisibility (void* nsWindow, Component* component); extern void forwardCurrentKeyEventToHost (Component* component); #endif @@ -323,6 +323,8 @@ public: ~JuceVSTWrapper() { + JUCE_AUTORELEASEPOOL + stopTimer(); deleteEditor (false); @@ -350,6 +352,7 @@ public: void open() { + JUCE_AUTORELEASEPOOL if (editorComp == 0) { checkWhetherWavelabHasChangedThread(); @@ -371,6 +374,7 @@ public: void close() { + JUCE_AUTORELEASEPOOL const NonWavelabMMLock mmLock; jassert (! recursionCheck); @@ -1224,7 +1228,7 @@ public: { // some hosts don't support the sizeWindow call, so do it manually.. #if JUCE_MAC - setNativeHostWindowSize (hostWindow, editorComp, newWidth, newHeight); + setNativeHostWindowSize (hostWindow, editorComp, newWidth, newHeight, getHostType()); #elif JUCE_LINUX Window root; int x, y; @@ -1442,7 +1446,31 @@ private: static void checkWhetherWavelabHasChangedThread() { - MessageManager::getInstance()->setCurrentThreadAsMessageThread(); + if (getHostType().isWavelab() || getHostType().isCubaseBridged()) + { + static bool messageThreadIsDefinitelyCorrect = false; + + if (! messageThreadIsDefinitelyCorrect) + { + MessageManager::getInstance()->setCurrentThreadAsMessageThread(); + + class MessageThreadCallback : public CallbackMessage + { + public: + MessageThreadCallback (bool& triggered_) : triggered (triggered_) {} + + void messageCallback() + { + triggered = true; + } + + private: + bool& triggered; + }; + + (new MessageThreadCallback (messageThreadIsDefinitelyCorrect))->post(); + } + } } #else typedef MessageManagerLock NonWavelabMMLock; @@ -1490,6 +1518,7 @@ extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); //============================================================================== static AEffect* pluginEntryPoint (audioMasterCallback audioMaster) { + JUCE_AUTORELEASEPOOL initialiseJuce_GUI(); try diff --git a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm index 7fda33c6f1..3d7314f788 100644 --- a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm +++ b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm @@ -32,6 +32,7 @@ #include #include "../juce_PluginHeaders.h" +#include "../juce_PluginHostType.h" #define ADD_CARBON_BODGE 1 // see note below.. @@ -97,7 +98,7 @@ void initialiseMac() void* attachComponentToWindowRef (Component* comp, void* windowRef) { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: windowRef]; [hostWindow retain]; @@ -184,7 +185,7 @@ void* attachComponentToWindowRef (Component* comp, void* windowRef) void detachComponentFromWindowRef (Component* comp, void* nsWindow) { { - const ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL EventHandlerRef ref = (EventHandlerRef) (void*) (pointer_sized_int) comp->getProperties() ["boundsEventRef"].toString().getHexValue64(); @@ -221,12 +222,12 @@ void detachComponentFromWindowRef (Component* comp, void* nsWindow) MessageManager::getInstance()->runDispatchLoopUntil (1); } -void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth, int newHeight) +void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth, int newHeight, const PluginHostType& host) { NSWindow* hostWindow = (NSWindow*) nsWindow; if (hostWindow != 0) { - ScopedAutoReleasePool pool; + JUCE_AUTORELEASEPOOL // Can't use the cocoa NSWindow resizing code, or it messes up in Live. Rect r; @@ -237,7 +238,6 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth r.left = r.top = 0; InvalWindowRect ((WindowRef) [hostWindow windowRef], &r); - //[[hostWindow contentView] setNeedsDisplay: YES]; } } diff --git a/extras/audio plugins/wrapper/juce_PluginHostType.h b/extras/audio plugins/wrapper/juce_PluginHostType.h index a5b586c7e6..cc52cc3a57 100644 --- a/extras/audio plugins/wrapper/juce_PluginHostType.h +++ b/extras/audio plugins/wrapper/juce_PluginHostType.h @@ -55,6 +55,7 @@ public: SteinbergCubaseGeneric, SteinbergWavelab5, SteinbergWavelab6, + SteinbergWavelab7, SteinbergWavelabGeneric, MuseReceptorGeneric }; @@ -94,7 +95,7 @@ public: bool isWavelab() const throw() { - return type == SteinbergWavelabGeneric || type == SteinbergWavelab5 || type == SteinbergWavelab6; + return type == SteinbergWavelabGeneric || type == SteinbergWavelab5 || type == SteinbergWavelab6 || type == SteinbergWavelab7; } bool isReceptor() const throw() @@ -117,6 +118,8 @@ private: if (hostFilename.containsIgnoreCase ("Pro Tools")) return DigidesignProTools; if (hostFilename.containsIgnoreCase ("Cubase 4")) return SteinbergCubase4; if (hostFilename.containsIgnoreCase ("Cubase 5")) return SteinbergCubase5; + if (hostFilename.containsIgnoreCase ("Wavelab 7" )) return SteinbergWavelab7; + if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; if (hostFilename.contains ("Logic")) return AppleLogic; #elif JUCE_WINDOWS @@ -135,6 +138,7 @@ private: if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric; if (hostFilename.containsIgnoreCase ("Wavelab 5")) return SteinbergWavelab5; if (hostFilename.containsIgnoreCase ("Wavelab 6" )) return SteinbergWavelab6; + if (hostFilename.containsIgnoreCase ("Wavelab 7" )) return SteinbergWavelab7; if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric; if (hostFilename.containsIgnoreCase ("reaper")) return Reaper; if (hostFilename.containsIgnoreCase ("Logic")) return EmagicLogic; diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 73891c17ce..b0d55c6030 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -238017,7 +238017,7 @@ int SystemStats::getMemorySizeInMegabytes() uint32 juce_millisecondsSinceStartup() throw() { - return (uint32) GetTickCount(); + return (uint32) timeGetTime(); } int64 Time::getHighResolutionTicks() throw() @@ -259188,9 +259188,12 @@ public: { const XKeyEvent* const keyEvent = (const XKeyEvent*) &event->xkey; updateKeyStates (keyEvent->keycode, false); + KeySym sym; - ScopedXLock xlock; - KeySym sym = XKeycodeToKeysym (display, keyEvent->keycode, 0); + { + ScopedXLock xlock; + sym = XKeycodeToKeysym (display, keyEvent->keycode, 0); + } const ModifierKeys oldMods (currentModifiers); const bool keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, false); @@ -265385,77 +265388,54 @@ const File File::getSpecialLocation (const SpecialLocationType type) switch (type) { - case userHomeDirectory: - resultPath = nsStringToJuce (NSHomeDirectory()); - break; - - case userDocumentsDirectory: - resultPath = "~/Documents"; - break; - - case userDesktopDirectory: - resultPath = "~/Desktop"; - break; - - case userApplicationDataDirectory: - resultPath = "~/Library"; - break; - - case commonApplicationDataDirectory: - resultPath = "/Library"; - break; + case userHomeDirectory: resultPath = nsStringToJuce (NSHomeDirectory()); break; + case userDocumentsDirectory: resultPath = "~/Documents"; break; + case userDesktopDirectory: resultPath = "~/Desktop"; break; + case userApplicationDataDirectory: resultPath = "~/Library"; break; + case commonApplicationDataDirectory: resultPath = "/Library"; break; + case globalApplicationsDirectory: resultPath = "/Applications"; break; + case userMusicDirectory: resultPath = "~/Music"; break; + case userMoviesDirectory: resultPath = "~/Movies"; break; - case globalApplicationsDirectory: - resultPath = "/Applications"; - break; - - case userMusicDirectory: - resultPath = "~/Music"; - break; - - case userMoviesDirectory: - resultPath = "~/Movies"; - break; - - case tempDirectory: - { - File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension()); + case tempDirectory: + { + File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension()); - tmp.createDirectory(); - return tmp.getFullPathName(); - } + tmp.createDirectory(); + return tmp.getFullPathName(); + } - case invokedExecutableFile: - if (juce_Argv0 != 0) - return File (String::fromUTF8 (juce_Argv0)); - // deliberate fall-through... + case invokedExecutableFile: + if (juce_Argv0 != 0) + return File (String::fromUTF8 (juce_Argv0)); + // deliberate fall-through... - case currentExecutableFile: - return juce_getExecutableFile(); + case currentExecutableFile: + return juce_getExecutableFile(); - case currentApplicationFile: - { - const File exe (juce_getExecutableFile()); - const File parent (exe.getParentDirectory()); + case currentApplicationFile: + { + const File exe (juce_getExecutableFile()); + const File parent (exe.getParentDirectory()); - return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS") - ? parent.getParentDirectory().getParentDirectory() - : exe; - } + return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS") + ? parent.getParentDirectory().getParentDirectory() + : exe; + } - case hostApplicationPath: - { - unsigned int size = 8192; - HeapBlock buffer; - buffer.calloc (size + 8); + case hostApplicationPath: + { + unsigned int size = 8192; + HeapBlock buffer; + buffer.calloc (size + 8); - _NSGetExecutablePath (buffer.getData(), &size); - return String::fromUTF8 (buffer, size); - } + _NSGetExecutablePath (buffer.getData(), &size); + return String::fromUTF8 (buffer, size); + } - default: - jassertfalse; // unknown type? - break; + default: + jassertfalse; // unknown type? + break; } if (resultPath.isNotEmpty()) @@ -265489,7 +265469,7 @@ const String File::getVersion() const const File File::getLinkedTarget() const { -#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) NSString* dest = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath: juceStringToNS (getFullPathName()) error: nil]; #else @@ -265701,7 +265681,7 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) { const ScopedAutoReleasePool pool; -#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) NSDictionary* fileDict = [[NSFileManager defaultManager] attributesOfItemAtPath: juceStringToNS (filename) error: nil]; #else NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 113a9285ba..16d2502a03 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -64,7 +64,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 63 +#define JUCE_BUILDNUMBER 64 /** Current Juce version number. diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index f068e76114..3094ef198b 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 63 +#define JUCE_BUILDNUMBER 64 /** Current Juce version number. diff --git a/src/native/linux/juce_linux_Windowing.cpp b/src/native/linux/juce_linux_Windowing.cpp index 2be3db0194..a5bb3f0a45 100644 --- a/src/native/linux/juce_linux_Windowing.cpp +++ b/src/native/linux/juce_linux_Windowing.cpp @@ -1328,9 +1328,12 @@ public: { const XKeyEvent* const keyEvent = (const XKeyEvent*) &event->xkey; updateKeyStates (keyEvent->keycode, false); + KeySym sym; - ScopedXLock xlock; - KeySym sym = XKeycodeToKeysym (display, keyEvent->keycode, 0); + { + ScopedXLock xlock; + sym = XKeycodeToKeysym (display, keyEvent->keycode, 0); + } const ModifierKeys oldMods (currentModifiers); const bool keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, false); diff --git a/src/native/mac/juce_mac_Files.mm b/src/native/mac/juce_mac_Files.mm index e9947d00df..cad85817f1 100644 --- a/src/native/mac/juce_mac_Files.mm +++ b/src/native/mac/juce_mac_Files.mm @@ -147,77 +147,54 @@ const File File::getSpecialLocation (const SpecialLocationType type) switch (type) { - case userHomeDirectory: - resultPath = nsStringToJuce (NSHomeDirectory()); - break; - - case userDocumentsDirectory: - resultPath = "~/Documents"; - break; - - case userDesktopDirectory: - resultPath = "~/Desktop"; - break; - - case userApplicationDataDirectory: - resultPath = "~/Library"; - break; - - case commonApplicationDataDirectory: - resultPath = "/Library"; - break; - - case globalApplicationsDirectory: - resultPath = "/Applications"; - break; - - case userMusicDirectory: - resultPath = "~/Music"; - break; - - case userMoviesDirectory: - resultPath = "~/Movies"; - break; - - case tempDirectory: - { - File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension()); + case userHomeDirectory: resultPath = nsStringToJuce (NSHomeDirectory()); break; + case userDocumentsDirectory: resultPath = "~/Documents"; break; + case userDesktopDirectory: resultPath = "~/Desktop"; break; + case userApplicationDataDirectory: resultPath = "~/Library"; break; + case commonApplicationDataDirectory: resultPath = "/Library"; break; + case globalApplicationsDirectory: resultPath = "/Applications"; break; + case userMusicDirectory: resultPath = "~/Music"; break; + case userMoviesDirectory: resultPath = "~/Movies"; break; + + case tempDirectory: + { + File tmp ("~/Library/Caches/" + juce_getExecutableFile().getFileNameWithoutExtension()); - tmp.createDirectory(); - return tmp.getFullPathName(); - } + tmp.createDirectory(); + return tmp.getFullPathName(); + } - case invokedExecutableFile: - if (juce_Argv0 != 0) - return File (String::fromUTF8 (juce_Argv0)); - // deliberate fall-through... + case invokedExecutableFile: + if (juce_Argv0 != 0) + return File (String::fromUTF8 (juce_Argv0)); + // deliberate fall-through... - case currentExecutableFile: - return juce_getExecutableFile(); + case currentExecutableFile: + return juce_getExecutableFile(); - case currentApplicationFile: - { - const File exe (juce_getExecutableFile()); - const File parent (exe.getParentDirectory()); + case currentApplicationFile: + { + const File exe (juce_getExecutableFile()); + const File parent (exe.getParentDirectory()); - return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS") - ? parent.getParentDirectory().getParentDirectory() - : exe; - } + return parent.getFullPathName().endsWithIgnoreCase ("Contents/MacOS") + ? parent.getParentDirectory().getParentDirectory() + : exe; + } - case hostApplicationPath: - { - unsigned int size = 8192; - HeapBlock buffer; - buffer.calloc (size + 8); + case hostApplicationPath: + { + unsigned int size = 8192; + HeapBlock buffer; + buffer.calloc (size + 8); - _NSGetExecutablePath (buffer.getData(), &size); - return String::fromUTF8 (buffer, size); - } + _NSGetExecutablePath (buffer.getData(), &size); + return String::fromUTF8 (buffer, size); + } - default: - jassertfalse; // unknown type? - break; + default: + jassertfalse; // unknown type? + break; } if (resultPath.isNotEmpty()) @@ -253,7 +230,7 @@ const String File::getVersion() const //============================================================================== const File File::getLinkedTarget() const { -#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) NSString* dest = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath: juceStringToNS (getFullPathName()) error: nil]; #else @@ -471,7 +448,7 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) { const ScopedAutoReleasePool pool; -#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +#if JUCE_IOS || (defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_X_VERSION_10_5) NSDictionary* fileDict = [[NSFileManager defaultManager] attributesOfItemAtPath: juceStringToNS (filename) error: nil]; #else NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; diff --git a/src/native/windows/juce_win32_SystemStats.cpp b/src/native/windows/juce_win32_SystemStats.cpp index 0c55e2318c..2c8bede913 100644 --- a/src/native/windows/juce_win32_SystemStats.cpp +++ b/src/native/windows/juce_win32_SystemStats.cpp @@ -220,7 +220,7 @@ int SystemStats::getMemorySizeInMegabytes() //============================================================================== uint32 juce_millisecondsSinceStartup() throw() { - return (uint32) GetTickCount(); + return (uint32) timeGetTime(); } int64 Time::getHighResolutionTicks() throw()