mbeddr / mps-gradle-plugin

Miscellaneous tasks that were found useful when building MPS-based projects with Gradle.
Other
14 stars 15 forks source link

Broken symlink created during bundling #26

Open arimer opened 6 years ago

arimer commented 6 years ago

When creating a .dmg file containing the application a broken symlink is still created under

Application/MyAppapp/Contents/bin/*.dylib

To verify this for your application you could just use the following command to find the broken link:

find . -type l ! -exec test -e {} \; -print

It looks like the following code is always executed. I will add a condition there.

https://github.com/mbeddr/mps-gradle-plugin/blob/3ac8f0588066935f2861cc5affddc097feb94855/src/main/resources/de/itemis/mps/gradle/mpssign.sh#L47

arimer commented 6 years ago

Just saw that we have duplicated and outdated code in two scripts:

https://github.com/mbeddr/mps-gradle-plugin/blob/3ac8f0588066935f2861cc5affddc097feb94855/src/main/resources/de/itemis/mps/gradle/bundle_macos_jdk.sh#L33

and

https://github.com/mbeddr/mps-gradle-plugin/blob/3ac8f0588066935f2861cc5affddc097feb94855/src/main/resources/de/itemis/mps/gradle/mpssign.sh#L47

I am not sure if we want to keep both of it, because it seems to be only relevant for older MPS versions.

sergej-koscejev commented 6 years ago

@arimer you probably meant one of the files to be mpssign.sh in your comment.

We should call bundle_macos_jdk.sh from mpssign.sh, and remove most of the code from mpssign.sh except for the argument parsing and signing.

mpssign.sh should:

  1. Parse arguments (also check the SIGN_ arguments before the script does anything)
  2. Call bundle_macos_jdk.sh with appropriate args (if no JDK was given, pass empty string as JDK)
  3. Do the signing stuff (code beginning with echo "Signing application $BUILD_NAME", up to echo "check sign done").
arimer commented 6 years ago

Could we maybe agree to merge first the simple change introduced here: https://github.com/mbeddr/mps-gradle-plugin/pull/27

And afterwards refactor the buildscripts?

sergej-koscejev commented 6 years ago

@arimer sure :)