mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-19 01:20:54 +02:00
Merge pull request #905 from Paul-Licameli/yet-more-module-preliminaries
Yet more module preliminaries
This commit is contained in:
commit
8154dbed2e
@ -330,9 +330,17 @@ function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
|||||||
set( DEFINES )
|
set( DEFINES )
|
||||||
list( APPEND DEFINES ${ADDITIONAL_DEFINES} )
|
list( APPEND DEFINES ${ADDITIONAL_DEFINES} )
|
||||||
|
|
||||||
|
# send the file to the proper place in the build tree, by setting the
|
||||||
|
# appropriate property for the platform
|
||||||
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
|
set( DIRECTORY_PROPERTY RUNTIME_OUTPUT_DIRECTORY )
|
||||||
|
else ()
|
||||||
|
set( DIRECTORY_PROPERTY LIBRARY_OUTPUT_DIRECTORY )
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (LIBTYPE STREQUAL "MODULE")
|
if (LIBTYPE STREQUAL "MODULE")
|
||||||
set( SHAPE "box" )
|
set( SHAPE "box" )
|
||||||
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_MODDIR}" )
|
set_target_property_all( ${TARGET} ${DIRECTORY_PROPERTY} "${_MODDIR}" )
|
||||||
set_target_properties( ${TARGET}
|
set_target_properties( ${TARGET}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
@ -340,7 +348,7 @@ function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
|||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set( SHAPE "octagon" )
|
set( SHAPE "octagon" )
|
||||||
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_EXEDIR}" )
|
set_target_property_all( ${TARGET} ${DIRECTORY_PROPERTY} "${_EXEDIR}" )
|
||||||
set_target_properties( ${TARGET}
|
set_target_properties( ${TARGET}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
# Include the modules that we'll build
|
# Include the modules that we'll build
|
||||||
|
|
||||||
|
# The list of modules is ordered so that each module occurs after any others
|
||||||
|
# that it depends on
|
||||||
|
set( MODULES
|
||||||
|
mod-script-pipe
|
||||||
|
)
|
||||||
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||||
add_subdirectory( mod-null )
|
list( APPEND MODULES
|
||||||
add_subdirectory( mod-nyq-bench )
|
mod-null
|
||||||
|
mod-nyq-bench
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory( mod-script-pipe )
|
foreach( MODULE ${MODULES} )
|
||||||
|
add_subdirectory("${MODULE}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||||
if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*")
|
if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*")
|
||||||
|
@ -1149,6 +1149,8 @@ bool AudacityApp::OnInit()
|
|||||||
|
|
||||||
wxString progPath = wxPathOnly(argv[0]);
|
wxString progPath = wxPathOnly(argv[0]);
|
||||||
FileNames::AddUniquePathToPathList(progPath, audacityPathList);
|
FileNames::AddUniquePathToPathList(progPath, audacityPathList);
|
||||||
|
// Add the path to modules:
|
||||||
|
FileNames::AddUniquePathToPathList(progPath + L"/lib/audacity", audacityPathList);
|
||||||
|
|
||||||
FileNames::AddUniquePathToPathList(FileNames::DataDir(), audacityPathList);
|
FileNames::AddUniquePathToPathList(FileNames::DataDir(), audacityPathList);
|
||||||
|
|
||||||
|
@ -12,8 +12,18 @@
|
|||||||
|
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
|
|
||||||
|
#include <unordered_set>
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
|
||||||
|
static const std::unordered_set<wxString> &autoEnabledModules()
|
||||||
|
{
|
||||||
|
// Add names to this list, of modules that are expected to ship
|
||||||
|
// with Audacity and enable automatically.
|
||||||
|
static std::unordered_set<wxString> modules{
|
||||||
|
};
|
||||||
|
return modules;
|
||||||
|
}
|
||||||
|
|
||||||
// static function that tells us about a module.
|
// static function that tells us about a module.
|
||||||
int ModuleSettings::GetModuleStatus(const FilePath &fname)
|
int ModuleSettings::GetModuleStatus(const FilePath &fname)
|
||||||
{
|
{
|
||||||
@ -54,6 +64,11 @@ int ModuleSettings::GetModuleStatus(const FilePath &fname)
|
|||||||
gPrefs->DeleteEntry( DateTimePref );
|
gPrefs->DeleteEntry( DateTimePref );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iStatus == kModuleNew) {
|
||||||
|
if (autoEnabledModules().count(ShortName))
|
||||||
|
iStatus = kModuleEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
return iStatus;
|
return iStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user