Plugins: Difference between revisions

From SMath Wiki
Jump to navigation Jump to search
(Created page with "== Introduction == The capabilities of the SMath Studio program can be expanded by installing Plugins. Plugins are divided into commercial and third-party and can affect the following functionality: # Import and export documents in third-party application file formats. # Symbolic and numerical calculations. # Additional calculation sheet elements support. # Additional elements in the program user interface (sidebar and main menu). == Plugins Installation ==...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 28: Line 28:
#* Plugin(s) will be installed.
#* Plugin(s) will be installed.


== Creating Plugins ==
== Plugins Development ==
For third-party developers, we provide the opportunity to create new [[Plugins]] according to customer requirements. You can use [[Plugins]] with source codes available as a reference. The repository is available at [https://smath.info/svn/public SMath SVN repository].
For third-party developers, we provide the opportunity to create new [[Plugins]] according to customer requirements. As an example you can use [[Plugins]] that have [[Open Source Code|source codes]] available.
 
== Creating Custom Plugin ==
To work with the custom plugin code on Windows please follow the following steps:
# Install the current version of [https://smath.com/ru-RU/view/SMathStudio/download SMath Studio].
# Install the current current version of [https://visualstudio.microsoft.com/ru/vs/community/ Visual Studio Community].
# Create a '''Class Library (.Net Framework)''' project by specifying '''.Net Framework 2.0''' in the Framework field in the project creation dialogue.
# Implement one or more [[SMath Studio]] interfaces inherited from IPlugin:
#* '''IPluginLowLevelEvaluationFast''' - interception of operators and functions.
#* '''IPluginMathNumericEvaluation''' - interception of numerical computing.
#* '''IPluginCustomRegion''' - interception of a sheet item type creation.
#* '''IPluginRegionDrawing''' - interception of a formula element in a mathematical formula drawing.
#* '''IPluginSaveFileTypes''' - interception of calculation saving to the file.
#* '''IPluginOpenFileTypes''' - interception of calculation file opening.
#* '''IPluginDataInputOutput''' - customizing format for setting initial data and calculation results for automation and integration with other applications.
#* '''IPluginMenuExtender''' - extension of the program's main menu.
 
== Debugging Custom Plugin ==
During development it may be necessary to check the functionality of the generated source code. In order to execute the code of your plugin in the context of the [[SMath Studio]] process follow these steps:
# Build your plugin in Visual Studio in '''Debug''' mode (this will also generate debug *.pdb files).
# Copy the output results to the '''plugins''' folder in the [[SMath Studio]] installation directory.
# Run the [[SMath Studio]] program.
# When you need to debug your code use the following Visual Studio function: '''Attach to Process...''' available in the '''Debug''' menu.
# In the dialog box that opens select [[SMath Studio]] (usually presented there as Solver.exe) from the list of available processes and click the '''Attach''' button.
 
Please note that after any code changes you need to repeat all the described actions.
 
== Custom Plugin Delivery ==
To make your Custom Plugin a part of the standard process for delivering to other users you need to follow these steps:
# Upload plugin source code to the [[Open Source Code|public SVN repository]].
# Go to the [[Release Manager]] of the project at https://smath.com/ReleaseManager/ and create a new plugin in it specifying the path to its source code in the [[Open Source Code|public SVN repository]].
# Build (click '''Build''') the plugin in the [[Release Manager]], check that there are no warnings or errors in the log. If warnings or errors were found fix them and repeat the build.
# After the build stage has been successfully completed publish (click '''Publish''') the plugin in the [[Plugins|plugin registry]].
# The first result of publishing the plugin may require verification and confirmation by the SMath team. To speed up this procedure you need to contact the developers at the following e-mail address: [mailto:support@smath.com support@smath.com].
# As a result the plugin will be added to the [[Plugins|plugin registry]] and will be available to all users of the [[SMath Studio]] program via the [[Extensions Manager]] embedded in the program.


[[Category:Manual]]
[[Category:Manual]]
[[Category:SMath Studio]]

Latest revision as of 08:53, 22 August 2024

Introduction

The capabilities of the SMath Studio program can be expanded by installing Plugins. Plugins are divided into commercial and third-party and can affect the following functionality:

  1. Import and export documents in third-party application file formats.
  2. Symbolic and numerical calculations.
  3. Additional calculation sheet elements support.
  4. Additional elements in the program user interface (sidebar and main menu).

Plugins Installation

Plugins can be downloaded and installed into SMath Studio in a variety of ways, and the installation method does not affect the functionality provided. Some Plugins may require an Internet connection or additional libraries/programs installed on the operating system. To access information about technical requirements and limitations, please read the instructions for the Plugins themselves.

Online Installation

To install Plugins online you need:

  1. Open Extension Manager (using the main menu "Tools" > "Plugins...").
  2. Go to the Plugins tab and switch the source from "Local storage" to "Online gallery".
  3. Select the required plugin(s) from the list and click "Install".
  4. The plugin(s) will be installed and ready to use.

Offline Installation

To install Plugins offline you need:

  1. Using any computer with an Internet connection:
    • By going to the page User Profile - SMath make sure that you are using the account specified in the electronic license.
    • Go to the page: SMath Studio Plugins.
    • Download the Plugin(s) you are interested in ZIP format.
    • Please note that there is no need to unzip the downloaded ZIP files.
  2. On a computer where SMath Studio is installed without an Internet connection:
    • Transfer the downloaded files to your computer.
    • Using drag&drop, move the Plugin(s) one by one to the main program window.
    • Plugin(s) will be installed.

Plugins Development

For third-party developers, we provide the opportunity to create new Plugins according to customer requirements. As an example you can use Plugins that have source codes available.

Creating Custom Plugin

To work with the custom plugin code on Windows please follow the following steps:

  1. Install the current version of SMath Studio.
  2. Install the current current version of Visual Studio Community.
  3. Create a Class Library (.Net Framework) project by specifying .Net Framework 2.0 in the Framework field in the project creation dialogue.
  4. Implement one or more SMath Studio interfaces inherited from IPlugin:
    • IPluginLowLevelEvaluationFast - interception of operators and functions.
    • IPluginMathNumericEvaluation - interception of numerical computing.
    • IPluginCustomRegion - interception of a sheet item type creation.
    • IPluginRegionDrawing - interception of a formula element in a mathematical formula drawing.
    • IPluginSaveFileTypes - interception of calculation saving to the file.
    • IPluginOpenFileTypes - interception of calculation file opening.
    • IPluginDataInputOutput - customizing format for setting initial data and calculation results for automation and integration with other applications.
    • IPluginMenuExtender - extension of the program's main menu.

Debugging Custom Plugin

During development it may be necessary to check the functionality of the generated source code. In order to execute the code of your plugin in the context of the SMath Studio process follow these steps:

  1. Build your plugin in Visual Studio in Debug mode (this will also generate debug *.pdb files).
  2. Copy the output results to the plugins folder in the SMath Studio installation directory.
  3. Run the SMath Studio program.
  4. When you need to debug your code use the following Visual Studio function: Attach to Process... available in the Debug menu.
  5. In the dialog box that opens select SMath Studio (usually presented there as Solver.exe) from the list of available processes and click the Attach button.

Please note that after any code changes you need to repeat all the described actions.

Custom Plugin Delivery

To make your Custom Plugin a part of the standard process for delivering to other users you need to follow these steps:

  1. Upload plugin source code to the public SVN repository.
  2. Go to the Release Manager of the project at https://smath.com/ReleaseManager/ and create a new plugin in it specifying the path to its source code in the public SVN repository.
  3. Build (click Build) the plugin in the Release Manager, check that there are no warnings or errors in the log. If warnings or errors were found fix them and repeat the build.
  4. After the build stage has been successfully completed publish (click Publish) the plugin in the plugin registry.
  5. The first result of publishing the plugin may require verification and confirmation by the SMath team. To speed up this procedure you need to contact the developers at the following e-mail address: support@smath.com.
  6. As a result the plugin will be added to the plugin registry and will be available to all users of the SMath Studio program via the Extensions Manager embedded in the program.