Problems with custom MPS build

Hello,

I'm using MPS 2.0.1 and trying to create the custom MPS build for my language.

I've created "Custom MPS Build Script" according to the user guide, selected buildTools.zip. The first issue is here:
build tools no macro/E:/Distr/.../MPS-2.0.1-buildTools.zip

Error marker is here: "Error: Path to MPS-buildTools.zip is not valid".
Okay, I've copied it to my project directory and specified
base_dir/MPS-2.0.1-buildTools.zip

Next step: Run->Edit Configurations, added Ant->Custom MPS Application, specified Name and build script. Than I've run it.
Build failed after (during) target "macos.dist":
macos.dist:
   [copy] Copying 1 file to .../artifacts

BUILD FAILED
C:\Users\<...the rest of the base dir...>\build\ProjectName-default-dist.xml:15: The following error occured while executing this line:
C:\Users\<...the rest of the base dir...>\build\ProjectName-default-dist.xml:93: <...base_dir...>\build\${build_tools}\resources does not exist.


However some artifacts were created: MPS folder, Info.plist, MPS-20.7609.zip and MPS-20.7609-linux.tar.gz.
I've tried to unpack the MPS-20.7609.zip and run it. There are two files with the same names in the archive: "MPS 2.0/bin/mps.exe.vmoptions". It's allowed for archive, but confusing when being unpacked.
Finally I've run mps.bat and nothing's happened.

BTW, I'm running on MS Win7.

Can anybody help me?

Thanks,
Alexey
0
8 comments
Avatar
Permanently deleted user
You created a script which builds the whole MPS from scratch. To create the right script:

1. create a path variable projectname_home -> /local/path/to/project
2. click on the Project -> New -> Build Script
3. rebuild created solution

On a build server:

cd /path/to/project/build
ant -f ProjectName-default.xml -Dmps_home=/path/to/MPS
-Dprojectname_home=/path/to/project
0
Avatar
Permanently deleted user
Sorry, what is "a path variable projectname_home"?
0
Avatar
Permanently deleted user
Settings -> Path variables -> Add...

Path variables are used to avoid absolute paths within the project files.
0
Avatar
Permanently deleted user
Thanks, it's clear.
My current goal is not to build my language, but create a custom MPS application for my language. So I use the custom application build script. Build still failed, but artifacts folder contains some MPS application. This application contains MyLanuage/MyLanguage.jar, but there are two troubles with it. It's about 350Mb (as original MPS, I expected that custom build should be smaller) and I can't run it (the javaw process has started indeed, but there is no application window).
0
Avatar
Permanently deleted user
(we should have published a tutorial on that earlier)

1. create a Build Script, build all your languages
2. in the same root where you list all the languages to build, create a branding.jar definition. Specify the name of your IDE, all the icons, splash screen, about and welcome images.
3. regenerate and execute build script to get your own branding.jar archive
4. create minified versions of MPS for all required platforms: delete unnecessary languages and plug-ins (because of the dependencies you cannot delete all the languages, but /languages/util folder can be deleted for sure)
5. replace lib/branding.jar in each minified MPS with your own archive
6. create a plug-in containing your languages

/plugins/
    /myLanguagesPlugin/
        /languages
            lang1.jar
            lang1-src.jar  (language sources are required yet)
            lang2.jar
            .....
        /META-INF
          plugin.xml  (see below)

7. put the plug-in into each distribution

Here is the simplest content for plugin.xml, contributing languages folder as a library:

<!DOCTYPE idea-plugin PUBLIC "Plugin/DTD" "http://plugins.intellij.net/plugin.dtd">
<idea-plugin>
  <id>org.example.mylanguages</id>
  <name>My Languages</name>
  <description>Provides .... languages</description>
  <version>1.0</version>
  <vendor url="http://www.jetbrains.com/mps/">JetBrains</vendor>

  <extensions defaultExtensionNs="com.intellij">
    <mps.LanguageLibrary dir="/languages"/>
  </extensions>
</idea-plugin>

0
Avatar
Permanently deleted user
Thanks for the instructions! I'm not familiar with the IDEA platform, but I'll try:) Did I correctly understand that there is no tutorial on creating minified MPS version?
0
Avatar
Permanently deleted user
Not yet, but it should be available soon.
You have to unpack the archive, delete languages from the languages folder (respecting the dependencies) and delete unnecessary stuff from the plugins folder.
0
Avatar
Permanently deleted user
Hi, is the documentation available yet?
0

Please sign in to leave a comment.