You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/06/06 08:51:56 UTC

[GitHub] JaroslavTulach closed pull request #440: [NETBEANS-438] Cannot Sign Platform app due to symlink

JaroslavTulach closed pull request #440: [NETBEANS-438] Cannot Sign Platform app due to symlink
URL: https://github.com/apache/incubator-netbeans/pull/440
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apisupport.harness/release/suite.xml b/apisupport.harness/release/suite.xml
index 0e4124eea..b2602a8a4 100644
--- a/apisupport.harness/release/suite.xml
+++ b/apisupport.harness/release/suite.xml
@@ -420,7 +420,39 @@ See: http://wiki.netbeans.org/DevFaqHowToReuseModules
               tofile="${dist.dir}/${app.name}.app/Contents/Resources/${app.name}.icns"/>
         
         <delete file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}"/>
-        <symlink link="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}" resource="../Resources/${app.name}/bin/${app.name}"/>
+        <!--TODO: move script to external file-->
+        <echo file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}">#!/bin/sh
+#copied from nbexec
+resolve_symlink () {
+    file="$$1"
+    while [ -h "$$file" ]; do
+        ls=`ls -ld "$$file"`
+        link=`expr "$$ls" : '^.*-> \(.*\)$' 2>/dev/null`
+        if expr "$$link" : '^/' 2> /dev/null >/dev/null; then
+            file="$$link"
+        else
+            file=`dirname "$$1"`"/$$link"
+        fi
+    done
+    echo "$file"
+}
+
+absolutize_path () {
+    oldpwd=`pwd`
+    cd "$$1"
+    abspath=`pwd`
+    cd "$${oldpwd}"
+    echo "$$abspath"
+}
+PRG="`resolve_symlink "$$0"`"
+parentDir="`dirname "$$PRG"`"
+parentDir="`absolutize_path "$$parentDir"`"
+#resolve the script path
+scriptPath="$$parentDir/../Resources/${app.name}/bin"
+#run the main executable
+sh -- "$$scriptPath/${app.name}" "$$@"
+</echo>
+        <chmod file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}" perm="755"/>
         <chmod file="${dist.dir}/${app.name}.app/Contents/Resources/${app.name}/bin/${app.name}" perm="755"/>
         <chmod dir="${dist.dir}" includes="${app.name}.app/Contents/Resources/${app.name}/platform*/lib/nbexec" perm="755"/>
         


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists