By establishing a dependency to any one of them, the structures defined in that references build script can be used in the referencing build script. buildStandalone, buildWorkbench or buildMPS).
#Construct 3 standalone code#
Note that MPS provides code completion for the path components in folder macros.ĭependencies This section defines dependencies to other build scripts. folder represents paths, relative to the base directory defined above and/or based on other Macros. MPS supports two kinds of Macros: var macros are strings and can be assigned any value. In the remainder of the build script these macro variables will be used. In the Macros section, these names are defined and values are assigned. Macros Macros are essentially name-value pairs. We will use syntax contributed by these plugins below. Typically, the java and mps plugins are required. These plugins contribute additional build language syntax. Use plugins The build language itself can be extended via plugins (Note that these are not the plugins that make up MPS itself those will be configured later). By default, this is the directory in which the resulting ant file will be generated, and in which it will be executed. Let us look at the various sections of a build script:īase directory The base directory defines an absolute path relative to which all other paths are specified. You can now create a new build project in the model (the name is confusing: it is not actually a new build project, just a build script).Ī build scripts contains several sections, which we can observe on an empty build script: In the model, configure the used languagesĪlso import the model. You'd have to create a new solution with a new model inside. The dependencies have been also set properly:Īlternatively you could create the scripts manually. The new solution should now be listed in the Project View and should hold two new build scripts: Typically you skip the sandbox modules and keep the languages as well as plugin and runtime solutions. On the last page of the wizard, you de-select the modules that should not be made part of the IDE. You'll then need to select the Standalone IDE option from the three available options: You can instruct the wizard to reuse an existing solution or a model, instead of creating new ones. The wizard will create a new solution and a model to hold the scripts and set the necessary imports as well as used languages. You start it from the Project View tool window: The preferred way to create the necessary build scripts is to run the Build Solution Wizard on your current project. Creating the Solution and the Build Script The wizard way If you want to see an example of a non-trivial project with an advanced build script that handles a complex project with several languages and runtime libraries, creates a standalone IDE and bundles the capabilities to run generated Java code, check out the Voice Menu project. You can open the project in MPS and follow the instructions described here. In this document we describe the development of an RCP build scripts for the robot Kaja sample that is bundled with MPS distributions.
#Construct 3 standalone generator#
When running the generator for this build script, MPS generates an ant file that creates the actual RCP distribution. A build script is written in MPS' build language, which is optimized for building RCP applications (as well as IntelliJ and MPS plugins). To build a custom RCP version of MPS, you have to create a solution that contains a so-called build script. The set of languages available to the users Various icons, slogans, splash screens and images In particular, the following aspects of MPS can be customized: Various aspects of MPS can be removed or customized to deliver a custom user experience for a given group of users. Once you have designed your languages, MPS can help you build a stripped down version of MPS that only contains those artifacts that are necessary to use these domain-specific languages. All the distracting language-design-related functionality and unnecessary languages will have been removed. Standalone IDEs provide a convenient way to distribute DSLs to the end users, who will be able to use the languages including all the IDE support, refactorings and code analysis prepared by language designers in the comfort of a dedicated IDE. The term standalone IDE refers to a stripped down version of the IDE that only contains those artifacts that are necessary for a given business purpose. Building standalone IDEs for your languages Introduction