1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00
This commit is contained in:
Emily Mabrey 2021-07-11 14:49:31 -04:00
commit d90999edce
No known key found for this signature in database
GPG Key ID: 6F4EF47256A1B7DC
11 changed files with 58 additions and 39 deletions

View File

@ -257,18 +257,17 @@ if( CMAKE_GENERATOR MATCHES "Visual Studio" )
include( InstallRequiredSystemLibraries )
endif()
# Where the final product is stored
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
set ( _SHARED_PROXY_BASE "shared" )
set ( _SHARED_PROXY_BASE_PATH "${CMAKE_BINARY_DIR}/${_SHARED_PROXY_BASE}")
# Define the non-install and executable paths
# Define the non-install and executable paths and where the final product is stored
if( CMAKE_CONFIGURATION_TYPES )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
set( _DESTDIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}" )
set( _SHARED_PROXY_PATH "${_SHARED_PROXY_BASE_PATH}/${CMAKE_CFG_INTDIR}")
else()
set( _DESTDIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE} )
set( _DESTDIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" )
set( _SHARED_PROXY_PATH "${_SHARED_PROXY_BASE_PATH}/${CMAKE_BUILD_TYPE}")
endif()

View File

@ -5,6 +5,7 @@
[![Open issues](https://badgen.net/github/open-issues/tenacityteam/tenacity)](https://github.com/tenacityteam/tenacity/issues)
[![GitHub builds](https://badgen.net/github/checks/tenacityteam/tenacity/master?label=github)](https://github.com/tenacityteam/tenacity/actions?query=branch%3Amaster)
[![builds.sr.ht](https://builds.sr.ht/~tenacity/tenacity/.svg)](https://builds.sr.ht/~tenacity/tenacity/?)
[![Translation status](https://hosted.weblate.org/widgets/tenacity/-/tenacity/svg-badge.svg)](https://hosted.weblate.org/engage/tenacity/)
Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux and other operating systems and is developed by a group of volunteers as open source software.
@ -38,4 +39,4 @@ Build instructions for Tenacity are available in the [BUILDING.md file](BUILDING
### Translation
Thank you to Weblate for providing translation SaaS hosting at [weblate.org](https://hosted.weblate.org/projects/tenacity/tenacity/).
Thank you to Weblate for providing translation SaaS hosting at [weblate.org](https://hosted.weblate.org/projects/tenacity/tenacity/).

View File

@ -246,7 +246,7 @@ macro( resolve_conan_dependencies )
OPTIONS ${CONAN_PACKAGE_OPTIONS}
")
if(MSVC OR XCODE)
if(MSVC OR XCODE AND NOT DEFINED CMAKE_BUILD_TYPE)
foreach(TYPE ${CMAKE_CONFIGURATION_TYPES})
_conan_install(${TYPE})
endforeach()

View File

@ -14,8 +14,6 @@
UTILITY_API void lib_utility_dummy_symbol()
{}
#ifdef __APPLE__
constexpr auto sizeof_align_val = sizeof(std::align_val_t);
void *NonInterferingBase::operator new(std::size_t count, std::align_val_t al)
@ -54,5 +52,3 @@ void NonInterferingBase::operator delete(void *ptr, std::align_val_t al)
// Call through to default operator
::operator delete(p);
}
#endif

View File

@ -594,10 +594,21 @@ struct UTILITY_API alignas(
64 /* ? */
#endif
)
NonInterferingBase {
#ifdef __APPLE__
static void *operator new(std::size_t count, std::align_val_t al);
static void operator delete(void *ptr, std::align_val_t al);
#if defined (_MSC_VER) && defined(_DEBUG)
// Versions that work in the presence of the DEBUG_NEW macro.
// Ignore the arguments supplied by the macro and forward to the
// other overloads.
static void *operator new(
std::size_t count, std::align_val_t al, int, const char *, int)
{ return operator new(count, al); }
static void operator delete(
void *ptr, std::align_val_t al, int, const char *, int)
{ return operator delete(ptr, al); }
#endif
};

View File

@ -1137,13 +1137,16 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
)
# Copy the VC runtime libraries as well
add_custom_command(
TARGET
${TARGET}
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${_DEST}
POST_BUILD
)
if(NOT "_X${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}" STREQUAL "_X")
add_custom_command(
TARGET
${TARGET}
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${_DEST}
POST_BUILD
)
endif()
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
# Bug 2400 workaround
#

View File

@ -716,6 +716,22 @@ char *FileNames::VerifyFilename(const wxString &s, bool input)
}
#endif
bool FileNames::WritableLocationCheck(const FilePath& path)
{
bool status = wxFileName::IsDirWritable(path);
if (!status)
{
AudacityMessageBox(
XO("Directory %s does not have write permissions")
.Format(path),
XO("Error"),
wxOK | wxICON_ERROR);
}
return status;
}
// Using this with wxStringArray::Sort will give you a list that
// is alphabetical, without depending on case. If you use the
// default sort, you will get strings with 'R' before 'a', because it is in caps.

View File

@ -221,6 +221,9 @@ namespace FileNames
AUDACITY_DLL_API char *VerifyFilename(const wxString &s, bool input = true);
#endif
//! Check location on writable access and return true if checked successfully.
AUDACITY_DLL_API bool WritableLocationCheck(const FilePath& path);
// wxString compare function for sorting case, which is needed to load correctly.
AUDACITY_DLL_API int CompareNoCase(const wxString& first, const wxString& second);

View File

@ -171,8 +171,8 @@ private:
field(sel0, double);
field(sel1, double);
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
field(selLow, double);
field(selHigh, double);
field(selLow, double) = SelectedRegion::UndefinedFrequency;
field(selHigh, double) = SelectedRegion::UndefinedFrequency;
#endif
field(rate, double);
field(snapto, bool);

View File

@ -63,6 +63,11 @@ void DoExport(AudacityProject &project, const FileExtension &format)
// We either use a configured output path,
// or we use the default documents folder - just as for exports.
FilePath pathName = FileNames::FindDefaultPath(FileNames::Operation::MacrosOut);
if (!FileNames::WritableLocationCheck(pathName))
{
return;
}
/*
// If we've gotten to this point, we are in batch mode, have a file format,
// and the project has either been saved or a file has been imported. So, we

View File

@ -38,6 +38,7 @@
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/ReadOnlyText.h"
#include "../widgets/wxTextCtrlWrapper.h"
#include "../FileNames.h"
using namespace FileNames;
using namespace TempDirectory;
@ -267,22 +268,6 @@ void DirectoriesPrefs::PopulateOrExchange(ShuttleGui &S)
S.EndScroller();
}
bool WritableLocationCheck(const FilePath &path)
{
bool Status = wxFileName ::IsDirWritable(path);
if (!Status)
{
AudacityMessageBox(
XO("Directory %s does not have write permissions")
.Format(path),
XO("Error"),
wxOK | wxICON_ERROR);
return true;
}
return false;
}
void DirectoriesPrefs::OnTempBrowse(wxCommandEvent &evt)
{
wxString oldTemp = gPrefs->Read(PreferenceKey(Operation::Open, PathType::_None),
@ -311,7 +296,7 @@ void DirectoriesPrefs::OnTempBrowse(wxCommandEvent &evt)
return;
}
if (WritableLocationCheck(dlog.GetPath()))
if (!FileNames::WritableLocationCheck(dlog.GetPath()))
{
return;
}
@ -392,7 +377,7 @@ void DirectoriesPrefs::OnBrowse(wxCommandEvent &evt)
}
}
if (WritableLocationCheck(dlog.GetPath()))
if (!FileNames::WritableLocationCheck(dlog.GetPath()))
{
return;
}