Browse Source

Minor updates for plugins. Fixed some X windows locking.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
0a6aaea93b
15 changed files with 259 additions and 157 deletions
  1. +5
    -2
      extras/Jucer (experimental)/Source/Application/jucer_Application.h
  2. +104
    -0
      extras/audio plugins/demo/Builds/Linux/Makefile
  3. +1
    -0
      extras/audio plugins/demo/JuceDemoPlugin.jucer
  4. +4
    -4
      extras/audio plugins/wrapper/AU/juce_AU_Wrapper.mm
  5. +2
    -2
      extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm
  6. +4
    -3
      extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp
  7. +32
    -3
      extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp
  8. +5
    -5
      extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm
  9. +5
    -1
      extras/audio plugins/wrapper/juce_PluginHostType.h
  10. +47
    -67
      juce_amalgamated.cpp
  11. +1
    -1
      juce_amalgamated.h
  12. +1
    -1
      src/core/juce_StandardHeader.h
  13. +5
    -2
      src/native/linux/juce_linux_Windowing.cpp
  14. +42
    -65
      src/native/mac/juce_mac_Files.mm
  15. +1
    -1
      src/native/windows/juce_win32_SystemStats.cpp

+ 5
- 2
extras/Jucer (experimental)/Source/Application/jucer_Application.h View File

@@ -365,11 +365,14 @@ public:
ScopedPointer <Project> newProj (NewProjectWizard::runNewProjectWizard (mw));
if (newProj != 0)
{
mw->setProject (newProj.release());
mw->setVisible (true);
}
else
{
closeWindow (mw);
mw->setVisible (true);
}
}
void askUserToOpenFile()


+ 104
- 0
extras/audio plugins/demo/Builds/Linux/Makefile View File

@@ -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)

+ 1
- 0
extras/audio plugins/demo/JuceDemoPlugin.jucer View File

@@ -16,6 +16,7 @@
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../../.." libraryType="1"/>
<VS2008 targetFolder="Builds/VisualStudio2008" vstFolder="c:\SDKs\vstsdk2.4"
rtasFolder="c:\SDKs\PT_80_SDK" juceFolder="../../.." libraryType="1"/>
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" juceFolder="../../.."/>
</EXPORTFORMATS>
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemoPlugin"


+ 4
- 4
extras/audio plugins/wrapper/AU/juce_AU_Wrapper.mm View File

@@ -244,7 +244,7 @@ public:
if (PlatformUtilities::getOSXMinorVersionNumber() > 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];


+ 2
- 2
extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm View File

@@ -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;


+ 4
- 3
extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp View File

@@ -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();


+ 32
- 3
extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp View File

@@ -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


+ 5
- 5
extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm View File

@@ -32,6 +32,7 @@
#include <Carbon/Carbon.h>
#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];
}
}


+ 5
- 1
extras/audio plugins/wrapper/juce_PluginHostType.h View File

@@ -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;


+ 47
- 67
juce_amalgamated.cpp View File

@@ -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<char> buffer;
buffer.calloc (size + 8);
case hostApplicationPath:
{
unsigned int size = 8192;
HeapBlock<char> 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];


+ 1
- 1
juce_amalgamated.h View File

@@ -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.



+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -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.


+ 5
- 2
src/native/linux/juce_linux_Windowing.cpp View File

@@ -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);


+ 42
- 65
src/native/mac/juce_mac_Files.mm View File

@@ -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<char> buffer;
buffer.calloc (size + 8);
case hostApplicationPath:
{
unsigned int size = 8192;
HeapBlock<char> 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];


+ 1
- 1
src/native/windows/juce_win32_SystemStats.cpp View File

@@ -220,7 +220,7 @@ int SystemStats::getMemorySizeInMegabytes()
//==============================================================================
uint32 juce_millisecondsSinceStartup() throw()
{
return (uint32) GetTickCount();
return (uint32) timeGetTime();
}
int64 Time::getHighResolutionTicks() throw()


Loading…
Cancel
Save