mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
19.35.2007 fa456f432c39ac3cbabaa582971ebcbcbb68e4f5
- add Mac native application bundles for QuickSetup, Uninstall and StatusPanel.
note that these bundles are not self contained and cannot be arbitrary moved outside of OpenDS distribution or installation location.
12 files added
3 files modified
203 ■■■■■ changed files
opendj-sdk/opends/build.xml 45 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java 15 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java 14 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/build.xml
@@ -788,6 +788,21 @@
    <mkdir dir="${pdir}/lib/extensions"  />
    <mkdir dir="${pdir}/locks"           />
    <mkdir dir="${pdir}/logs"            />
    <mkdir dir="${pdir}/bin/StatusPanel.app"                         />
    <mkdir dir="${pdir}/bin/StatusPanel.app/Contents"                />
    <mkdir dir="${pdir}/bin/StatusPanel.app/Contents/MacOS"          />
    <mkdir dir="${pdir}/bin/StatusPanel.app/Contents/Resources"      />
    <mkdir dir="${pdir}/bin/StatusPanel.app/Contents/Resources/Java" />
    <mkdir dir="${pdir}/QuickSetup.app"                              />
    <mkdir dir="${pdir}/QuickSetup.app/Contents"                     />
    <mkdir dir="${pdir}/QuickSetup.app/Contents/MacOS"               />
    <mkdir dir="${pdir}/QuickSetup.app/Contents/Resources"           />
    <mkdir dir="${pdir}/QuickSetup.app/Contents/Resources/Java"      />
    <mkdir dir="${pdir}/Uninstall.app"                               />
    <mkdir dir="${pdir}/Uninstall.app/Contents"                      />
    <mkdir dir="${pdir}/Uninstall.app/Contents/MacOS"                />
    <mkdir dir="${pdir}/Uninstall.app/Contents/Resources"            />
    <mkdir dir="${pdir}/Uninstall.app/Contents/Resources/Java"       />
    <!-- copy the message properties files -->
@@ -871,6 +886,32 @@
    <chmod file="${pdir}/setup" perm="755" />
    <chmod file="${pdir}/uninstall" perm="755" />
    <chmod file="${pdir}/upgrade" perm="755" />
    <copy todir="${pdir}/QuickSetup.app">
      <fileset dir="${resource.dir}/mac/QuickSetup.app" />
    </copy>
    <chmod perm="755">
      <fileset dir="${pdir}">
        <include name="QuickSetup.app/Contents/MacOS/JavaApplicationStub" />
      </fileset>
    </chmod>
    <copy todir="${pdir}/Uninstall.app">
      <fileset dir="${resource.dir}/mac/Uninstall.app" />
    </copy>
    <chmod perm="755">
      <fileset dir="${pdir}">
        <include name="Uninstall.app/Contents/MacOS/JavaApplicationStub" />
      </fileset>
    </chmod>
    <copy todir="${pdir}/bin/StatusPanel.app">
      <fileset dir="${resource.dir}/mac/StatusPanel.app" />
    </copy>
    <chmod perm="755">
      <fileset dir="${pdir}/bin">
        <include name="StatusPanel.app/Contents/MacOS/JavaApplicationStub" />
      </fileset>
    </chmod>
    <chmod perm="755">
      <fileset dir="${pdir}/bin">
      </fileset>
@@ -887,7 +928,7 @@
       description="Package the Directory Server for distribution.">
    <zip destfile="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip">
      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/**/*"
           excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
           excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade,${SHORT_NAME}-${VERSION_NUMBER_STRING}/QuickSetup.app/Contents/MacOS/JavaApplicationStub,${SHORT_NAME}-${VERSION_NUMBER_STRING}/Uninstall.app/Contents/MacOS/JavaApplicationStub,${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/StatusPanel.app/Contents/MacOS/JavaApplicationStub"
           filemode="644" dirmode="755" />
      <zipfileset dir="${package.dir}"
           includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh"
@@ -897,7 +938,7 @@
           filemode="755" dirmode="755" />
      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
           filemode="644" dirmode="755" />
      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade,${SHORT_NAME}-${VERSION_NUMBER_STRING}/QuickSetup.app/Contents/MacOS/JavaApplicationStub,${SHORT_NAME}-${VERSION_NUMBER_STRING}/Uninstall.app/Contents/MacOS/JavaApplicationStub,${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/StatusPanel.app/Contents/MacOS/JavaApplicationStub"
           filemode="755" dirmode="755" />
    </zip>
    <property name="package.built" value="true"/>
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/Info.plist
New file
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>JavaApplicationStub</string>
    <key>CFBundleGetInfoString</key>
    <string>OpenDS QuickSetup</string>
    <key>CFBundleIconFile</key>
    <string>OpenDS.icns</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>OpenDS QuickSetup</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>Java</key>
    <dict>
        <key>ClassPath</key>
        <array>
            <string>$JAVAROOT/../../../../lib/quicksetup.jar</string>
            <string>$JAVAROOT/../../../../lib/activation.jar</string>
            <string>$JAVAROOT/../../../../lib/aspectjrt.jar</string>
            <string>$JAVAROOT/../../../../lib/OpenDS.jar</string>
            <string>$JAVAROOT/../../../../lib/mail.jar</string>
            <string>$JAVAROOT/../../../../lib/je.jar</string>
        </array>
        <key>JVMVersion</key>
        <string>1.5+</string>
        <key>MainClass</key>
        <string>org.opends.quicksetup.installer.SetupLauncher</string>
    </dict>
</dict>
</plist>
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opendj-sdk/opends/resource/mac/QuickSetup.app/Contents/Resources/OpenDS.icns
Binary files differ
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/Info.plist
New file
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>JavaApplicationStub</string>
    <key>CFBundleGetInfoString</key>
    <string>OpenDS Status Panel</string>
    <key>CFBundleIconFile</key>
    <string>OpenDS.icns</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>OpenDS Status Panel</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>Java</key>
    <dict>
        <key>ClassPath</key>
        <array>
            <string>$JAVAROOT/../../../../../lib/quicksetup.jar</string>
            <string>$JAVAROOT/../../../../../lib/activation.jar</string>
            <string>$JAVAROOT/../../../../../lib/aspectjrt.jar</string>
            <string>$JAVAROOT/../../../../../lib/OpenDS.jar</string>
            <string>$JAVAROOT/../../../../../lib/mail.jar</string>
            <string>$JAVAROOT/../../../../../lib/je.jar</string>
        </array>
        <key>JVMVersion</key>
        <string>1.5+</string>
        <key>MainClass</key>
        <string>org.opends.guitools.statuspanel.StatusPanelLauncher</string>
    </dict>
</dict>
</plist>
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opendj-sdk/opends/resource/mac/StatusPanel.app/Contents/Resources/OpenDS.icns
Binary files differ
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/Info.plist
New file
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>JavaApplicationStub</string>
    <key>CFBundleGetInfoString</key>
    <string>OpenDS Uninstall</string>
    <key>CFBundleIconFile</key>
    <string>OpenDS.icns</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>OpenDS Uninstall</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>Java</key>
    <dict>
        <key>ClassPath</key>
        <array>
            <string>$JAVAROOT/../../../../lib/quicksetup.jar</string>
            <string>$JAVAROOT/../../../../lib/activation.jar</string>
            <string>$JAVAROOT/../../../../lib/aspectjrt.jar</string>
            <string>$JAVAROOT/../../../../lib/OpenDS.jar</string>
            <string>$JAVAROOT/../../../../lib/mail.jar</string>
            <string>$JAVAROOT/../../../../lib/je.jar</string>
        </array>
        <key>JVMVersion</key>
        <string>1.5+</string>
        <key>MainClass</key>
        <string>org.opends.guitools.uninstaller.UninstallLauncher</string>
    </dict>
</dict>
</plist>
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opendj-sdk/opends/resource/mac/Uninstall.app/Contents/Resources/OpenDS.icns
Binary files differ
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -64,6 +64,11 @@
  public static final String UNIX_BINARIES_PATH_RELATIVE = "bin";
  /**
   * The relative path where all the MacOS X Applications are.
   */
  public static final String MAC_APPLICATIONS_PATH_RELATIVE = "bin";
  /**
   * The relative path where all the libraries (jar files) are.
   */
  public static final String LIBRARIES_PATH_RELATIVE = "lib";
@@ -189,6 +194,11 @@
  public static final String WINDOWS_STATUSPANEL_FILE_NAME = "status-panel.bat";
  /**
   * The MacOS X status panel application bundle name.
   */
  public static final String MAC_STATUSPANEL_FILE_NAME = "StatusPanel.app";
  /**
   * The UNIX status command line script file name.
   */
  public static final String UNIX_STATUSCLI_FILE_NAME = "status";
@@ -725,6 +735,10 @@
    if (Utils.isWindows()) {
      statusPanelCommandFile = new File(getBinariesDirectory(),
              WINDOWS_STATUSPANEL_FILE_NAME);
    } else if (Utils.isMacOS()) {
      statusPanelCommandFile = new File(getRootDirectory() +
        File.separator + MAC_APPLICATIONS_PATH_RELATIVE,
        MAC_STATUSPANEL_FILE_NAME);
    } else {
      statusPanelCommandFile = new File(getBinariesDirectory(),
              UNIX_STATUSPANEL_FILE_NAME);
@@ -796,6 +810,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public String toString() {
    return Utils.getPath(rootDirectory);
  }
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java
@@ -43,6 +43,7 @@
import javax.swing.*;
import java.awt.Cursor;
import java.util.ArrayList;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.logging.Handler;
@@ -93,6 +94,9 @@
  // Update period of the dialogs.
  private static final int UPDATE_PERIOD = 500;
  // The full pathname of the MacOS X LaunchServices OPEN(1) helper.
  private static final String MAC_APPLICATIONS_OPENER = "/usr/bin/open";
  /**
   * This method creates the install/uninstall dialogs and to check the current
   * install status. This method must be called outside the event thread because
@@ -388,8 +392,16 @@
          } else {
            installation = Installation.getLocal();
          }
          ProcessBuilder pb;
          if (isMacOS()) {
            ArrayList<String> cmd = new ArrayList<String>();
            cmd.add(MAC_APPLICATIONS_OPENER);
            cmd.add(getPath(installation.getStatusPanelCommandFile()));
            pb = new ProcessBuilder(cmd);
          } else {
          String cmd = getPath(installation.getStatusPanelCommandFile());
          ProcessBuilder pb = new ProcessBuilder(cmd);
            pb = new ProcessBuilder(cmd);
          }
          Map<String, String> env = pb.environment();
          env.put("JAVA_HOME", System.getProperty("java.home"));
          /* Remove JAVA_BIN to be sure that we use the JVM running the