OSDN Git Service

appbundle-maven-pluginによるMac用バンドルの作成。
authorseraphy <seraphy@users.osdn.me>
Sun, 18 Feb 2018 13:13:21 +0000 (22:13 +0900)
committerseraphy <seraphy@seraphyware.com>
Tue, 20 Feb 2018 15:15:16 +0000 (00:15 +0900)
java6のバンドルは削除した。

https://github.com/federkasten/appbundle-maven-plugin

バンドルに入れるjdkをjava.homeより取得するように修正。

34 files changed:
.classpath
.settings/org.eclipse.core.resources.prefs
dist/.gitignore [deleted file]
dist/build_all.sh [deleted file]
dist/build_appbundle6.sh [deleted file]
dist/build_appbundle8.sh [deleted file]
dist/build_appbundle8_jre.sh [deleted file]
dist/build_appbundle8_jre.xml [deleted file]
dist/build_dmg.sh [deleted file]
dist/build_with_jre_dmg.sh [deleted file]
dist/java6mac/CharacterManaJ.app/Contents/Info.plist [deleted file]
dist/java6mac/CharacterManaJ.app/Contents/MacOS/JavaApplicationStub [deleted file]
dist/java6mac/CharacterManaJ.app/Contents/PkgInfo [deleted file]
dist/java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar [deleted file]
dist/java6mac/CharacterManaJ.app/Contents/Resources/icon.icns [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Info.plist [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Java/CharacterManaJ.jar [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/MacOS/JavaAppLauncher [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/PkgInfo [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/PlugIns/.gitignore [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Resources/en.lproj/InfoPlist.strings [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Resources/icon.icns [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Resources/ja.lproj/InfoPlist.strings [deleted file]
dist/java8mac/CharacterManaJ.app/Contents/Resources/splash.png [deleted file]
extlib/appbundler-1.0.jar [deleted file]
pom.xml
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/en.lproj/InfoPlist.strings [moved from dist/java6mac/CharacterManaJ.app/Contents/Resources/en.lproj/InfoPlist.strings with 100% similarity]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/en.lproj/Localizable.strings [moved from dist/java8mac/CharacterManaJ.app/Contents/Resources/en.lproj/Localizable.strings with 100% similarity]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/ja.lproj/InfoPlist.strings [moved from dist/java6mac/CharacterManaJ.app/Contents/Resources/ja.lproj/InfoPlist.strings with 100% similarity]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/ja.lproj/Localizable.strings [moved from dist/java8mac/CharacterManaJ.app/Contents/Resources/ja.lproj/Localizable.strings with 100% similarity]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/splash.png [moved from dist/java6mac/CharacterManaJ.app/Contents/Resources/splash.png with 100% similarity, mode: 0644]
src/test/resources/charactermanaj/model/character.xml [moved from src/test/java/charactermanaj/model/character.xml with 100% similarity]
src/test/resources/charactermanaj/model/prop1.xml [moved from src/test/java/charactermanaj/model/prop1.xml with 100% similarity]
src/test/resources/charactermanaj/model/prop2.xml [moved from src/test/java/charactermanaj/model/prop2.xml with 100% similarity]

index db23dd4..32024e4 100644 (file)
        </classpathentry>\r
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">\r
                <attributes>\r
-                       <attribute name="owner.project.facets" value="java"/>\r
+                       <attribute name="maven.pomderived" value="true"/>\r
+               </attributes>\r
+       </classpathentry>\r
+       <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">\r
+               <attributes>\r
+                       <attribute name="maven.pomderived" value="true"/>\r
                </attributes>\r
        </classpathentry>\r
        <classpathentry kind="output" path="target/classes"/>\r
index 537bea2..b26afdd 100644 (file)
@@ -4,4 +4,5 @@ encoding//src/main/resources=UTF-8
 encoding//src/main/resources/appinfo/about.html=UTF-8\r
 encoding//src/main/resources/appinfo/about_ja.html=UTF-8\r
 encoding//src/test/java=UTF-8\r
+encoding//src/test/resources=UTF-8\r
 encoding/<project>=UTF-8\r
diff --git a/dist/.gitignore b/dist/.gitignore
deleted file mode 100644 (file)
index 5b091dd..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/jre\r
-/java8macWithJRE\r
-/java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar\r
-/java8mac/CharacterManaJ.app/Contents/Java/CharacterManaJ.jar\r
-/charactermanaj.l4j.ini\r
-*.dmg\r
-*.exe\r
-*.jar\r
-*.zip\r
-*.txt\r
-.DS_Store\r
-\r
diff --git a/dist/build_all.sh b/dist/build_all.sh
deleted file mode 100755 (executable)
index f2aacf0..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# -*- coding: utf-8 -*-
-
-echo "*****************************"
-echo "Mac用の配布物の一括作成を行います"
-echo "*****************************"
-
-./build_appbundle6.sh
-if [ $? -ne 0 ]; then
-    echo "error" >&2
-    exit 1
-fi
-
-echo "*****************************"
-./build_appbundle8.sh
-if [ $? -ne 0 ]; then
-    echo "error" >&2
-    exit 1
-fi
-
-echo "*****************************"
-./build_appbundle8_jre.sh
-if [ $? -ne 0 ]; then
-    echo "error" >&2
-    exit 1
-fi
-
-echo "*****************************"
-./build_dmg.sh
-if [ $? -ne 0 ]; then
-    echo "error" >&2
-    exit 1
-fi
-
-echo "*****************************"
-./build_with_jre_dmg.sh
-if [ $? -ne 0 ]; then
-    echo "error" >&2
-    exit 1
-fi
-
-echo "*****************************"
-echo "all done"
-
-
-
diff --git a/dist/build_appbundle6.sh b/dist/build_appbundle6.sh
deleted file mode 100755 (executable)
index 4a2f8b5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/bash
-# -*- coding: utf-8 -*-
-
-JARNAME=CharacterManaJ.jar
-APPDIR=java6mac/CharacterManaJ.app
-
-if [ ! -d "$APPDIR" ]; then
-    echo "directory not found: $APPDIR" >&2
-    exit 1
-fi
-
-# 実行可能jarのコピー
-cp -pv $JARNAME $APPDIR/Contents/Resources/java/${JARNAME}
-
-# Java起動スタブをコピー
-cp -apv "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub" $APPDIR/Contents/MacOS/
-
-# バンドル属性をセット
-/usr/bin/setFile -a B $APPDIR
-
-# Java起動スタブに実行パーミッションを設定
-chmod 755 $APPDIR/Contents/MacOS/JavaApplicationStub
-
-# リソースディレクトリのパーミッション設定
-chmod -R 774 $APPDIR/Contents/Resources/
-
-echo "done"
diff --git a/dist/build_appbundle8.sh b/dist/build_appbundle8.sh
deleted file mode 100755 (executable)
index 34538a1..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/bash
-# -*- coding: utf-8 -*-
-
-JARNAME=CharacterManaJ.jar
-APPDIR=java8mac/CharacterManaJ.app
-
-PlistBuddy=/usr/libexec/PlistBuddy
-
-if [ ! -d "$APPDIR" ]; then
-    echo "directory not found: $APPDIR" >&2
-    exit 1
-fi
-
-# 実行可能jarのコピー
-cp -pv $JARNAME $APPDIR/Contents/java/${JARNAME}
-
-# バンドル属性をセット
-/usr/bin/setFile -a B $APPDIR
-
-# Java起動スタブに実行パーミッションを設定
-chmod 755 $APPDIR/Contents/MacOS/JavaAppLauncher
-
-# リソースディレクトリのパーミッション設定
-chmod -R 774 $APPDIR/Contents/Resources/
-
-
-# JVMRuntimeの設定を取得する.
-jdkname=$($PlistBuddy -c "Print JVMRuntime" $APPDIR/Contents/Info.plist 2>/dev/null)
-echo Info.plist JVMRuntime=$jdkname
-
-if [ ! -z "$jdkname" ]; then
-    echo "Remove JVMRuntime entry"
-    # JVMRuntimeなしに設定する
-    $PlistBuddy -c "Delete :JVMRuntime" $APPDIR/Contents/Info.plist
-
-    # JVMRuntimeを消す
-    rm -frv $APPDIR/Contents/PlugIns/${jdkname}
-fi
-
-echo "done"
diff --git a/dist/build_appbundle8_jre.sh b/dist/build_appbundle8_jre.sh
deleted file mode 100755 (executable)
index 6f44a5b..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-# -*- Coding: utf-8 -*-
-
-# システム内のJAVA_HOMEの取得
-export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)
-echo "JAVA_HOME=${JAVA_HOME}"
-
-# info.plistの編集コマンド
-PlistBuddy=/usr/libexec/PlistBuddy
-
-#################
-# 作業ディレクトリ
-export TARGETDIR="withJRE"
-
-# コピー元ディレクトリ
-export EXPORTDIRSRC="java8mac"
-
-# JRE同梱版生成先ディレクトリ
-export EXPORTDIR="java8macWithJRE"
-
-#################
-
-if [ ! -d $EXPORTDIRSRC ]; then
-   echo "not directory $EXPORTDIRSRC" >&2
-   exit 1
-fi
-
-# まるごとコピーする
-echo "copy $EXPORTDIRSRC --> $EXPORTDIR"
-rm -fr "$EXPORTDIR"
-mkdir -p "$EXPORTDIR"
-ditto -v "$EXPORTDIRSRC" "$EXPORTDIR"
-
-# 作業用出力先
-mkdir -pv $TARGETDIR
-
-# appbundlerによるjre付きバンドルの作成
-ant -f build_appbundle8_jre.xml
-
-# 生成したJRE付きのバンドルファイル内からjdk名を取得する
-jdkname=$($PlistBuddy -c "print JVMRuntime" $TARGETDIR/CharacterManaJ.app/Contents/Info.plist)
-echo new: Info.plist.JVMRuntime=$jdkname
-if [ -z "$jdkname" ]; then
-    echo "can't read the new JVMRuntime." >&2
-    exit 1
-fi
-
-# 現行のjdk名を取得する
-oldjdkname=$($PlistBuddy -c "print JVMRuntime" $EXPORTDIR/CharacterManaJ.app/Contents/Info.plist)
-echo old: Info.plist.JVMRuntime=$oldjdkname
-
-if [ "$oldjdkname" = "$jdkname" ]; then
-    # 同じjdkバージョンならなにもしない
-    echo "*already same jdk"
-else
-    if [ ! -z "$oldjdkname" ]; then
-    echo "**updating jdk"
-    # 既存のjdkを消す
-       rm -fr $EXPORTDIR/CharacterManaJ.app/Contents/PlugIns/$oldjdkname
-    fi
-
-    # 新しいjdk名に書き換える
-    if [ -z "$oldjdkname" ]; then
-       $PlistBuddy -c "add :JVMRuntime string $jdkname" $EXPORTDIR/CharacterManaJ.app/Contents/Info.plist
-    else
-       $PlistBuddy -c "set :JVMRuntime $jdkname" $EXPORTDIR/CharacterManaJ.app/Contents/Info.plist
-    fi;
-
-    # 新しいjdkをコピーする
-    echo "copy $TARGETDIR/CharacterManaJ.app/Contents/PlugIns/$jdkname --> $EXPORTDIR/CharacterManaJ.app/Contents/PlugIns/"
-    ditto -v $TARGETDIR/CharacterManaJ.app/Contents/PlugIns/$jdkname $EXPORTDIR/CharacterManaJ.app/Contents/PlugIns/$jdkname
-fi
-
-# 生成完了後は不要なので消す 
-rm -fr $TARGETDIR
-
-echo "done"
diff --git a/dist/build_appbundle8_jre.xml b/dist/build_appbundle8_jre.xml
deleted file mode 100644 (file)
index 97535eb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project name="CharacterManaJ_Java7Mac" default="app-bundle">\r
-<description>CharacterManaJ(For Java7 On OSX)</description>\r
-\r
-       <!-- Import environment variables -->\r
-       <property environment="env"/>\r
-       <property name="env.TARGETDIR" value="withJRE"/>\r
-\r
-       <taskdef name="bundleapp"\r
-               classname="com.oracle.appbundler.AppBundlerTask"\r
-               classpath="../extlib/appbundler-1.0.jar" />\r
-\r
-<!--\r
- Java7 for OSX用のアプリケーションバンドルを作成するためのタスクを実行する.\r
- http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html\r
- ただし、これを実施したあとにinfo.plistの修正やリソースの追加が必要である。\r
--->\r
-<target name="app-bundle">\r
-       <echo message="JAVA_HOME=${env.JAVA_HOME}"/>\r
-       <echo message="TARGETDIR=${env.TARGETDIR}"/>\r
-       <mkdir dir="${env.TARGETDIR}"/>\r
-       <bundleapp outputdirectory="${env.TARGETDIR}"\r
-               name="CharacterManaJ"\r
-               displayname="キャラクターなんとかJ"\r
-               shortversion="1.0"\r
-               icon="../icon.icns"\r
-               identifier="charactermanaj.Main"\r
-               mainclassname="charactermanaj.Main">\r
-               <runtime dir="${env.JAVA_HOME}"/>\r
-               <classpath file="../CharacterManaJ.jar" />\r
-       </bundleapp>\r
-</target>\r
-\r
-</project>\r
diff --git a/dist/build_dmg.sh b/dist/build_dmg.sh
deleted file mode 100755 (executable)
index fd2a663..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /bin/bash
-# -*- coding: utf-8 -*-
-
-if [ ! -d "java6mac" -o ! -d "java8mac" ]; then
-    echo "java6mac/java8mac folder not found." >&2
-    exit 1
-fi
-
-# バージョン情報
-if [ -z "$VERSION" ]; then
-    VERSION="0.0.0.0"
-fi
-echo "version=($VERSION)"
-
-# 生成するDMG名
-DMG_NAME="CharacterManaJ_${VERSION}"
-echo "DMG_NAME=${DMG_NAME}.dmg"
-
-# 作成に一時使用するDMG名
-WORK_DMG_NAME="${DMG_NAME}_work"
-echo "WORK_DMG_NAME=${WORK_DMG_NAME}.dmg"
-
-# ボリューム名
-VOLUME_NAME="CharacterManaJ Ver${VERSION}"
-
-# 一時DMGの削除
-if [ -f "$TMPDIR/${WORK_DMG_NAME}.dmg" ]; then
-   rm -frv "$TMPDIR/${WORK_DMG_NAME}.dmg"
-fi
-
-# 一時DMGの作成
-hdiutil create -size 50m -fs HFS+ -volname "$VOLUME_NAME" -layout NONE -type UDIF "$TMPDIR/${WORK_DMG_NAME}.dmg"
-
-# 一時DMGのマウント
-hdiutil attach "$TMPDIR/${WORK_DMG_NAME}.dmg"
-
-# マウント先
-DIST_DIR="/Volumes/${VOLUME_NAME}"
-
-# 配布物のコピー
-cp -v README_mac.txt "$DIST_DIR/README.txt"
-cp -v CharacterManaJ.jar "$DIST_DIR/"
-
-# 配布物(java6)のコピー
-echo "copy: java6mac $DIST_DIR/java6mac"
-cp -rp java6mac "$DIST_DIR/java6mac"
-
-# 配布物(java8)のコピー
-echo "copy: java8mac/CharacterManaJ.app $DIST_DIR/"
-cp -rp java8mac/CharacterManaJ.app "$DIST_DIR/"
-
-# 配布先に移動
-pushd "$DIST_DIR"
-
-echo "*create hardlink"
-
-# jarファイルをハードリンクにする
-ln -fv CharacterManaJ.jar java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar 
-
-ln -fv CharacterManaJ.jar CharacterManaJ.app/Contents/Java/CharacterManaJ.jar 
-
-popd
-
-# 一時DMGのデタッチ
-hdiutil detach "$DIST_DIR"
-
-# 配布用DMGの削除
-if [ -f "$TMPDIR/${DMG_NAME}.dmg" ]; then
-    rm -f "$TMPDIR/${DMG_NAME}.dmg"
-fi
-
-# 一時DMGから圧縮単一ファイル型の配布用DMGに変換
-# (convertはHFS+ディスク上で作業する必要がある)
-hdiutil convert "$TMPDIR/${WORK_DMG_NAME}.dmg" -format UDZO -imagekey zlib-level=9 -o "$TMPDIR/${DMG_NAME}.dmg"
-
-# 作業済み一時DMGの削除
-rm -fv "$TMPDIR/${WORK_DMG_NAME}.dmg"
-
-# 配布用DMGのテンポラリからの移動
-mv -fv "$TMPDIR/${DMG_NAME}.dmg" .
-
-echo "done"
diff --git a/dist/build_with_jre_dmg.sh b/dist/build_with_jre_dmg.sh
deleted file mode 100755 (executable)
index c380ae7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/bash
-# -*- coding: utf-8 -*-
-
-if [ ! -d "java8macWithJRE" ]; then
-    echo "java8macWithJREがありません" >&2
-    exit 1
-fi
-
-# バージョン情報
-if [ -z "$VERSION" ]; then
-    VERSION="0.0.0.0"
-fi
-echo "version=($VERSION)"
-
-DMG_NAME="CharacterManaJ_${VERSION}_with_jre"
-echo "DMG_NAME=${DMG_NAME}.dmg"
-
-WORK_DMG_NAME="${DMG_NAME}_with_jre_work"
-echo "WORK_DMG_NAME=${WORK_DMG_NAME}.dmg"
-
-VOLUME_NAME="CharacterManaJ Ver${VERSION}"
-
-if [ -f "$TMPDIR/${WORK_DMG_NAME}.dmg" ]; then
-   rm -frv "$TMPDIR/${WORK_DMG_NAME}.dmg"
-fi
-
-hdiutil create -size 300m -fs HFS+ -volname "$VOLUME_NAME" -layout NONE -type UDIF "$TMPDIR/${WORK_DMG_NAME}.dmg"
-
-hdiutil attach "$TMPDIR/${WORK_DMG_NAME}.dmg"
-
-DIST_DIR="/Volumes/${VOLUME_NAME}"
-
-cp -v README_mac.txt "$DIST_DIR/README.txt"
-
-echo "copy: java8macWithJRE/CharacterManaJ.app $DIST_DIR/"
-ditto java8macWithJRE/CharacterManaJ.app "$DIST_DIR/CharacterManaJ.app"
-
-hdiutil detach "$DIST_DIR"
-
-if [ -f "$TMPDIR/${DMG_NAME}.dmg" ]; then
-    rm -f "$TMPDIR/${DMG_NAME}.dmg"
-fi
-
-hdiutil convert "$TMPDIR/${WORK_DMG_NAME}.dmg" -format UDZO -imagekey zlib-level=9 -o "$TMPDIR/${DMG_NAME}.dmg"
-
-rm -fv "$TMPDIR/${WORK_DMG_NAME}.dmg"
-mv -fv "$TMPDIR/${DMG_NAME}.dmg" .
-
-echo "done"
diff --git a/dist/java6mac/CharacterManaJ.app/Contents/Info.plist b/dist/java6mac/CharacterManaJ.app/Contents/Info.plist
deleted file mode 100644 (file)
index e681160..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?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>CFBundleName</key>
-       <string>CharacterManaJ</string>
-       <key>CFBundleDisplayName</key>
-       <string>CharacterManaJ</string>
-       <key>CFBundleIdentifier</key>
-       <string>charactermanaj.Main</string>
-       <key>CFBundleVersion</key>
-       <string>1.0</string>
-       <key>CFBundleAllowMixedLocalizations</key>
-       <string>true</string>
-       <key>CFBundleExecutable</key>
-       <string>JavaApplicationStub</string>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>Japan</string>
-       <key>CFBundlePackageType</key>
-       <string>APPL</string>
-       <key>CFBundleShortVersionString</key>
-       <string>1.0</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleIconFile</key>
-       <string>icon.icns</string>
-       <key>Java</key>
-       <dict>
-               <key>Properties</key>
-               <dict>
-                       <key>appbase.dir</key>
-                       <string>$APP_PACKAGE/../</string>
-               </dict>
-               <key>VMOptions</key>
-               <array>
-                       <string>-Xmx128m</string>
-                       <string>-Xms96m</string>
-               </array>
-               <key>MainClass</key>
-               <string>charactermanaj.Main</string>
-               <key>JVMVersion</key>
-               <string>1.5+</string>
-               <key>ClassPath</key>
-               <string>$JAVAROOT/CharacterManaJ.jar</string>
-               <key>SplashFile</key>
-               <string>$APP_PACKAGE/Contents/Resources/splash.png</string>
-       </dict>
-</dict>
-</plist>
diff --git a/dist/java6mac/CharacterManaJ.app/Contents/MacOS/JavaApplicationStub b/dist/java6mac/CharacterManaJ.app/Contents/MacOS/JavaApplicationStub
deleted file mode 100755 (executable)
index 184a281..0000000
Binary files a/dist/java6mac/CharacterManaJ.app/Contents/MacOS/JavaApplicationStub and /dev/null differ
diff --git a/dist/java6mac/CharacterManaJ.app/Contents/PkgInfo b/dist/java6mac/CharacterManaJ.app/Contents/PkgInfo
deleted file mode 100644 (file)
index bd04210..0000000
+++ /dev/null
@@ -1 +0,0 @@
-APPL????
\ No newline at end of file
diff --git a/dist/java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar b/dist/java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar
deleted file mode 100755 (executable)
index 2ab6f3c..0000000
Binary files a/dist/java6mac/CharacterManaJ.app/Contents/Resources/Java/CharacterManaJ.jar and /dev/null differ
diff --git a/dist/java6mac/CharacterManaJ.app/Contents/Resources/icon.icns b/dist/java6mac/CharacterManaJ.app/Contents/Resources/icon.icns
deleted file mode 100755 (executable)
index 954054d..0000000
Binary files a/dist/java6mac/CharacterManaJ.app/Contents/Resources/icon.icns and /dev/null differ
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Info.plist b/dist/java8mac/CharacterManaJ.app/Contents/Info.plist
deleted file mode 100644 (file)
index e2bf1f4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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>ja_JP</string>
-       <key>CFBundleDisplayName</key>
-       <string>CharacterManaJ</string>
-       <key>CFBundleExecutable</key>
-       <string>JavaAppLauncher</string>
-       <key>CFBundleIconFile</key>
-       <string>icon.icns</string>
-       <key>CFBundleIdentifier</key>
-       <string>charactermanaj.CharacterManaJ</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleName</key>
-       <string>CharacterManaJ</string>
-       <key>CFBundlePackageType</key>
-       <string>APPL</string>
-       <key>CFBundleShortVersionString</key>
-       <string>1.0</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>1</string>
-       <key>JVMArguments</key>
-       <array/>
-       <key>JVMMainClassName</key>
-       <string>charactermanaj.CharacterManaJ</string>
-       <key>JVMOptions</key>
-       <array>
-               <string>-splash:$APP_ROOT/Contents/Resources/splash.png</string>
-               <string>-Xms96m</string>
-               <string>-Xmx128m</string>
-       </array>
-       <key>LSApplicationCategoryType</key>
-       <string>public.app-category.graphics-design</string>
-       <key>LSEnvironment</key>
-       <dict>
-               <key>LC_CTYPE</key>
-               <string>UTF-8</string>
-       </dict>
-       <key>NSHumanReadableCopyright</key>
-       <string>seraphyware</string>
-</dict>
-</plist>
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Java/CharacterManaJ.jar b/dist/java8mac/CharacterManaJ.app/Contents/Java/CharacterManaJ.jar
deleted file mode 100644 (file)
index 2ab6f3c..0000000
Binary files a/dist/java8mac/CharacterManaJ.app/Contents/Java/CharacterManaJ.jar and /dev/null differ
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/MacOS/JavaAppLauncher b/dist/java8mac/CharacterManaJ.app/Contents/MacOS/JavaAppLauncher
deleted file mode 100755 (executable)
index 7bddebe..0000000
Binary files a/dist/java8mac/CharacterManaJ.app/Contents/MacOS/JavaAppLauncher and /dev/null differ
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/PkgInfo b/dist/java8mac/CharacterManaJ.app/Contents/PkgInfo
deleted file mode 100644 (file)
index bd04210..0000000
+++ /dev/null
@@ -1 +0,0 @@
-APPL????
\ No newline at end of file
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/PlugIns/.gitignore b/dist/java8mac/CharacterManaJ.app/Contents/PlugIns/.gitignore
deleted file mode 100644 (file)
index af52f14..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/jdk1.7.0_60.jdk\r
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Resources/en.lproj/InfoPlist.strings b/dist/java8mac/CharacterManaJ.app/Contents/Resources/en.lproj/InfoPlist.strings
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Resources/icon.icns b/dist/java8mac/CharacterManaJ.app/Contents/Resources/icon.icns
deleted file mode 100755 (executable)
index 954054d..0000000
Binary files a/dist/java8mac/CharacterManaJ.app/Contents/Resources/icon.icns and /dev/null differ
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Resources/ja.lproj/InfoPlist.strings b/dist/java8mac/CharacterManaJ.app/Contents/Resources/ja.lproj/InfoPlist.strings
deleted file mode 100755 (executable)
index 53d07a8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CFBundleName = "キャラクターなんとかJ";
-CFBundleDisplayName = "キャラクターなんとかJ";
diff --git a/dist/java8mac/CharacterManaJ.app/Contents/Resources/splash.png b/dist/java8mac/CharacterManaJ.app/Contents/Resources/splash.png
deleted file mode 100755 (executable)
index 05dbb9b..0000000
Binary files a/dist/java8mac/CharacterManaJ.app/Contents/Resources/splash.png and /dev/null differ
diff --git a/extlib/appbundler-1.0.jar b/extlib/appbundler-1.0.jar
deleted file mode 100644 (file)
index ef30f1c..0000000
Binary files a/extlib/appbundler-1.0.jar and /dev/null differ
diff --git a/pom.xml b/pom.xml
index 5c6fae6..76f4752 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -9,9 +9,7 @@
        <url>https://osdn.net/projects/charactermanaj/</url>\r
 \r
        <properties>\r
-               <appname>CharacterManaJ</appname>\r
-               <exename>${appname}.exe</exename>\r
-               <email>seraphy@users.osdn.me</email>\r
+               <buildBy>seraphy@users.osdn.me</buildBy>\r
                <mainClass>charactermanaj.CharacterManaJ</mainClass>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <maven.compiler.source>1.5</maven.compiler.source>\r
@@ -91,9 +89,9 @@
                                                <manifestEntries>\r
                                                        <!-- 起動時のスプラッシュ画像 -->\r
                                                        <SplashScreen-Image>splash.png</SplashScreen-Image>\r
-                                                       <Built-By>${email}</Built-By>\r
+                                                       <Built-By>${buildBy}</Built-By>\r
                                                        <Build-At>${maven.build.timestamp}</Build-At>\r
-                                                       <Implementation-Vendor><![CDATA[Copyright (C) 2010 ${email}]]></Implementation-Vendor>\r
+                                                       <Implementation-Vendor><![CDATA[Copyright (C) ${maven.build.timestamp} ${buildBy}]]></Implementation-Vendor>\r
                                                </manifestEntries>\r
                                        </archive>\r
                                </configuration>\r
                                                                </goals>\r
                                                                <configuration>\r
                                                                        <headerType>gui</headerType>\r
-                                                                       <outfile>target/${exename}</outfile>\r
+                                                                       <outfile>target/${project.artifactId}.exe</outfile>\r
                                                                        <jar>target/${project.artifactId}.jar</jar>\r
                                                                        <errTitle>Failed to execute the ${project.artifactId}</errTitle>\r
                                                                        <icon>icon.ico</icon>\r
                                                                        <versionInfo>\r
                                                                                <fileVersion>${project.version}</fileVersion>\r
                                                                                <txtFileVersion>${project.version}</txtFileVersion>\r
-                                                                               <fileDescription>${appname}</fileDescription>\r
-                                                                               <copyright>${maven.build.timestamp} ${email}</copyright>\r
+                                                                               <fileDescription>${project.artifactId}</fileDescription>\r
+                                                                               <copyright>${maven.build.timestamp} ${buildBy}</copyright>\r
                                                                                <productVersion>${project.version}</productVersion>\r
                                                                                <txtProductVersion>${project.version}</txtProductVersion>\r
-                                                                               <productName>${appname}</productName>\r
-                                                                               <internalName>${appname}</internalName>\r
-                                                                               <originalFilename>${exename}</originalFilename>\r
+                                                                               <productName>${project.artifactId}</productName>\r
+                                                                               <internalName>${project.artifactId}</internalName>\r
+                                                                               <originalFilename>${project.artifactId}.exe</originalFilename>\r
                                                                        </versionInfo>\r
                                                                </configuration>\r
                                                        </execution>\r
                                                                        <goal>single</goal>\r
                                                                </goals>\r
                                                                <configuration>\r
-                                                                       <finalName>${appname}_${project.version}_with_JRE.zip</finalName>\r
+                                                                       <finalName>${project.artifactId}_${project.version}_with_JRE.zip</finalName>\r
                                                                        <appendAssemblyId>false</appendAssemblyId>\r
                                                                        <descriptors>\r
                                                                                <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>\r
                                                                        <goal>single</goal>\r
                                                                </goals>\r
                                                                <configuration>\r
-                                                                       <finalName>${appname}_${project.version}.zip</finalName>\r
+                                                                       <finalName>${project.artifactId}_${project.version}.zip</finalName>\r
                                                                        <appendAssemblyId>false</appendAssemblyId>\r
                                                                        <descriptors>\r
                                                                                <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>\r
                                        <family>mac</family>\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
                        <build>\r
                                <plugins>\r
                                        <plugin>\r
-                                               <!-- 生成されたjarをdistフォルダにコピーする-->\r
-                                               <artifactId>maven-resources-plugin</artifactId>\r
-                                               <version>2.7</version>\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
                                                <executions>\r
                                                        <execution>\r
-                                                               <id>copy-jar</id>\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>copy-resources</goal>\r
+                                                                       <goal>bundle</goal>\r
                                                                </goals>\r
-                                                               <configuration>\r
-                                                                       <outputDirectory>${basedir}/dist</outputDirectory>\r
-                                                                       <resources>\r
-                                                                               <resource>\r
-                                                                                       <directory>${basedir}/target</directory>\r
-                                                                                       <includes>\r
-                                                                                               <include>${project.artifactId}.jar</include>\r
-                                                                                       </includes>\r
-                                                                                       <filtering>false</filtering>\r
-                                                                               </resource>\r
-                                                                               <resource>\r
-                                                                                       <directory>src/main/attachment</directory>\r
-                                                                                       <includes>\r
-                                                                                               <include>charactermanaj.l4j.ini</include>\r
-                                                                                               <include>README_mac.txt</include>\r
-                                                                                       </includes>\r
-                                                                                       <filtering>false</filtering>\r
-                                                                               </resource>\r
-                                                                       </resources>\r
-                                                               </configuration>\r
                                                        </execution>\r
-                                               </executions>\r
-                                       </plugin>\r
-                                       <plugin>\r
-                                               <!-- 配布用dmg作成のためのシェルの呼び出し -->\r
-                                               <groupId>org.codehaus.mojo</groupId>\r
-                                               <artifactId>exec-maven-plugin</artifactId>\r
-                                               <version>1.6.0</version>\r
-                                               <executions>\r
                                                        <execution>\r
-                                                               <id>make-dmg</id>\r
+                                                               <id>MakeDMGWithJRE</id>\r
+                                                               <configuration>\r
+                                                                       <jrePath>${copyJrePath}</jrePath>\r
+                                                                       <diskImageFile>${project.build.directory}/${project.artifactId}_${project.version}_with_JRE.dmg</diskImageFile>\r
+                                                               </configuration>\r
                                                                <phase>package</phase>\r
                                                                <goals>\r
-                                                                       <goal>exec</goal>\r
+                                                                       <goal>bundle</goal>\r
                                                                </goals>\r
-                                                               <configuration>\r
-                                                                       <executable>sh</executable>\r
-                                                                       <workingDirectory>${basedir}/dist</workingDirectory>\r
-                                                                       <commandlineArgs>-c 'export VERSION="${project.version}";chmod +x *.sh;./build_all.sh'</commandlineArgs>\r
-                                                               </configuration>\r
                                                        </execution>\r
                                                </executions>\r
                                        </plugin>\r