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

abobrov
19.35.2007 f1eebaffa04eb5d931ab368a074012740fd56fe3
- 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
263 ■■■■ changed files
opends/build.xml 103 ●●●●● patch | view | raw | blame | history
opends/resource/mac/QuickSetup.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opends/resource/mac/QuickSetup.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opends/resource/mac/QuickSetup.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opends/resource/mac/QuickSetup.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opends/resource/mac/StatusPanel.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opends/resource/mac/StatusPanel.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opends/resource/mac/StatusPanel.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opends/resource/mac/StatusPanel.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opends/resource/mac/Uninstall.app/Contents/Info.plist 42 ●●●●● patch | view | raw | blame | history
opends/resource/mac/Uninstall.app/Contents/MacOS/JavaApplicationStub patch | view | raw | blame | history
opends/resource/mac/Uninstall.app/Contents/PkgInfo 1 ●●●● patch | view | raw | blame | history
opends/resource/mac/Uninstall.app/Contents/Resources/OpenDS.icns patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/Installation.java 15 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetup.java 16 ●●●● patch | view | raw | blame | history
opends/build.xml
@@ -316,7 +316,7 @@
    <path id="quickSetup.classpath">
       <pathelement location="${quicksetup.classes.dir}" />
    </path>
    <tstamp>
      <format property="timestamp" pattern="yyyyMMddHHmmss'Z'"
           timezone="UTC" />
@@ -622,7 +622,7 @@
       <fileset dir="${msg.prop.dir}"
              includes="**/quicksetup.properties" />
    </copy>
  </target>
@@ -769,25 +769,40 @@
    <property name="pdir"
         location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
    <mkdir dir="${pdir}"                 />
    <mkdir dir="${pdir}/adminDb"         />
    <mkdir dir="${pdir}/bak"             />
    <mkdir dir="${pdir}/bat"             />
    <mkdir dir="${pdir}/bin"             />
    <mkdir dir="${pdir}/classes"         />
    <mkdir dir="${pdir}/config"          />
    <mkdir dir="${pdir}/config/upgrade"  />
    <mkdir dir="${pdir}/config/schema"   />
    <mkdir dir="${pdir}/config/messages" />
    <mkdir dir="${pdir}/config/MakeLDIF" />
    <mkdir dir="${pdir}/db"              />
    <mkdir dir="${pdir}/changelogDb"     />
    <mkdir dir="${pdir}/ldif"            />
    <mkdir dir="${pdir}/legal-notices"   />
    <mkdir dir="${pdir}/lib"             />
    <mkdir dir="${pdir}/lib/extensions"  />
    <mkdir dir="${pdir}/locks"           />
    <mkdir dir="${pdir}/logs"            />
    <mkdir dir="${pdir}"                                             />
    <mkdir dir="${pdir}/adminDb"                                     />
    <mkdir dir="${pdir}/bak"                                         />
    <mkdir dir="${pdir}/bat"                                         />
    <mkdir dir="${pdir}/bin"                                         />
    <mkdir dir="${pdir}/classes"                                     />
    <mkdir dir="${pdir}/config"                                      />
    <mkdir dir="${pdir}/config/upgrade"                              />
    <mkdir dir="${pdir}/config/schema"                               />
    <mkdir dir="${pdir}/config/messages"                             />
    <mkdir dir="${pdir}/config/MakeLDIF"                             />
    <mkdir dir="${pdir}/db"                                          />
    <mkdir dir="${pdir}/changelogDb"                                 />
    <mkdir dir="${pdir}/ldif"                                        />
    <mkdir dir="${pdir}/legal-notices"                               />
    <mkdir dir="${pdir}/lib"                                         />
    <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 -->
@@ -801,8 +816,8 @@
          file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
    <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar"
         basedir="${classes.dir}"
         excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}"
         basedir="${classes.dir}"
         excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}"
         compress="true" index="true" />
    <jar jarfile="${pdir}/lib/quicksetup.jar"
@@ -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"/>
@@ -1112,7 +1153,7 @@
        </not>
      </and>
    </condition>
    <!-- run tests dependent upon creation of the .zip file -->
    <condition property="test.packages" value="org.opends.server.*,org.opends.messages.*,org.opends.quicksetup.*">
      <and>
@@ -1488,9 +1529,9 @@
    <!-- If the debug port was set, we pass these options into the <testng> target below:
           -Xdebug
           -Xnoagent
           -Djava.compiler=NONE
           -Xdebug
           -Xnoagent
           -Djava.compiler=NONE
           -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
     -->
    <condition property="test.remote.debug.suspend" value="y">
@@ -1507,8 +1548,8 @@
    <condition property="jvm.debug.arg3" value="-Djava.compiler=NONE" else="-Dopends.bogus.debug.arg3">
       <isset property="test.remote.debug.port" />
    </condition>
    <condition property="jvm.debug.arg4"
         value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${test.remote.debug.suspend},address=${test.remote.debug.port}"
    <condition property="jvm.debug.arg4"
         value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${test.remote.debug.suspend},address=${test.remote.debug.port}"
         else="-Dopends.bogus.debug.arg4">
       <isset property="test.remote.debug.port" />
    </condition>
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>
opends/resource/mac/QuickSetup.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opends/resource/mac/QuickSetup.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opends/resource/mac/QuickSetup.app/Contents/Resources/OpenDS.icns
Binary files differ
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>
opends/resource/mac/StatusPanel.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opends/resource/mac/StatusPanel.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opends/resource/mac/StatusPanel.app/Contents/Resources/OpenDS.icns
Binary files differ
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>
opends/resource/mac/Uninstall.app/Contents/MacOS/JavaApplicationStub
Binary files differ
opends/resource/mac/Uninstall.app/Contents/PkgInfo
New file
@@ -0,0 +1 @@
APPL????
opends/resource/mac/Uninstall.app/Contents/Resources/OpenDS.icns
Binary files differ
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);
  }
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();
          }
          String cmd = getPath(installation.getStatusPanelCommandFile());
          ProcessBuilder pb = new ProcessBuilder(cmd);
          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());
            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