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

Ludovic Poitou
27.33.2013 382cb45063f25b0e8ae5324b955b6deb4f0b01aa
Fix for OpenDJ-909 : ControlPanel.app exits during startup.
There are a number of issues with the Mac Apps, and this commit fixes most of them, but we should also change the icon name and picture once we have a logo for OpenDJ.
The version and revision numbers are now automatically set when packaging.
The -client JVM option is deprecated and thus removed. And we properly set the ServerRoot to allow ControlPanel to work when double clicking the icon.
Note that Mac App are dependant on the JavaApplicationStub that only supports Java6. We fine for now, since OpenDJ is built with target 1.6, but we will need to redo the Apps when/if we switch to 1.7 by default.

4 files modified
49 ■■■■ changed files
opends/build.xml 31 ●●●● patch | view | raw | blame | history
opends/resource/mac/ControlPanel.app/Contents/Info.plist 6 ●●●●● patch | view | raw | blame | history
opends/resource/mac/QuickSetup.app/Contents/Info.plist 6 ●●●●● patch | view | raw | blame | history
opends/resource/mac/Uninstall.app/Contents/Info.plist 6 ●●●●● patch | view | raw | blame | history
opends/build.xml
@@ -201,6 +201,7 @@
       compilation. -->
  <presetdef name="javac">
    <javac optimize="true" includeantruntime="false"
           source="1.6" target="1.6"
        debug="on" debuglevel="${build.debuglevel}"
        deprecation="true" fork="true"
        memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}">
@@ -1147,10 +1148,10 @@
      </classpath>
    </manifestclasspath>
    <jar jarfile="${pdir}/lib/bootstrap.jar">
      <manifest>
      <manifest>
        <attribute name="Built-By" value="${user.name}" />
        <attribute name="Class-Path" value="${manifest.classpath}" />
      </manifest>
      </manifest>
    </jar>
    <!-- Create buildinfo files -->
@@ -1213,6 +1214,12 @@
    <copy todir="${pdir}/QuickSetup.app">
      <fileset dir="${resource.dir}/mac/QuickSetup.app" />
    </copy>
    <replace file="${pdir}/QuickSetup.app/Contents/Info.plist"
             token="@version@"
             value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
    <replace file="${pdir}/QuickSetup.app/Contents/Info.plist"
             token="@revision@"
             value="${REVISION_NUMBER}"/>
    <chmod perm="755">
      <fileset dir="${pdir}">
        <include name="QuickSetup.app/Contents/MacOS/JavaApplicationStub" />
@@ -1221,6 +1228,12 @@
    <copy todir="${pdir}/Uninstall.app">
      <fileset dir="${resource.dir}/mac/Uninstall.app" />
    </copy>
    <replace file="${pdir}/Uninstall.app/Contents/Info.plist"
             token="@version@"
             value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
    <replace file="${pdir}/Uninstall.app/Contents/Info.plist"
             token="@revision@"
             value="${REVISION_NUMBER}"/>
    <chmod perm="755">
      <fileset dir="${pdir}">
        <include name="Uninstall.app/Contents/MacOS/JavaApplicationStub" />
@@ -1229,6 +1242,12 @@
    <copy todir="${pdir}/bin/ControlPanel.app">
      <fileset dir="${resource.dir}/mac/ControlPanel.app" />
    </copy>
    <replace file="${pdir}/bin/ControlPanel.app/Contents/Info.plist"
             token="@version@"
             value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
    <replace file="${pdir}/bin/ControlPanel.app/Contents/Info.plist"
             token="@revision@"
             value="${REVISION_NUMBER}"/>
    <chmod perm="755">
      <fileset dir="${pdir}/bin">
        <include name="ControlPanel.app/Contents/MacOS/JavaApplicationStub" />
@@ -1355,7 +1374,7 @@
    <mkdir dir="${build.dir}/deb/control" />
    <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask"/>
    <copy todir="${build.dir}/deb/control">
      <fileset dir="resource/debian/control"/>
      <filterset begintoken="[[" endtoken="]]">
@@ -1371,11 +1390,11 @@
    <copy file="resource/debian/control/preinst" tofile="${build.dir}/deb/control" />
    <copy file="resource/debian/control/postinst" tofile="${build.dir}/deb/control" />
    <copy file="resource/debian/control/prerm" tofile="${build.dir}/deb/control" />
    <copy file="resource/debian/control/prerm" tofile="${build.dir}/deb/control" />
    <copy file="resource/debian/control/postrm" tofile="${build.dir}/deb/control" />
    <replace dir="${build.dir}/deb/control/" token="@prefix@" value="${prefix}" />
    <deb destfile="${package.dir}/${SHORT_NAME}_${VERSION_NUMBER_STRING}-${release}_all.deb"
         control="${build.dir}/deb/control">
      <tarfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"
@@ -2704,7 +2723,7 @@
  <target name="clean-ivy-cache" depends="install-ivy" description="--> clean the ivy cache">
    <ivy:cleancache/>
  </target>
  </target>
  <import file="build-svr4.xml"/>
  <import file="build-pkg.xml"/>
opends/resource/mac/ControlPanel.app/Contents/Info.plist
@@ -6,8 +6,10 @@
    <string>OpenDJ Control Panel</string>
    <key>CFBundleIdentifier</key>
    <string>org.opends.guitools.controlpanel.ControlPanelLauncher</string>
    <key>CFBundleShortVersionString</key>
    <string>@version@</string>
    <key>CFBundleVersion</key>
    <string>2.3.0</string>
    <string>@revision@</string>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleExecutable</key>
@@ -25,7 +27,7 @@
    <key>Java</key>
    <dict>
        <key>VMOptions</key>
        <string>-client</string>
        <string>-Dorg.opends.server.ServerRoot=$APP_PACKAGE/../..</string>
        <key>MainClass</key>
        <string>org.opends.guitools.controlpanel.ControlPanelLauncher</string>
        <key>JVMVersion</key>
opends/resource/mac/QuickSetup.app/Contents/Info.plist
@@ -6,8 +6,10 @@
    <string>OpenDJ QuickSetup</string>
    <key>CFBundleIdentifier</key>
    <string>org.opends.quicksetup.installer.SetupLauncher</string>
    <key>CFBundleShortVersionString</key>
    <string>@version@</string>
    <key>CFBundleVersion</key>
    <string>2.3.0</string>
    <string>@revision@</string>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleExecutable</key>
@@ -25,7 +27,7 @@
    <key>Java</key>
    <dict>
        <key>VMOptions</key>
        <string>-client</string>
        <string>-Dorg.opends.server.ServerRoot=$APP_PACKAGE/..</string>
        <key>MainClass</key>
        <string>org.opends.quicksetup.installer.SetupLauncher</string>
        <key>JVMVersion</key>
opends/resource/mac/Uninstall.app/Contents/Info.plist
@@ -6,8 +6,10 @@
    <string>OpenDJ Uninstall</string>
    <key>CFBundleIdentifier</key>
    <string>org.opends.guitools.uninstaller.UninstallLauncher</string>
    <key>CFBundleShortVersionString</key>
    <string>@version@</string>
    <key>CFBundleVersion</key>
    <string>2.3.0</string>
    <string>@revision@</string>
    <key>CFBundleAllowMixedLocalizations</key>
    <string>true</string>
    <key>CFBundleExecutable</key>
@@ -25,7 +27,7 @@
    <key>Java</key>
    <dict>
        <key>VMOptions</key>
        <string>-client</string>
        <string>-Dorg.opends.server.ServerRoot=$APP_PACKAGE/..</string>
        <key>MainClass</key>
        <string>org.opends.guitools.uninstaller.UninstallLauncher</string>
        <key>JVMVersion</key>