Browse Source

Version number bump.

tags/2021-05-28
jules 13 years ago
parent
commit
df5d50bcd8
19 changed files with 69 additions and 104 deletions
  1. +1
    -1
      modules/juce_audio_basics/juce_module_info
  2. +1
    -1
      modules/juce_audio_devices/juce_module_info
  3. +1
    -1
      modules/juce_audio_formats/juce_module_info
  4. +1
    -1
      modules/juce_audio_plugin_client/juce_module_info
  5. +1
    -1
      modules/juce_audio_processors/juce_module_info
  6. +1
    -1
      modules/juce_audio_utils/juce_module_info
  7. +1
    -1
      modules/juce_browser_plugin/juce_module_info
  8. +49
    -84
      modules/juce_core/files/juce_File.cpp
  9. +3
    -3
      modules/juce_core/files/juce_File.h
  10. +1
    -1
      modules/juce_core/juce_module_info
  11. +1
    -1
      modules/juce_core/system/juce_StandardHeader.h
  12. +1
    -1
      modules/juce_cryptography/juce_module_info
  13. +1
    -1
      modules/juce_data_structures/juce_module_info
  14. +1
    -1
      modules/juce_events/juce_module_info
  15. +1
    -1
      modules/juce_graphics/juce_module_info
  16. +1
    -1
      modules/juce_gui_basics/juce_module_info
  17. +1
    -1
      modules/juce_gui_extra/juce_module_info
  18. +1
    -1
      modules/juce_opengl/juce_module_info
  19. +1
    -1
      modules/juce_video/juce_module_info

+ 1
- 1
modules/juce_audio_basics/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_basics", "id": "juce_audio_basics",
"name": "JUCE audio and midi data classes", "name": "JUCE audio and midi data classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for audio buffer manipulation, midi message handling, synthesis, etc", "description": "Classes for audio buffer manipulation, midi message handling, synthesis, etc",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_audio_devices/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_devices", "id": "juce_audio_devices",
"name": "JUCE audio and midi I/O device classes", "name": "JUCE audio and midi I/O device classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes to play and record from audio and midi i/o devices.", "description": "Classes to play and record from audio and midi i/o devices.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_audio_formats/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_formats", "id": "juce_audio_formats",
"name": "JUCE audio file format codecs", "name": "JUCE audio file format codecs",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for reading and writing various audio file formats.", "description": "Classes for reading and writing various audio file formats.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_audio_plugin_client/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_plugin_client", "id": "juce_audio_plugin_client",
"name": "JUCE audio plugin wrapper classes", "name": "JUCE audio plugin wrapper classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for building VST, RTAS and AU plugins.", "description": "Classes for building VST, RTAS and AU plugins.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_audio_processors/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_processors", "id": "juce_audio_processors",
"name": "JUCE audio plugin hosting classes", "name": "JUCE audio plugin hosting classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for loading and playing VST, AU, or internally-generated audio processors.", "description": "Classes for loading and playing VST, AU, or internally-generated audio processors.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_audio_utils/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_audio_utils", "id": "juce_audio_utils",
"name": "JUCE extra audio utility classes", "name": "JUCE extra audio utility classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for audio-related GUI and miscellaneous tasks.", "description": "Classes for audio-related GUI and miscellaneous tasks.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_browser_plugin/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_browser_plugin_client", "id": "juce_browser_plugin_client",
"name": "JUCE browser plugin wrapper classes", "name": "JUCE browser plugin wrapper classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for building NPAPI and ActiveX browser plugins.", "description": "Classes for building NPAPI and ActiveX browser plugins.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 49
- 84
modules/juce_core/files/juce_File.cpp View File

@@ -28,7 +28,7 @@ File::File (const String& fullPathName)
{ {
} }
File File::createFileWithoutCheckingPath (const String& path)
File File::createFileWithoutCheckingPath (const String& path) noexcept
{ {
File f; File f;
f.fullPath = path; f.fullPath = path;
@@ -176,37 +176,19 @@ bool File::areFileNamesCaseSensitive()
#endif #endif
} }
bool File::operator== (const File& other) const
static int compareFilenames (const String& name1, const String& name2) noexcept
{ {
#if NAMES_ARE_CASE_SENSITIVE #if NAMES_ARE_CASE_SENSITIVE
return fullPath == other.fullPath;
return name1.compare (name2);
#else #else
return fullPath.equalsIgnoreCase (other.fullPath);
return name1.compareIgnoreCase (name2);
#endif #endif
} }
bool File::operator!= (const File& other) const
{
return ! operator== (other);
}
bool File::operator< (const File& other) const
{
#if NAMES_ARE_CASE_SENSITIVE
return fullPath < other.fullPath;
#else
return fullPath.compareIgnoreCase (other.fullPath) < 0;
#endif
}
bool File::operator> (const File& other) const
{
#if NAMES_ARE_CASE_SENSITIVE
return fullPath > other.fullPath;
#else
return fullPath.compareIgnoreCase (other.fullPath) > 0;
#endif
}
bool File::operator== (const File& other) const { return compareFilenames (fullPath, other.fullPath) == 0; }
bool File::operator!= (const File& other) const { return compareFilenames (fullPath, other.fullPath) != 0; }
bool File::operator< (const File& other) const { return compareFilenames (fullPath, other.fullPath) < 0; }
bool File::operator> (const File& other) const { return compareFilenames (fullPath, other.fullPath) > 0; }
//============================================================================== //==============================================================================
bool File::setReadOnly (const bool shouldBeReadOnly, bool File::setReadOnly (const bool shouldBeReadOnly,
@@ -269,15 +251,14 @@ bool File::copyDirectoryTo (const File& newDirectory) const
Array<File> subFiles; Array<File> subFiles;
findChildFiles (subFiles, File::findFiles, false); findChildFiles (subFiles, File::findFiles, false);
int i;
for (i = 0; i < subFiles.size(); ++i)
for (int i = 0; i < subFiles.size(); ++i)
if (! subFiles.getReference(i).copyFileTo (newDirectory.getChildFile (subFiles.getReference(i).getFileName()))) if (! subFiles.getReference(i).copyFileTo (newDirectory.getChildFile (subFiles.getReference(i).getFileName())))
return false; return false;
subFiles.clear(); subFiles.clear();
findChildFiles (subFiles, File::findDirectories, false); findChildFiles (subFiles, File::findDirectories, false);
for (i = 0; i < subFiles.size(); ++i)
for (int i = 0; i < subFiles.size(); ++i)
if (! subFiles.getReference(i).copyDirectoryTo (newDirectory.getChildFile (subFiles.getReference(i).getFileName()))) if (! subFiles.getReference(i).copyDirectoryTo (newDirectory.getChildFile (subFiles.getReference(i).getFileName())))
return false; return false;
@@ -313,20 +294,10 @@ String File::getFileName() const
return fullPath.substring (fullPath.lastIndexOfChar (separator) + 1); return fullPath.substring (fullPath.lastIndexOfChar (separator) + 1);
} }
int File::hashCode() const
{
return fullPath.hashCode();
}
int64 File::hashCode64() const
{
return fullPath.hashCode64();
}
String File::getFileNameWithoutExtension() const String File::getFileNameWithoutExtension() const
{ {
const int lastSlash = fullPath.lastIndexOfChar (separator) + 1; const int lastSlash = fullPath.lastIndexOfChar (separator) + 1;
const int lastDot = fullPath.lastIndexOfChar ('.');
const int lastDot = fullPath.lastIndexOfChar ('.');
if (lastDot > lastSlash) if (lastDot > lastSlash)
return fullPath.substring (lastSlash, lastDot); return fullPath.substring (lastSlash, lastDot);
@@ -341,24 +312,18 @@ bool File::isAChildOf (const File& potentialParent) const
const String ourPath (getPathUpToLastSlash()); const String ourPath (getPathUpToLastSlash());
#if NAMES_ARE_CASE_SENSITIVE
if (potentialParent.fullPath == ourPath)
#else
if (potentialParent.fullPath.equalsIgnoreCase (ourPath))
#endif
{
if (compareFilenames (potentialParent.fullPath, ourPath) == 0)
return true; return true;
}
else if (potentialParent.fullPath.length() >= ourPath.length())
{
if (potentialParent.fullPath.length() >= ourPath.length())
return false; return false;
}
else
{
return getParentDirectory().isAChildOf (potentialParent);
}
return getParentDirectory().isAChildOf (potentialParent);
} }
int File::hashCode() const { return fullPath.hashCode(); }
int64 File::hashCode64() const { return fullPath.hashCode64(); }
//============================================================================== //==============================================================================
bool File::isAbsolutePath (const String& path) bool File::isAbsolutePath (const String& path)
{ {
@@ -381,9 +346,7 @@ File File::getChildFile (String relativePath) const
if (relativePath[0] == '.') if (relativePath[0] == '.')
{ {
#if JUCE_WINDOWS #if JUCE_WINDOWS
relativePath = relativePath.replaceCharacter ('/', '\\').trimStart();
#else
relativePath = relativePath.trimStart();
relativePath = relativePath.replaceCharacter ('/', '\\');
#endif #endif
while (relativePath[0] == '.') while (relativePath[0] == '.')
@@ -429,11 +392,16 @@ File File::getSiblingFile (const String& fileName) const
//============================================================================== //==============================================================================
String File::descriptionOfSizeInBytes (const int64 bytes) String File::descriptionOfSizeInBytes (const int64 bytes)
{ {
if (bytes == 1) return "1 byte";
else if (bytes < 1024) return String (bytes) + " bytes";
else if (bytes < 1024 * 1024) return String (bytes / 1024.0, 1) + " KB";
else if (bytes < 1024 * 1024 * 1024) return String (bytes / (1024.0 * 1024.0), 1) + " MB";
else return String (bytes / (1024.0 * 1024.0 * 1024.0), 1) + " GB";
const char* suffix;
double divisor = 0;
if (bytes == 1) { suffix = " byte"; }
else if (bytes < 1024) { suffix = " bytes"; }
else if (bytes < 1024 * 1024) { suffix = " KB"; divisor = 1024.0; }
else if (bytes < 1024 * 1024 * 1024) { suffix = " MB"; divisor = 1024.0 * 1024.0; }
else { suffix = " GB"; divisor = 1024.0 * 1024.0 * 1024.0; }
return (divisor > 0 ? String (bytes / divisor, 1) : String (bytes)) + suffix;
} }
//============================================================================== //==============================================================================
@@ -452,7 +420,6 @@ Result File::create() const
if (r.wasOk()) if (r.wasOk())
{ {
FileOutputStream fo (*this, 8); FileOutputStream fo (*this, 8);
r = fo.getStatus(); r = fo.getStatus();
} }
@@ -542,26 +509,24 @@ int File::getNumberOfChildFiles (const int whatToLookFor, const String& wildCard
bool File::containsSubDirectories() const bool File::containsSubDirectories() const
{ {
if (isDirectory())
{
DirectoryIterator di (*this, false, "*", findDirectories);
return di.next();
}
if (! isDirectory())
return false;
return false;
DirectoryIterator di (*this, false, "*", findDirectories);
return di.next();
} }
//============================================================================== //==============================================================================
File File::getNonexistentChildFile (const String& prefix_,
File File::getNonexistentChildFile (const String& suggestedPrefix,
const String& suffix, const String& suffix,
bool putNumbersInBrackets) const bool putNumbersInBrackets) const
{ {
File f (getChildFile (prefix_ + suffix));
File f (getChildFile (suggestedPrefix + suffix));
if (f.exists()) if (f.exists())
{ {
int num = 2;
String prefix (prefix_);
int number = 1;
String prefix (suggestedPrefix);
// remove any bracketed numbers that may already be on the end.. // remove any bracketed numbers that may already be on the end..
if (prefix.trim().endsWithChar (')')) if (prefix.trim().endsWithChar (')'))
@@ -575,23 +540,23 @@ File File::getNonexistentChildFile (const String& prefix_,
&& closeBracks > openBracks && closeBracks > openBracks
&& prefix.substring (openBracks + 1, closeBracks).containsOnly ("0123456789")) && prefix.substring (openBracks + 1, closeBracks).containsOnly ("0123456789"))
{ {
num = prefix.substring (openBracks + 1, closeBracks).getIntValue() + 1;
number = prefix.substring (openBracks + 1, closeBracks).getIntValue();
prefix = prefix.substring (0, openBracks); prefix = prefix.substring (0, openBracks);
} }
} }
// also use brackets if it ends in a digit. // also use brackets if it ends in a digit.
putNumbersInBrackets = putNumbersInBrackets putNumbersInBrackets = putNumbersInBrackets
|| CharacterFunctions::isDigit (prefix.getLastCharacter());
|| CharacterFunctions::isDigit (prefix.getLastCharacter());
do do
{ {
String newName (prefix); String newName (prefix);
if (putNumbersInBrackets) if (putNumbersInBrackets)
newName << '(' << num++ << ')';
newName << '(' << ++number << ')';
else else
newName << num++;
newName << ++number;
f = getChildFile (newName + suffix); f = getChildFile (newName + suffix);
@@ -603,12 +568,12 @@ File File::getNonexistentChildFile (const String& prefix_,
File File::getNonexistentSibling (const bool putNumbersInBrackets) const File File::getNonexistentSibling (const bool putNumbersInBrackets) const
{ {
if (exists())
return getParentDirectory()
.getNonexistentChildFile (getFileNameWithoutExtension(),
getFileExtension(),
putNumbersInBrackets);
return *this;
if (! exists())
return *this;
return getParentDirectory().getNonexistentChildFile (getFileNameWithoutExtension(),
getFileExtension(),
putNumbersInBrackets);
} }
//============================================================================== //==============================================================================
@@ -658,7 +623,7 @@ File File::withFileExtension (const String& newExtension) const
String filePart (getFileName()); String filePart (getFileName());
int i = filePart.lastIndexOfChar ('.');
const int i = filePart.lastIndexOfChar ('.');
if (i >= 0) if (i >= 0)
filePart = filePart.substring (0, i); filePart = filePart.substring (0, i);


+ 3
- 3
modules/juce_core/files/juce_File.h View File

@@ -60,7 +60,7 @@ public:
You can use its operator= method to point it at a proper file. You can use its operator= method to point it at a proper file.
*/ */
File() {}
File() noexcept {}
/** Creates a file from an absolute path. /** Creates a file from an absolute path.
@@ -78,7 +78,7 @@ public:
File (const File& other); File (const File& other);
/** Destructor. */ /** Destructor. */
~File() {}
~File() noexcept {}
/** Sets the file based on an absolute pathname. /** Sets the file based on an absolute pathname.
@@ -925,7 +925,7 @@ public:
Best to avoid this unless you really know what you're doing. Best to avoid this unless you really know what you're doing.
*/ */
static File createFileWithoutCheckingPath (const String& path);
static File createFileWithoutCheckingPath (const String& path) noexcept;
/** Adds a separator character to the end of a path if it doesn't already have one. */ /** Adds a separator character to the end of a path if it doesn't already have one. */
static String addTrailingSeparator (const String& path); static String addTrailingSeparator (const String& path);


+ 1
- 1
modules/juce_core/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_core", "id": "juce_core",
"name": "JUCE core classes", "name": "JUCE core classes",
"version": "2.0.20",
"version": "2.0.21",
"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.", "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", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_core/system/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/ */
#define JUCE_MAJOR_VERSION 2 #define JUCE_MAJOR_VERSION 2
#define JUCE_MINOR_VERSION 0 #define JUCE_MINOR_VERSION 0
#define JUCE_BUILDNUMBER 20
#define JUCE_BUILDNUMBER 21
/** Current Juce version number. /** Current Juce version number.


+ 1
- 1
modules/juce_cryptography/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_cryptography", "id": "juce_cryptography",
"name": "JUCE cryptography classes", "name": "JUCE cryptography classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.", "description": "Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_data_structures/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_data_structures", "id": "juce_data_structures",
"name": "JUCE data model helper classes", "name": "JUCE data model helper classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for undo/redo management, and smart data structures.", "description": "Classes for undo/redo management, and smart data structures.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_events/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_events", "id": "juce_events",
"name": "JUCE message and event handling classes", "name": "JUCE message and event handling classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for running an application's main event loop and sending/receiving messages, timers, etc.", "description": "Classes for running an application's main event loop and sending/receiving messages, timers, etc.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_graphics/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_graphics", "id": "juce_graphics",
"name": "JUCE graphics classes", "name": "JUCE graphics classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for 2D vector graphics, image loading/saving, font handling, etc.", "description": "Classes for 2D vector graphics, image loading/saving, font handling, etc.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_gui_basics/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_gui_basics", "id": "juce_gui_basics",
"name": "JUCE GUI core classes", "name": "JUCE GUI core classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Basic user-interface components and related classes.", "description": "Basic user-interface components and related classes.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_gui_extra/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_gui_extra", "id": "juce_gui_extra",
"name": "JUCE extended GUI classes", "name": "JUCE extended GUI classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Miscellaneous GUI classes for specialised tasks.", "description": "Miscellaneous GUI classes for specialised tasks.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_opengl/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_opengl", "id": "juce_opengl",
"name": "JUCE OpenGL classes", "name": "JUCE OpenGL classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for rendering OpenGL in a JUCE window.", "description": "Classes for rendering OpenGL in a JUCE window.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


+ 1
- 1
modules/juce_video/juce_module_info View File

@@ -1,7 +1,7 @@
{ {
"id": "juce_video", "id": "juce_video",
"name": "JUCE video playback and capture classes", "name": "JUCE video playback and capture classes",
"version": "2.0.20",
"version": "2.0.21",
"description": "Classes for playing video and capturing camera input.", "description": "Classes for playing video and capturing camera input.",
"website": "http://www.juce.com/juce", "website": "http://www.juce.com/juce",
"license": "GPL/Commercial", "license": "GPL/Commercial",


Loading…
Cancel
Save