1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-04 13:27:39 +02:00

First stab at notarization

The distribution will be signed and notarized during an "install" build
and is handled by mac/scripts/build_dist.sh.

The wrapper scripts, mac/Audacity.sh, is no longer needed as it's function
has been integrated into AudacityApp.cpp/main().

Initially, all "hardened entitlements" have been enabled since we don't
know which ones plug-ins will need.

On Mac and Windows, system sleep will be disabled when recording starts
and re-enabled when it ends.
This commit is contained in:
Leland Lucius
2019-12-13 23:43:01 -06:00
parent b53b5e54fe
commit 5fe89c6498
9 changed files with 371 additions and 84 deletions

View File

@@ -16,6 +16,10 @@ Paul Licameli split from ProjectManager.cpp
#include <wx/frame.h>
#include <wx/statusbr.h>
#if defined(__WXMAC__) || defined(__WXMSW__)
#include <wx/power.h>
#endif
#include "AudioIO.h"
#include "AutoRecovery.h"
#include "CommonCommandFlags.h"
@@ -806,6 +810,11 @@ void ProjectAudioManager::OnAudioIORate(int rate)
void ProjectAudioManager::OnAudioIOStartRecording()
{
#if defined(__WXMAC__) || defined(__WXMSW__)
// Don't want the system to sleep while recording
wxPowerResource::Acquire(wxPOWER_RESOURCE_SCREEN, _("Audacity recording"));
#endif
auto &projectFileIO = ProjectFileIO::Get( mProject );
// Before recording is started, auto-save the file. The file will have
// empty tracks at the bottom where the recording will be put into
@@ -815,6 +824,11 @@ void ProjectAudioManager::OnAudioIOStartRecording()
// This is called after recording has stopped and all tracks have flushed.
void ProjectAudioManager::OnAudioIOStopRecording()
{
#if defined(__WXMAC__) || defined(__WXMSW__)
// Done recording, so allow sleeping again
wxPowerResource::Release(wxPOWER_RESOURCE_SCREEN);
#endif
auto &project = mProject;
auto &dirManager = DirManager::Get( project );
auto &projectAudioIO = ProjectAudioIO::Get( project );