added build shared libs on MinGW for debug mode

This commit is contained in:
Igor Korsukov 2020-12-14 16:40:51 +03:00
parent a79fc79612
commit c770b773ef
20 changed files with 90 additions and 48 deletions

View file

@ -43,7 +43,7 @@ elseif(CC_IS_MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
if (BUILD_IS_DEBUG)
#set(BUILD_SHARED_LIBS ON)
set(BUILD_SHARED_LIBS ON)
endif(BUILD_IS_DEBUG)
# -mno-ms-bitfields see #22048

View file

@ -41,6 +41,14 @@ const QUrl ApiInfo::REGISTER_URL(ApiInfo::REGISTER_PAGE);
const QUrl ApiInfo::LOGIN_URL(ApiInfo::LOGIN_PAGE);
const QUrl ApiInfo::LOGIN_SUCCESS_URL(ApiInfo::LOGIN_SUCCESS_PAGE);
const ApiInfo& ApiInfo::instance()
{
if (!_instance) {
createInstance();
}
return *_instance;
}
//---------------------------------------------------------
// ApiInfo:apiInfoLocation
//---------------------------------------------------------

View file

@ -60,13 +60,7 @@ class ApiInfo
static constexpr const char* DEFAULT_UPDATE_SCORE_INFO_PATH = "/score/manage/upload/update";
public:
static const ApiInfo& instance()
{
if (!_instance) {
createInstance();
}
return *_instance;
}
static const ApiInfo& instance();
static constexpr const char* API_HOST = "https://api.musescore.com/";
static constexpr const char* API_ROOT = "/v2";

View file

@ -1,6 +1,7 @@
set (MODULARITY_SRC
${CMAKE_CURRENT_LIST_DIR}/imodulesetup.h
${CMAKE_CURRENT_LIST_DIR}/modulesioc.cpp
${CMAKE_CURRENT_LIST_DIR}/modulesioc.h
${CMAKE_CURRENT_LIST_DIR}/imoduleexport.h
${CMAKE_CURRENT_LIST_DIR}/ioc.h

View file

@ -0,0 +1,28 @@
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2020 MuseScore BVBA and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
#include "modulesioc.h"
using namespace mu::framework;
ModulesIoC* ModulesIoC::instance()
{
static ModulesIoC p;
return &p;
}

View file

@ -33,11 +33,7 @@ class ModulesIoC
{
public:
static ModulesIoC* instance()
{
static ModulesIoC p;
return &p;
}
static ModulesIoC* instance();
template<class I>
void registerExportCreator(const std::string& module, IModuleExportCreator* c)

View file

@ -27,6 +27,12 @@ using namespace mu;
using namespace mu::framework;
using namespace mu::async;
Settings* Settings::instance()
{
static Settings s;
return &s;
}
Settings::Settings()
{
#if defined(WIN_PORTABLE)

View file

@ -36,11 +36,7 @@ namespace mu::framework {
class Settings
{
public:
static Settings* instance()
{
static Settings s;
return &s;
}
static Settings* instance();
struct Key
{

View file

@ -26,6 +26,12 @@
using namespace mu::telemetry;
ActionEventObserver* ActionEventObserver::instance()
{
static ActionEventObserver s;
return &s;
}
ActionEventObserver::ActionEventObserver(QObject* parent)
: QObject(parent)
{

View file

@ -35,11 +35,7 @@ class ActionEventObserver : public QObject
INJECT(telemetry, ITelemetryService, telemetryService)
public:
static ActionEventObserver* instance()
{
static ActionEventObserver s;
return &s;
}
static ActionEventObserver* instance();
bool eventFilter(QObject* watched, QEvent* event) override;

View file

@ -20,6 +20,12 @@
using namespace Ms;
ScorePreferences& ScorePreferences::instance()
{
static ScorePreferences p;
return p;
}
QString ScorePreferences::backupDirPath() const
{
return m_backupDirPath;

View file

@ -26,11 +26,7 @@ class ScorePreferences
{
public:
static ScorePreferences& instance()
{
static ScorePreferences p;
return p;
}
static ScorePreferences& instance();
QString backupDirPath() const;
void setBackupDirPath(const QString& path);

View file

@ -61,6 +61,12 @@
//! NOTE Separately to initialize logger and profiler as early as possible
static mu::framework::GlobalModule globalModule;
ModulesSetup* ModulesSetup::instance()
{
static ModulesSetup s;
return &s;
}
ModulesSetup::ModulesSetup()
{
//! NOTE `telemetry` must be first, because it install crash handler.

View file

@ -31,11 +31,7 @@
class ModulesSetup
{
public:
static ModulesSetup* instance()
{
static ModulesSetup s;
return &s;
}
static ModulesSetup* instance();
void setup();
void deinit();

View file

@ -2,6 +2,12 @@
using namespace deto::async;
QueuedInvoker* QueuedInvoker::instance()
{
static QueuedInvoker i;
return &i;
}
void QueuedInvoker::invoke(const std::thread::id& th, const Functor& f)
{
if (m_onMainThreadInvoke) {

View file

@ -13,11 +13,7 @@ class QueuedInvoker
{
public:
static QueuedInvoker* instance()
{
static QueuedInvoker i;
return &i;
}
static QueuedInvoker* instance();
using Functor = std::function<void ()>;

View file

@ -271,6 +271,13 @@ LogLayout LogDest::layout() const
}
// Logger ---------------------------------
Logger* Logger::instance()
{
static Logger l;
return &l;
}
Logger::Logger()
{
setupDefault();

View file

@ -132,11 +132,7 @@ class Logger
{
public:
static Logger* instance()
{
static Logger l;
return &l;
}
static Logger* instance();
static const Type ERROR;
static const Type WARN;

View file

@ -13,6 +13,12 @@ Profiler::Options Profiler::m_options;
constexpr int MAIN_THREAD_INDEX(0);
Profiler* Profiler::instance()
{
static Profiler p;
return &p;
}
Profiler::Profiler()
{
setup(Options(), new Printer());

View file

@ -71,11 +71,7 @@ class Profiler
{
public:
static Profiler* instance()
{
static Profiler p;
return &p;
}
static Profiler* instance();
struct Options {
bool stepTimeEnabled{ true };