Menu

#1287 The launcher script does not work with the plain ZIP version on MacOS

SQuirreL
closed-fixed
nobody
mac (3) osx (4)
5
2017-02-13
2017-02-10
No

On MacOS, the launcher script contains a hard-coded reference to Contents/Resources/Java

if $macosx ; then
    SQUIRREL_SQL_HOME=`dirname "$0"`/Contents/Resources/Java
else
        SQUIRREL_SQL_HOME=`dirname "$0"`
fi

The should work correctly when the application is installed through the standard installer procedure, but fails to start Squirrel SQL when one uses the plain ZIP version (since there, the original (non-Mac specific) directory layout is present)

The launcher script should check if the assumed MacOS directory actually exists and fall-back to the standard directory if it is not found, so that both the installed version and the plain ZIP version work on MacOS systems. My solution to this issue would be like this:

if $macosx ; then
    SQUIRREL_SQL_HOME=`dirname "$0"`/Contents/Resources/Java
    if [ ! -d "$SQUIRREL_SQL_HOME" ]; then
        # We assume that this is the ZIP file extracted on MacOS,
        # so, fall-back to the defult path
        SQUIRREL_SQL_HOME=`dirname "$0"`
    fi
else
        SQUIRREL_SQL_HOME=`dirname "$0"`
fi

Discussion

  • Gerd Wagner

    Gerd Wagner - 2017-02-13
    • status: open --> closed-fixed
     
  • Gerd Wagner

    Gerd Wagner - 2017-02-13

    The change you suggested have been committed to our Git repository please check the next snapshot if it works.

    Thanks Gerd

     

Log in to post a comment.

MongoDB Logo MongoDB