mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-04 14:19:30 +02:00
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);
|
newDir.SetFullName(name);
|
||||||
const auto newPath = newDir.GetFullPath();
|
const auto newPath = newDir.GetFullPath();
|
||||||
if (!wxFileExists(newPath))
|
if (!wxFileExists(newPath))
|
||||||
FileNames::CopyFile(file, newPath);
|
FileNames::DoCopyFile(file, newPath);
|
||||||
}
|
}
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
||||||
|
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
#include <wx/evtloop.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wxFileNameWrapper.h"
|
#include "wxFileNameWrapper.h"
|
||||||
#include "AudacityLogger.h"
|
#include "AudacityLogger.h"
|
||||||
#include "AudioIOBase.h"
|
#include "AudioIOBase.h"
|
||||||
|
@ -1283,7 +1283,7 @@ BlockFilePtr DirManager::CopyBlockFile(const BlockFilePtr &b)
|
|||||||
//a summary file, so we should check before we copy.
|
//a summary file, so we should check before we copy.
|
||||||
if(b->IsSummaryAvailable())
|
if(b->IsSummaryAvailable())
|
||||||
{
|
{
|
||||||
if( !FileNames::CopyFile(fn.GetFullPath(),
|
if( !FileNames::DoCopyFile(fn.GetFullPath(),
|
||||||
newFile.GetFullPath()) )
|
newFile.GetFullPath()) )
|
||||||
// Disk space exhaustion, maybe
|
// Disk space exhaustion, maybe
|
||||||
throw FileException{
|
throw FileException{
|
||||||
@ -1423,7 +1423,7 @@ std::pair<bool, FilePath> DirManager::LinkOrCopyToNewProjectDirectory(
|
|||||||
success = FileNames::HardLinkFile( oldPath, newPath );
|
success = FileNames::HardLinkFile( oldPath, newPath );
|
||||||
if (!success)
|
if (!success)
|
||||||
link = false,
|
link = false,
|
||||||
success = FileNames::CopyFile( oldPath, newPath );
|
success = FileNames::DoCopyFile( oldPath, newPath );
|
||||||
if (!success)
|
if (!success)
|
||||||
return { false, {} };
|
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 it doesn't, we can assume it was written to the NEW name, which is fine.
|
||||||
if (oldFileName.FileExists())
|
if (oldFileName.FileExists())
|
||||||
{
|
{
|
||||||
bool ok = FileNames::CopyFile(oldPath, newPath);
|
bool ok = FileNames::DoCopyFile(oldPath, newPath);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return { false, {} };
|
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)
|
const FilePath& file1, const FilePath& file2, bool overwrite)
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
@ -55,7 +55,7 @@ namespace FileNames
|
|||||||
wxString FormatWildcard( const FileTypes &fileTypes );
|
wxString FormatWildcard( const FileTypes &fileTypes );
|
||||||
|
|
||||||
// This exists to compensate for bugs in wxCopyFile:
|
// This exists to compensate for bugs in wxCopyFile:
|
||||||
bool CopyFile(
|
bool DoCopyFile(
|
||||||
const FilePath& file1, const FilePath& file2, bool overwrite = true);
|
const FilePath& file1, const FilePath& file2, bool overwrite = true);
|
||||||
|
|
||||||
// wxWidgets doesn't have a function to do this: make a hard file-system
|
// 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();
|
auto dstPath = dst.GetFullPath();
|
||||||
if ( src.FileExists() )
|
if ( src.FileExists() )
|
||||||
// A simple one-file plug-in
|
// A simple one-file plug-in
|
||||||
copied = FileNames::CopyFile(
|
copied = FileNames::DoCopyFile(
|
||||||
src.GetFullPath(), dstPath, true );
|
src.GetFullPath(), dstPath, true );
|
||||||
else {
|
else {
|
||||||
// A sub-folder
|
// A sub-folder
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <wx/weakref.h> // member variable
|
#include <wx/weakref.h> // member variable
|
||||||
|
#include <wx/window.h> // MSVC wants this
|
||||||
|
|
||||||
class wxFrame;
|
class wxFrame;
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
|
@ -97,6 +97,8 @@ class AUDACITY_DLL_API ThemeBase /* not final */
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ThemeBase(void);
|
ThemeBase(void);
|
||||||
|
ThemeBase ( const ThemeBase & ) = delete;
|
||||||
|
ThemeBase &operator =( const ThemeBase & ) = delete;
|
||||||
public:
|
public:
|
||||||
virtual ~ThemeBase(void);
|
virtual ~ThemeBase(void);
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
|
#include <wx/bitmap.h> // member variables
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <wx/window.h>
|
#include <wx/window.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
#include <wx/stream.h>
|
||||||
|
|
||||||
#include "Export.h"
|
#include "Export.h"
|
||||||
#include "../FileIO.h"
|
#include "../FileIO.h"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <wx/slider.h>
|
#include <wx/slider.h>
|
||||||
|
#include <wx/stream.h>
|
||||||
|
|
||||||
#include <vorbis/vorbisenc.h>
|
#include <vorbis/vorbisenc.h>
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ class AUDACITY_DLL_API FileHistory
|
|||||||
public:
|
public:
|
||||||
FileHistory(size_t maxfiles = 12, wxWindowID idbase = wxID_FILE);
|
FileHistory(size_t maxfiles = 12, wxWindowID idbase = wxID_FILE);
|
||||||
virtual ~FileHistory();
|
virtual ~FileHistory();
|
||||||
|
FileHistory( const FileHistory& ) = delete;
|
||||||
|
FileHistory &operator =( const FileHistory & ) = delete;
|
||||||
|
|
||||||
// These constants define the range of IDs reserved by the global file history
|
// These constants define the range of IDs reserved by the global file history
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user