Commit graph

41 commits

Author SHA1 Message Date
Dmitri Ovodok
d601f8f0e6 Remove the existing offline plugins documentation 2019-03-22 18:14:54 +02:00
Dmitri Ovodok
ed07282ea5 Move files related to plugins to a separate directory 2019-01-24 17:36:01 +03:00
Joachim Schmitz
ff292d98b2 eliminate debug artifacts 2018-12-18 14:55:54 +01:00
mirabilos
65cd276439
remove RCS IDs from (almost) all files
they do not make any sense, nor do they get updated, if the
source code is kept in git
2018-11-02 23:53:21 +01:00
mirabilos
698fa1e52d
remove getopt call from genManual
Its only use was to show a version (has been “0.1” for six years),
plus MSVC doesn’t have getopt, and the external library was under
an incompatible licence (LGPLv3 does not mix with GPLv2-only).
2018-09-06 15:31:22 +02:00
alexandr
df114f189c Compile under MSVC: this commit caontais all changes to run MSVC build
1) fix some bugs which appear in runtime:  replace QString::tostdstring() to Foo.toUtf8().constData().

2) Enable start center online community. To use it you need download webengine in your QT lib. see instruction https://musescore.org/en/handbook/developers-handbook/compilation/compile-instructions-windows-visual-studio-2017-wip

3) update install steps. Add additional dlls for webEngine. Add copying dlls and musescore.exe to /msvc.install/bin folder. Run project will work with the "$(ProjectDir)\..\..\msvc.install\bin\MuseScore.exe" specified in Debugging field in mscore project

4) Moving AppVeyor from MinGW to MSVC. Exclude ALL MSVC project from INSTALL project. Exclude ALL from PACKAGE. Remove migw-cmake in script build, add .bat instead. Remove xcopy from 7z archive step

5) Fix warning : Warning C4703 potentially uninitialized local pointer variable '' used; Warning C4456 declaration of '' hides previous local declaration; Warning C4458 declaration of '' hides class member

6) Change path to 11 version wix toolset which created .msi installer package
2018-08-04 12:17:31 +02:00
Andres Fernandez de Prado
33dff96a20 This commit contains changes required for MuseScore to compile under MSVC with no warnings.
This commit contains changes required for MuseScore to compile under MSVC with no warnings.

MuseScore is being compiled with the /W4 setting (warning level 4), which is similar to -wall -wextra on clang. This generates lots of warnings on MSVC, mainly for non-standard constructs and for constructs which might be bugs or might lead to bugs.

Most warnings are in the following categories:
- Name hiding: a variable hides a variable with the same name on a larger scope (or a field, or a function parameter). This can easily lead to bugs, and it is a best practice to avoid hiding variable names (see recommendation ES.12 in the C++ Core Guidelines by Stroustrop & Sutter (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-reuse : ES.12: Do not reuse names in nested scopes)
- Narrowing conversion: a numeric conversion results in loss of significant digits (for example, double -> float). The general recommendation is to use a cast to indicate this is designed behaviour.
- Unreachable code: in several instances, there is unreachable code. The unreachable code is commented out.
- (Potentially) uninitialized local variable. Just initialized the vars.
- foreach(,) -> for(:): this does not generate a warning per-se (only a few of these generate warnings due to name hiding), but changed in keeping with "MuseScore Coding Rules" (https://musescore.org/en/handbook/musescore-coding-rules#Loops), which tells explicitly "Use C++11's "for" instead of Qt's "foreach":" ... "If you happen to be fixing some code and see a "foreach", please change that loop into a "for"."

Most changes are in the categories indicated above. The next listing shows detailed changes for files which are *not* of the aforementioned types.

- all.h: Disable warning C4127 (conditional expression is constant - generated in Qt header file qvector.h)
- awl/aslider.h: unreachable code.
- awl/knob.cpp: name hiding
- awl/mslider.cpp: name hiding
- awl/slider.cpp: name hiding
- bww2mxml/parser.cpp: name hiding
- effects/compressor/compressor.cpp: narrowing conversion
- effects/zita1/zitagui.cpp: name hiding
- fluid/fluid.cpp: foreach replacement. Name hiding.
- fluid/mod.cpp: name hiding.
- fluid/sfont.cpp: foreach replacement. Name hiding. Initialize vars.
- fluid/voice.cpp: Name hiding.
- libmscore/accidental.cpp: Name hiding.
- libmscore/ambitus.cpp: Initialize vars.
- libmscore/barline.cpp: Name hiding. Unreachable code.
- libmscore/beam.cpp: Name hiding.
- libmscore/chordrest.cpp: Unreachable code.
- libmscore/scorefile.cpp: Name hiding.
- manual/genManual.cpp: Name hiding. foreach replacement.
- midi/midifile.cpp: Name hiding. Unreachable code.
- omr/importpdf.cpp: Name hiding. foreach replacement.
- omr/omr.cpp: Name hiding. foreach replacement.
- omr/omrpage.cpp: Name hiding. foreach replacement.
- omr/omrview.cpp: Name hiding. foreach replacement.
- synthesizer/event.cpp: Unreachable code.
- zerberus\channel.cpp: Narrowing conversion.
- zerberus\instrument.cpp: Name hiding.
- zerberus\sfz.cpp: Name hiding.
- zerberus\voice.h: Suppress warning C4201: "nonstandard extension used: nameless struct/union"
- zerberus\zerberus.cpp: Name hiding. Unreferenced parameter.
- zerberus\zerberusgui.cpp: Name hiding.
2018-08-03 09:15:42 +02:00
Andres Fernandez de Prado
3acc363498 Solved all compilation errors on MSVC
This commit contains changes required for MuseScore to compile under MSVC with no errors.

There are several general categories of problems that resulted in errors with the compilation. Main issues:
- Variable Length Arrays (VLA). This is a non-standard extension to C++, supported by clang toolchains, but not by MSVC. The initial workaround is to use std::vector<> instead of VLAs, eventually (if needed) with the original variable pointing to the beginning of the allocated array. More efficient alternatives are possible if profiling shows any code using VLAs to be timing-critical.
- Floating-point constants not suffixed with "f" are doubles by default; in some instances, this leads to narrowing conversion errors (in other instances, just warnings).
- MSVC does not support "or"/"and"/"not" in lieu of "||"/"&&"/"!". Changed unconditionally to use standard C++ symbols.
- MSVC does not support the "__builtin_unreachable()" compiler hint. A similar, albeit not exactly equal, alternative is "__assume(0)", which is MSVC-specific.
- MSVC does not support ranges in case statements. Replaced with list of cases instead of range (non-conditionally)

Detailed changes, with per-file comments:

- all.h: opt-in to deprecated features, include <io.h> and <process.h> instead of POSIX <unistd.h>, undefine "STRING_NONE" and "small", which Microsoft defines as macros, which result in compilation errors.
- effects/compressor/zita.cpp: eliminated narrowing conversion error by appending "f" to float constants.
- fluid/voice.cpp: appended "f" to float constants to eliminate narrowing conversion errors/warnings
- libmscore/beam.cpp: conditionally replaced VLA
- libmscore/edit.cpp: conditionally replaced VLA
- libmscore/element.cpp: appended "f" to float constant
- libmscore/fret.cpp: changed or -> ||
- libmscore/layout.cpp: conditionally replaced VLA
- libmscore/mscore.cpp: conditionally replaced "__builtin_unreachable()" with "__assume(0)" for MSVC
- libmscore/scorefile.coo: use correct char representation conversion for MSVC
- libmscore/stringdata.cpp: conditionally replaced VLA
- libmscore/system.cpp: conditionally replaced VLA
- libmscroe/text.cpp: replaced range in case statement.
- manual/genManual.cpp: use getopt() replacement.
- midi/midifile.cpp: conditionally replaced VLA. This does not use the default replacement.
- mscore/bb.cpp: replaced range in case statement.
- mscore/capella.cpp: conditionally replaced VLA. Changed and -> &&
- mscore/driver:cpp: preclude errors due to macro redefinitions.
- mscore/editstyle.cpp: conditionally replaced "__builtin_unreachable()" with "__assume(0)" for MSVC
- mscore/importgtp-gp6.cpp: conditionally replaced VLA.
- mscore/instrwidget.cpp: conditionally replaced VLA.
- mscore/jackaudio.cpp: conditionally replaced VLA. Preclude errors due to macro redefinitions.
- mscore/jackweakapi.cpp: Preclude errors due to macro redefinitions. Replacement for __atribute__((constructor)) through static object construction for MSVC. Force use of LoadLibraryA instead of LoadLibrary.
- mscore/mididriver.h: Changed not -> !
- mscore/musescore.cpp: Changed not -> !. Conditionally replaced VLA.
- mscore/resourceManager.cpp: conditionally replaced VLA.
- mscore/timeline.cpp: conditionally replaced VLA.
- omr/omrpage.cpp: conditionally replaced VLA.
- synthesizer/msynthesizer.cpp: replaced UNIX sleep(1) method with MSVC Sleep(1000) (equivalent, but in ms instead of seconds)
- synthesizer/msynthsizer.h: appended "f" to float constant
- thirdparty/poppler/config.h: set defines for MSVC to preclude the use of inexistent libraries.
- thirdparty/poppler/poppler/poppler-config.h: set defines for MSVC to preclude the use of inexistent libraries. Eliminated #defines for fmin and fmax which where causing problems.
- thirdparty/poppler/poppler/PSOutputDev.cc: added #include <algorithm> for  std::min() and std::max(). Note this is required per-C++ standard.
- thirdparty/portmidi/pm_win/pmwinmm.c: undefined UNICODE to use char-based library functions.
- thirdparty/qzip/qzip.cpp: changed or -> ||
- thirdparty/rtf2html/rtf_keyword.h: file format changed from Apple to UNIX, as MSVC does not supported the former.

(NOT error related, just improvement on previous commit; manual/getopt/README.md: added link to source article)
2018-08-03 09:15:42 +02:00
Andres Fernandez de Prado
188386ba2e This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the  new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
     x Setting target properties for MSVC
     x Using all.h in source dir
     x Adding pre-compiled headers to target
     x Removing dependency from mops1 and mops2

Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-08-03 09:15:42 +02:00
aTTocs
7553ffdb4e Adds html links to MuseScore classes referenced in method return types, method arguments, and property types. 2018-04-04 17:41:31 -05:00
aTTocs
c926e43de9 Fix in plugin manual generator where 'inherits {class}' for final classes wasn't displaying. Regression due to commit b46b55fa1. 2018-04-04 16:51:10 -05:00
robbie
843e3353f8 fix #249541: PluginCreator improvements.
Improved Help - added a very basic guide and external links.
Very simple autoindent implemented in editor - new lines line up with previous lines
"New" includes placeholders for description and version.
Refresh button on PluginManager forces modifications to be picked up
Make plugins stay on top while using Run
Indenting and layout tweaks, removed blank line.

More indenting/layout stuff.

... yet more layout fixes...

Push to retrigger travis-ci
2017-09-12 22:58:09 +10:00
lasconic
d3a86953a4 fix #169296, fix #169161: update to upload dialog 2017-02-08 12:46:06 +01:00
Joachim Schmitz
356a7c85dd Simplify texts in various dialogs, for translators' benefit
by eliminating html stuff from the to be translated texts.
Move urls out of translations, which is also good for security
reasons, to protect us from bogus and malicous translations.
Some formatting changes and getting some error messages to stderr.
Updating copyright to 2016 in the due course.
2016-03-25 09:06:56 +01:00
ws
7b3ec94a34 update helpBrowser 2015-02-18 12:26:26 +01:00
lasconic
d75a1c0a0c cosmetic change in plugin manual 2014-07-23 17:51:26 +02:00
Jarrad Whitaker
851867b2c4 fix indenting 2014-07-21 20:49:32 +10:00
Jarrad Whitaker
f480a6f25a change build process to install generated plugin documentation with cmake
Squashed commit of the following:

commit bb5a149044f3a0e4aa18258859dc9d1332d253d7
Merge: f2d264e c52d265
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 20:30:12 2014 +1000

    Merge branch 'cmakePluginDoc' of github.com:akdor1154/MuseScore into cmakePluginDoc

commit f2d264e353b40963098bead30f8fb34b9b152e54
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 20:22:48 2014 +1000

    revert a packaging change unrelated to this PR

commit 729147e912f9dd65029dec9de11519c71cad6eae
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 20:18:37 2014 +1000

    modify build process so plugin documentation is installed by cmake

commit e836b35df81e65cf78a87043747571cdd3e97fcc
Author: lasconic <lasconic@gmail.com>
Date:   Sat Jul 19 16:21:14 2014 +0200

    fix #27871 + more cosmetic changes to palettes

commit d881b20e1e97dfaf85ae3175f3556c5dbf6c7fdb
Author: lasconic <lasconic@gmail.com>
Date:   Sat Jul 19 12:29:20 2014 +0200

    set mscVersion to the current version after the first layout of 1.3 scores

commit c52d2652b023b521c1a17889da059c727d4737fb
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 20:18:37 2014 +1000

    modify build process so plugin documentation is installed by cmake

commit 4dd4a0d43cfe9859f79e5a03f3021f96d630a28c
Merge: b4d51ee 8cc66dd
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 13:48:43 2014 +1000

    Merge branch 'master' of git://github.com/MuseScore/MuseScore

commit b4d51ee2986181a4daad0e7109dfd7ddc68673c8
Author: Jarrad Whitaker <akdor1154@gmail.com>
Date:   Mon Jul 21 13:25:38 2014 +1000

    remove bad debdepends
2014-07-21 20:38:00 +10:00
lasconic
b00e0e5de9 fix genManual dependency 2014-05-21 14:11:40 +02:00
lasconic
f2b30683a6 fix missing build dependency 2014-05-21 12:47:27 +02:00
Joachim Schmitz
1763387765 improve plugin documentation generation 2014-05-16 15:59:36 +02:00
Joachim Schmitz
425162438e fix #25755: avoid duplicates in plugin help
and add two missing ones. Also remove a 'plugin comment' from a .cpp
file, where it doesn't serve any purpose anyway (but at first tricked me
into believing this were the the culprit for the duplicate)
2014-05-16 13:58:21 +02:00
Joachim Schmitz
913dc41305 fix build of plugins manual 2014-04-27 14:20:30 +02:00
Joachim Schmitz
3adc1ea6ed fix #14764
convert qDebug();abort() to qFatal() and if(cond) abort() to
Q_ASSERT(!cond), esp. for the benefit of Windows, where it is impossible
to set a breakpoint on the abort()
Also modernizing mscoreMessageHandler() and making it more informative
by adding file, line and function to the output.
2014-03-04 13:06:23 +01:00
Maurizio M. Gavioli
1144b0814a Plugin manual - Added CSS, improved HTML format
- Added a CSS style sheet to plugin manual folder
- Revised HTML formatting, by removing (almost) all hard-coded formats / styles and implementing them on the CSS side
- Added some styles to improve property table readability
- Added a logo (via CSS) and a footer to each page
- No change to the code logic.
2014-01-24 16:30:18 +01:00
ws
401d702731 small smufl fixes 2013-12-02 09:31:22 +01:00
ws
d714b5f451 port to qt5 2013-02-15 14:50:03 +01:00
Jonathan Klein
356b124e2b Make XCode generator add headers to project
On Xcode, certain things don't work if the headers
aren't also part of the project, namely .h/.cpp
flipping ("Jump to Next Counterpart" in the navigation
menu) and searching the entire workspace for symbols.

The header files are now collected from the directory
of the target and show up in the XCode project under
"Header files" (per target).

I limited this change to Mac since I cannot test anywhere
else, but it would probably not hurt to do the same thing
on other platforms.

According to forums, the add_executable and add_library
commands of CMake should just silently ignore these files,
but add them to the generated target in the project.
2012-08-13 15:11:00 +02:00
lasconic
be8ea0ea81 fix Xcode project generation 2012-08-08 12:27:55 +02:00
Werner Schweer
8d5a94808c build fixes for plugin manual 2012-08-08 11:16:55 +02:00
Werner Schweer
ad61857acf change build system to create manual pages for plugins 2012-08-07 20:47:48 +02:00
Werner Schweer
a0d7e9b85b update README for plugin manual creation 2012-07-25 12:27:11 +02:00
Werner Schweer
3d91e61ef4 More plugin bindings 2012-07-25 11:49:34 +02:00
Werner Schweer
2914f0a702 more plugin bindings 2012-07-16 19:59:32 +02:00
Joachim Schmitz
6237626b6c more plugin doc updates 2012-07-14 23:24:14 +02:00
Joachim Schmitz
8ceb53ee2b small cosmetic fix to genManual 2012-07-14 18:59:27 +02:00
Werner Schweer
e521b1f60e more script bindings; enhanced manual 2012-07-13 19:44:03 +02:00
Werner Schweer
0d1c4d0786 add documentation for plugins->cursor->selection 2012-07-13 11:26:08 +02:00
Werner Schweer
6367d2f28b fix typo 2012-07-12 12:00:31 +02:00
Werner Schweer
b1b6fcf79f plugin manual update 2012-07-12 11:36:01 +02:00
Werner Schweer
8e11e03a53 add manual generator for plugins 2012-07-11 21:29:42 +02:00