-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+<project xmlns="http://maven.apache.org/POM/4.0.0"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
<modelVersion>4.0.0</modelVersion>\r
\r
<!-- 実行可能jar本体のパッケージを行う (package時) -->\r
<groupId>org.apache.maven.plugins</groupId>\r
<artifactId>maven-jar-plugin</artifactId>\r
- <version>2.6</version>\r
+ <version>3.1.0</version>\r
<configuration>\r
<finalName>${project.artifactId}</finalName>\r
<archive>\r
</os>\r
</activation>\r
<properties>\r
- <!-- ${hava.home}は、\r
- /Library/Java/JavaVirtualMachines/jdkXXX.jdk/Contents/Home/jre/ を指すので\r
- /Library/Java/JavaVirtualMachines/jdkXXX.jdk/ を指すように親を3つ戻す -->\r
- <copyJrePath>${java.home}/../../../</copyJrePath>\r
- </properties>\r
+ <copyJrePath>${java.home}</copyJrePath>\r
+ </properties>\r
<build>\r
<plugins>\r
<plugin>\r
- <!-- MacのAppBundleを作成する\r
- https://github.com/federkasten/appbundle-maven-plugin\r
- https://stackoverflow.com/questions/39193868/bundle-java-program-for-mac-users-with-maven-from-gnu-linux\r
- -->\r
- <groupId>sh.tak.appbundler</groupId>\r
- <artifactId>appbundle-maven-plugin</artifactId>\r
- <version>1.2.0</version>\r
- <configuration>\r
- <mainClass>${mainClass}</mainClass>\r
- <iconFile>icon.icns</iconFile>\r
- <workingDirectory>$APP_ROOT/../</workingDirectory>\r
- <generateDiskImageFile>true</generateDiskImageFile>\r
- <jvmOptions>\r
- <jvmOption>-splash:$APP_ROOT/Contents/Resources/splash.png</jvmOption>\r
- <jvmOption>-Xms96m</jvmOption>\r
- <jvmOption>-Xmx128m</jvmOption>\r
- </jvmOptions>\r
- <additionalResources>\r
- <fileSet>\r
- <directory>src/main/attachment</directory>\r
- <includes>\r
- <include>README_mac.txt</include>\r
- </includes>\r
- </fileSet>\r
- <fileSet>\r
- <directory>src/main/attachment/bundle</directory>\r
- <includes>\r
- <include>**/*</include>\r
- </includes>\r
- </fileSet>\r
- </additionalResources>\r
- </configuration>\r
+ <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-antrun-plugin -->\r
+ <groupId>org.apache.maven.plugins</groupId>\r
+ <artifactId>maven-antrun-plugin</artifactId>\r
+ <version>1.8</version>\r
<executions>\r
<execution>\r
- <id>MakeDMG</id>\r
- <configuration>\r
- <diskImageFile>${project.build.directory}/${project.artifactId}_${project.version}.dmg</diskImageFile>\r
- </configuration>\r
<phase>package</phase>\r
- <goals>\r
- <goal>bundle</goal>\r
- </goals>\r
- </execution>\r
- <execution>\r
- <id>MakeDMGWithJRE</id>\r
<configuration>\r
- <jrePath>${copyJrePath}</jrePath>\r
- <diskImageFile>${project.build.directory}/${project.artifactId}_${project.version}_with_JRE.dmg</diskImageFile>\r
+ <tasks>\r
+ <delete dir="${project.build.directory}/appbundle"/>\r
+ <mkdir dir="${project.build.directory}/appbundle"/>\r
+ <copy todir="${project.build.directory}/appbundle">\r
+ <fileset dir="${project.basedir}/src/main/attachment/bundle">\r
+ <include name="**/*"/>\r
+ </fileset>\r
+ </copy>\r
+ <copy todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">\r
+ <fileset dir="${project.basedir}">\r
+ <include name="icon.icns"/>\r
+ </fileset>\r
+ <fileset dir="${project.build.directory}">\r
+ <include name="${project.artifactId}.jar"/>\r
+ </fileset>\r
+ </copy>\r
+ <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/MacOS"\r
+ perm="a+rx" includes="**/*.sh"/>\r
+ <copy todir="${project.build.directory}/appbundle">\r
+ <fileset dir="${project.basedir}/src/main/attachment">\r
+ <include name="README_mac.txt"/>\r
+ </fileset>\r
+ </copy>\r
+\r
+ <delete file="${project.build.directory}/${project.artifactId}${project.version}.dmg"/>\r
+ <exec executable="hdiutil">\r
+ <arg value="create"/>\r
+ <arg value="-srcfolder"/>\r
+ <arg value="${project.build.directory}/appbundle"/>\r
+ <arg value="-volname"/>\r
+ <arg value="${project.artifactId}_${project.version}.dmg"/>\r
+ <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>\r
+ </exec>\r
+ <exec executable="hdiutil">\r
+ <arg value="internet-enable"/>\r
+ <arg value="-yes"/>\r
+ <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>\r
+ </exec>\r
+\r
+ <delete dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"/>\r
+ <copy todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE">\r
+ <fileset dir="${copyJrePath}">\r
+ <include name="**/*"/>\r
+ </fileset>\r
+ </copy>\r
+ <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"\r
+ perm="a+rx" includes="bin/*"/>\r
+ <delete file="${project.build.directory}/${project.artifactId}${project.version}_with_jre.dmg"/>\r
+ <exec executable="hdiutil">\r
+ <arg value="create"/>\r
+ <arg value="-srcfolder"/>\r
+ <arg value="${project.build.directory}/appbundle"/>\r
+ <arg value="-volname"/>\r
+ <arg value="${project.artifactId}_${project.version}.dmg"/>\r
+ <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>\r
+ </exec>\r
+ <exec executable="hdiutil">\r
+ <arg value="internet-enable"/>\r
+ <arg value="-yes"/>\r
+ <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>\r
+ </exec>\r
+ </tasks>\r
</configuration>\r
- <phase>package</phase>\r
<goals>\r
- <goal>bundle</goal>\r
+ <goal>run</goal>\r
</goals>\r
</execution>\r
</executions>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>java_launch.sh</string>
+ <key>CFBundleIconFile</key>
+ <string>icon.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>charactermanaj.CharacterManaJ</string>
+ <key>CFBundleDisplayName</key>
+ <string>CharacterManaJ</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>CharacterManaJ</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>seraphy@users.osdn.me</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+ </dict>
+</plist>