Can build for windows without precompiled headers...
... Requires some more wx header inclusions, a renaming of CopyFile (to avoid colliding with a certain macro changing it to CopyFileW), and an explicit deletion of a copy constructor and assignment (to avoid generation of std::vector members for an incomplete type)
This commit is contained in:
parent
5f5a477dbf
commit
4ff0a9d74e
|
@ -1097,7 +1097,7 @@ void MacroCommands::MigrateLegacyChains()
|
|||
newDir.SetFullName(name);
|
||||
const auto newPath = newDir.GetFullPath();
|
||||
if (!wxFileExists(newPath))
|
||||
FileNames::CopyFile(file, newPath);
|
||||
FileNames::DoCopyFile(file, newPath);
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
|
||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include <wx/evtloop.h>
|
||||
#endif
|
||||
|
||||
#include "wxFileNameWrapper.h"
|
||||
#include "AudacityLogger.h"
|
||||
#include "AudioIOBase.h"
|
||||
|
|
|
@ -1283,7 +1283,7 @@ BlockFilePtr DirManager::CopyBlockFile(const BlockFilePtr &b)
|
|||
//a summary file, so we should check before we copy.
|
||||
if(b->IsSummaryAvailable())
|
||||
{
|
||||
if( !FileNames::CopyFile(fn.GetFullPath(),
|
||||
if( !FileNames::DoCopyFile(fn.GetFullPath(),
|
||||
newFile.GetFullPath()) )
|
||||
// Disk space exhaustion, maybe
|
||||
throw FileException{
|
||||
|
@ -1423,7 +1423,7 @@ std::pair<bool, FilePath> DirManager::LinkOrCopyToNewProjectDirectory(
|
|||
success = FileNames::HardLinkFile( oldPath, newPath );
|
||||
if (!success)
|
||||
link = false,
|
||||
success = FileNames::CopyFile( oldPath, newPath );
|
||||
success = FileNames::DoCopyFile( oldPath, newPath );
|
||||
if (!success)
|
||||
return { false, {} };
|
||||
}
|
||||
|
@ -1454,7 +1454,7 @@ std::pair<bool, FilePath> DirManager::LinkOrCopyToNewProjectDirectory(
|
|||
//if it doesn't, we can assume it was written to the NEW name, which is fine.
|
||||
if (oldFileName.FileExists())
|
||||
{
|
||||
bool ok = FileNames::CopyFile(oldPath, newPath);
|
||||
bool ok = FileNames::DoCopyFile(oldPath, newPath);
|
||||
if (!ok)
|
||||
return { false, {} };
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ wxString FileNames::FormatWildcard( const FileTypes &fileTypes )
|
|||
}
|
||||
}
|
||||
|
||||
bool FileNames::CopyFile(
|
||||
bool FileNames::DoCopyFile(
|
||||
const FilePath& file1, const FilePath& file2, bool overwrite)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace FileNames
|
|||
wxString FormatWildcard( const FileTypes &fileTypes );
|
||||
|
||||
// This exists to compensate for bugs in wxCopyFile:
|
||||
bool CopyFile(
|
||||
bool DoCopyFile(
|
||||
const FilePath& file1, const FilePath& file2, bool overwrite = true);
|
||||
|
||||
// wxWidgets doesn't have a function to do this: make a hard file-system
|
||||
|
|
|
@ -1859,7 +1859,7 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||
auto dstPath = dst.GetFullPath();
|
||||
if ( src.FileExists() )
|
||||
// A simple one-file plug-in
|
||||
copied = FileNames::CopyFile(
|
||||
copied = FileNames::DoCopyFile(
|
||||
src.GetFullPath(), dstPath, true );
|
||||
else {
|
||||
// A sub-folder
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <wx/weakref.h> // member variable
|
||||
#include <wx/window.h> // MSVC wants this
|
||||
|
||||
class wxFrame;
|
||||
class wxWindow;
|
||||
|
|
|
@ -97,6 +97,8 @@ class AUDACITY_DLL_API ThemeBase /* not final */
|
|||
{
|
||||
public:
|
||||
ThemeBase(void);
|
||||
ThemeBase ( const ThemeBase & ) = delete;
|
||||
ThemeBase &operator =( const ThemeBase & ) = delete;
|
||||
public:
|
||||
virtual ~ThemeBase(void);
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include "../Experimental.h"
|
||||
|
||||
#include <wx/bitmap.h> // member variables
|
||||
|
||||
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
||||
|
||||
#include <vector>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <wx/window.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/stream.h>
|
||||
|
||||
#include "Export.h"
|
||||
#include "../FileIO.h"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <wx/log.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/stream.h>
|
||||
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ class AUDACITY_DLL_API FileHistory
|
|||
public:
|
||||
FileHistory(size_t maxfiles = 12, wxWindowID idbase = wxID_FILE);
|
||||
virtual ~FileHistory();
|
||||
FileHistory( const FileHistory& ) = delete;
|
||||
FileHistory &operator =( const FileHistory & ) = delete;
|
||||
|
||||
// These constants define the range of IDs reserved by the global file history
|
||||
enum {
|
||||
|
|
Loading…
Reference in New Issue