提交 c7b4fa00 编写于 作者: M Mathieu Bastian

Create OS X application bundle

上级 3c13058c
......@@ -541,6 +541,7 @@
<directory>src/main/resources</directory>
<includes>
<include>${brandingToken}.conf</include>
<include>Info.plist</include>
</includes>
<filtering>true</filtering>
</resource>
......@@ -549,6 +550,96 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>create-app-bundle</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${project.build.directory}/${gephi.appbundle.name}.app"/>
</delete>
<mkdir dir="${project.build.directory}/${gephi.appbundle.name}.app"/>
<mkdir dir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS"/>
<unjar src="${project.build.directory}/${project.build.finalName}.zip"
dest="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/"/>
<copy tofile="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}.icns" file="src/main/app-resources/${brandingToken}.icns" />
<copy tofile="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Info.plist" file="${project.build.directory}/Info.plist"/>
<chmod file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}/bin/${brandingToken}" perm="ugo+rx"/>
<symlink link="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS/Gephi" resource="../Resources/${brandingToken}/bin/${brandingToken}"/>
<exec dir="${project.build.directory}" os="Mac OS X" executable="hdiutil">
<arg value="create"/>
<arg value="-noanyowners"/>
<arg value="-imagekey"/>
<arg value="zlib-level=1"/>
<arg value="-srcfolder"/>
<arg value="${gephi.appbundle.name}.app"/>
<arg value="${gephi.appbundle.name}-${project.version}.dmg"/>
</exec>
<exec dir="${project.build.directory}" os="Linux" executable="mkisofs">
<arg value="-V"/>
<arg value="${gephi.appbundle.name}"/>
<arg value="-U"/>
<arg value="-f"/>
<arg value="-D"/>
<arg value="-l"/>
<arg value="-L"/>
<arg value="-allow-multidot"/>
<arg value="-max-iso9660-filenames"/>
<arg value="-relaxed-filenames"/>
<arg value="-no-iso-translate"/>
<arg value="-r"/>
<arg value="-o"/>
<arg value="${gephi.appbundle.name}-${project.version}.dmg"/>
<arg value="-root"/>
<arg value="${gephi.appbundle.name}.app"/>
<arg value="${gephi.appbundle.name}.app"/>
</exec>
<gzip src="${project.build.directory}/${gephi.appbundle.name}-${project.version}.dmg"
destfile="${project.build.directory}/${gephi.appbundle.name}-${project.version}.dmg.gz"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-app-bundle</id>
<phase>pre-integration-test</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${gephi.appbundle.name}-${project.version}.dmg.gz</file>
<type>dmg.gz</type>
<classifier>executable</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Gephi</string>
<key>CFBundleVersion</key>
<string>0.8.1</string>
<key>CFBundleExecutable</key>
<string>Gephi</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>org.gephi</string>
<key>CFBundleIconFile</key>
<string>gephi.icns</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>gephi</string>
</array>
<key>CFBundleTypeName</key>
<string>Gephi Project File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>gexf</string>
</array>
<key>CFBundleTypeName</key>
<string>GEXF Graph File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
</dict>
</plist>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Gephi</string>
<key>CFBundleVersion</key>
<string>${project.version}</string>
<key>CFBundleExecutable</key>
<string>gephi</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${project.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>org.gephi</string>
<key>CFBundleIconFile</key>
<string>gephi.icns</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>gephi</string>
</array>
<key>CFBundleTypeName</key>
<string>Gephi Project File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>gexf</string>
</array>
<key>CFBundleTypeName</key>
<string>GEXF Graph File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
</dict>
</plist>
\ No newline at end of file
......@@ -36,6 +36,8 @@
<gephi.netbeans.useOSGiDependencies>false</gephi.netbeans.useOSGiDependencies>
<gephi.appbundle.name>Gephi</gephi.appbundle.name>
<gephi.appbundle.signature>????</gephi.appbundle.signature>
<gephi.jarbundler.version>2.2.0</gephi.jarbundler.version>
<gephi.scm>git</gephi.scm>
......@@ -266,6 +268,7 @@
</plugin>
</plugins>
</build>
<modules>
<module>modules/branding</module>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册