How to make a standalone IDE?

I want to prepare a standalone IDE for calculator in MPSSamples.
By means of the Build Solution wizard and ant, I managed to get
some compressed files which were supposed to be standalone IDEs
offering the calculator language.
There is mps.sh in the corresponding zip file, but it fails to start
due to some problem.
What should be done to let the standalone IDE work?

I use MPS-135.944 with mbeddr on Mac.
When I execute the file mps.sh in the zip file, jetbrains.mps.Launcher
shows a window with title "Start Failed" and the following message.

Internal error. Please report to http://youtrack.jetbrains.com

com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
 at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:91)
 at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:88)
 ... 1 more
Caused by: java.lang.RuntimeException: Invalid version number: calculator-tutorial-135.SNAPSHOT; plugin name: null
 at com.intellij.openapi.util.BuildNumber.fromString(BuildNumber.java:109)
 at com.intellij.openapi.util.BuildNumber.fromString(BuildNumber.java:76)
 at jetbrains.mps.MPSMainImpl.ensureCachesInvalidatedIfRunningNewerBuild(MPSMainImpl.java:56)
 at jetbrains.mps.MPSMainImpl.start(MPSMainImpl.java:34)
 ... 6 more


By using the Build Solution wizard and choosing Standalone IDE as
the kind of distribution, I got two build projects,
calculator-tutorial and calculator-tutorialDistribution.
In order to let ant say "BUILD SUCCESSFUL", I modified the paths
in the build projects as follows.

--- The content of calculator-tutorial

build calculator-tutorial generates build.xml

base directory: ../../
/Users/X/Y/Z/calculator-tutorial

use plugins:
  java
  mps

macros:
  var date = date yyyyMMdd
  var build.number = calculator-tutorial-135.SNAPSHOT
  folder mps_home = <no defaultPath>
  folder mbeddr.github.core.home = <no defaultPath>

dependencies:
  mpsStandalone (artifacts location $mps_home)
  mpsMakePlugin (artifacts location $mps_home/plugins)

project structure:
  idea branding calculator-tutorial
    codename calculator-tutorial
    version 3.1, eap true
    full name calculator-tutorial
    build number ${build.number}, date ${date}
    icons
      16x16 ./icons/MPS16.png
      32x32 ./icons/MPS32.png
      32x32 opaque ./icons/MPS32.png
    splash screen ./icons/splash.png textcolor 002387
    about screen ./icons/about.png
    dialog image ./icons/dialogImage.png
    welcome screen
      caption ./icons/caption.png
      slogan ./icons/slogan.png
      logo ./icons/logo.png
    <no updateWebsite>
    <no help>
    feedback url <no feedbackUrl>
   
  idea plugin calculator-tutorial
    name calculator-tutorial
    short (folder) name calculator-tutorial
    description <no description>
    version 3.1
    << no vendor >>
    content:
      calculator-tutorial
    dependencies:
      jetbrains.mps.core
    << ... >>
     
  mps group calculator-tutorial
    language jetbrains.mps.calculator
      load from ./languages/calculator/jetbrains.mps.calculator.mpl
     
   
default layout:
  import mpsStandalone::languages
  import mpsStandalone::license
  folder bin
    import files from mpsStandalone::bin
      include log.xml
      include log4j.dtd
    file $mps_home/bin/idea.properties
      replace regex "\.MPS(\w+)" /g -> \.${build.number}
     
  folder lib
    import files from mpsStandalone::lib
      exclude MPS-src.zip
      exclude branding.jar
    jar branding.jar
      files of idea branding calculator-tutorial
      
  folder plugins
    import mpsStandalone::plugins/svn4idea
    import mpsStandalone::plugins/cvsIntegration
    import mpsStandalone::plugins/git4idea
    import mpsStandalone::plugins/mps-core
    plugin calculator-tutorial
      <empty>
      
    # optional plugins
    import mpsMakePlugin::mps-make
     
  properties file build.number
    build.number = ${build.number}
    date = ${date}
    version = 3.1
   
   
<<additional aspects>>


--- The content of calculator-tutorialDistribution

build calculator-tutorialDistribution generates buildDistribution.xml

base directory: ../../
/Users/X/Y/Z/calculator-tutorial

use plugins:
  << ... >>

macros:
  folder mps_home = ./../../../../Applications/MPS31.app
  folder mps_project = ./build/artifacts/calculator-tutorial
  var version = 3.1

dependencies:
  calculator-tutorial
  mps (artifacts location $mps_home)

project structure:
  << ... >>

default layout:
  tar ${build.number}-linux.tar.gz (compression gzip)
    folder calculator-tutorial ${version}
      import files from calculator-tutorial::/
        <any>
      folder bin
        file $mps_home/bin/fsnotifier (755)
        file $mps_home/bin/mps.vmoptions (644)
          fix eol: convert to a single LF, remove eof (Ctrl-Z): true
        files from $mps_home/bin
          exclude **/fsnotifier
          exclude **/fsnotifier64
         
      file $mps_home/mps.sh (755)
        fix eol: convert to a single LF, remove eof (Ctrl-Z): true
      
  zip ${build.number}.zip
    folder calculator-tutorial ${version}
      import files from calculator-tutorial::/
        <any>
      folder bin
        file $mps_home/bin/mps.vmoptions (644)
        folder win
          files from $mps_home/bin
            exclude **/*.exe
          filemode folders: <default (755)>, files: 755
            files from $mps_home/bin
              include **/*.exe
            
        folder linux
          files from $mps_home/bin
            exclude **/fsnotifier
            exclude **/fsnotifier64
          file $mps_home/bin/fsnotifier (755)
           
        folder nix
          filemode folders: <default (755)>, files: 755
            files from $mps_home/bin
            
        folder mac
          file $mps_home/bin/libbreakgen.jnilib (644)
          file $mps_home/bin/libbreakgen64.jnilib (644)
          file $mps_home/bin/restarter (755)
          file $mps_home/bin/fsnotifier (755)
          folder Contents
            folder Resources
              file $mps_home/Contents/Resources/mps.icns (644)

            folder MacOS
              file $mps_home/Contents/MacOS/mps (755)

            file $mps_home/Contents/Info.plist (644)
            
      file $mps_home/mps.sh (755)
      
  zip ${build.number}-macos.zip
    folder calculator-tutorial ${version}.app
      import files from calculator-tutorial::/
        <any>
      folder Contents
        folder Resources
          file $mps_home/Contents/Resources/mps.icns (644)
           
        folder MacOS
          file $mps_home/Contents/MacOS/mps (755)
           
        file $mps_home/Contents/Info.plist (644)
         
      folder bin
        file $mps_home/bin/libbreakgen.jnilib (644)
        file $mps_home/bin/libbreakgen64.jnilib (644)
        file $mps_home/bin/libbreakgen.dylib (644)
        file $mps_home/bin/libbreakgen64.dylib (644)
        file $mps_home/bin/restarter (755)
        file $mps_home/bin/fsnotifier (755)
        file $mps_home/bin/mps.vmoptions (644)
          fix eol: convert to a single LF, remove eof (Ctrl-Z): true
         
      file $mps_home/mps.sh (755)
        fix eol: convert to a single LF, remove eof (Ctrl-Z): true
      
<<additional aspects>>
1 comment
Assistant Professor,    Dept. of Physiology and Biophysics
          Institute for Computational Biomedicine
Associate Director,      Biomedical Informatics Core,
       Clinical Translational Science Center
0

Please sign in to leave a comment.