You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2016/11/01 20:16:59 UTC

svn commit: r1767557 - in /directory/studio/trunk/installers: macos/ macos/pom.xml macos/src/ macos/src/dmg/ macos/src/dmg/DS_Store macos/src/dmg/background.png macos/src/dmg/createDMG.sh pom.xml

Author: seelmann
Date: Tue Nov  1 20:16:59 2016
New Revision: 1767557

URL: http://svn.apache.org/viewvc?rev=1767557&view=rev
Log:
Add macOS DMG installer creation into Maven build.

Added:
    directory/studio/trunk/installers/macos/
    directory/studio/trunk/installers/macos/pom.xml   (with props)
    directory/studio/trunk/installers/macos/src/
    directory/studio/trunk/installers/macos/src/dmg/
    directory/studio/trunk/installers/macos/src/dmg/DS_Store   (with props)
    directory/studio/trunk/installers/macos/src/dmg/background.png   (with props)
    directory/studio/trunk/installers/macos/src/dmg/createDMG.sh   (with props)
Modified:
    directory/studio/trunk/installers/pom.xml

Added: directory/studio/trunk/installers/macos/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/installers/macos/pom.xml?rev=1767557&view=auto
==============================================================================
--- directory/studio/trunk/installers/macos/pom.xml (added)
+++ directory/studio/trunk/installers/macos/pom.xml Tue Nov  1 20:16:59 2016
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.studio</groupId>
+    <artifactId>org.apache.directory.studio.installers</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent>
+  
+  <artifactId>org.apache.directory.studio.installers.macos</artifactId>
+  <name>Apache Directory Studio macOS Installer</name>
+  <packaging>pom</packaging>
+
+  <description />
+
+  <build>
+    <plugins>
+      <plugin>
+        <!-- Copy DMG resources -->
+        <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target</outputDirectory>
+          <resources>
+            <resource>
+              <directory>${basedir}/src/dmg</directory>
+              <include>createDMG.sh</include>
+              <filtering>true</filtering>
+            </resource>
+            <resource>
+              <directory>${basedir}/src/dmg</directory>
+              <exclude>createDMG.sh</exclude>
+              <filtering>false</filtering>
+            </resource>
+          </resources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Create the DMG -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>make-executable</id>
+            <phase>package</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>chmod</executable>
+              <workingDirectory>${basedir}/target</workingDirectory>
+              <arguments>
+                <argument>+x</argument>
+                <argument>createDMG.sh</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>create-dmg</id>
+            <phase>package</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>./createDMG.sh</executable>
+              <workingDirectory>${basedir}/target</workingDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: directory/studio/trunk/installers/macos/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/installers/macos/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: directory/studio/trunk/installers/macos/src/dmg/DS_Store
URL: http://svn.apache.org/viewvc/directory/studio/trunk/installers/macos/src/dmg/DS_Store?rev=1767557&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/installers/macos/src/dmg/DS_Store
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/installers/macos/src/dmg/background.png
URL: http://svn.apache.org/viewvc/directory/studio/trunk/installers/macos/src/dmg/background.png?rev=1767557&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/installers/macos/src/dmg/background.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: directory/studio/trunk/installers/macos/src/dmg/createDMG.sh
URL: http://svn.apache.org/viewvc/directory/studio/trunk/installers/macos/src/dmg/createDMG.sh?rev=1767557&view=auto
==============================================================================
--- directory/studio/trunk/installers/macos/src/dmg/createDMG.sh (added)
+++ directory/studio/trunk/installers/macos/src/dmg/createDMG.sh Tue Nov  1 20:16:59 2016
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Creating dmg and .background folders
+mkdir dmg
+mkdir -p dmg/.background
+
+# Copy the application
+cp -a ../../../product/target/products/org.apache.directory.studio.product/macosx/cocoa/x86_64/ApacheDirectoryStudio.app dmg/
+
+# Copy legal files
+cp dmg/ApacheDirectoryStudio.app/Contents/Eclipse/LICENSE dmg/
+cp dmg/ApacheDirectoryStudio.app/Contents/Eclipse/NOTICE dmg/
+
+# Move background image
+mv background.png dmg/.background/
+
+# Move .DS_Store file
+mv DS_Store dmg/.DS_Store
+
+# Creating symbolic link to Applications folder
+ln -s /Applications dmg/Applications
+
+# Creating the disk image
+hdiutil makehybrid -hfs -hfs-volume-name "Apache Directory Studio" -hfs-openfolder dmg/ dmg/ -o TMP.dmg
+hdiutil convert -format UDZO TMP.dmg -o ApacheDirectoryStudio-${version}-macosx.cocoa.x86_64.dmg
+
+# Cleaning
+#rm TMP.dmg
+#rm -rf dmg/

Propchange: directory/studio/trunk/installers/macos/src/dmg/createDMG.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/installers/macos/src/dmg/createDMG.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: directory/studio/trunk/installers/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/installers/pom.xml?rev=1767557&r1=1767556&r2=1767557&view=diff
==============================================================================
--- directory/studio/trunk/installers/pom.xml (original)
+++ directory/studio/trunk/installers/pom.xml Tue Nov  1 20:16:59 2016
@@ -40,6 +40,12 @@
         <module>windows</module>
       </modules>
     </profile>
+    <profile>
+      <id>macos</id>
+      <modules>
+        <module>macos</module>
+      </modules>
+    </profile>
   </profiles>
 
   <build>