OSDN Git Service

windowsのビルド後のzip生成対応
authorseraphy <seraphy@users.osdn.me>
Wed, 14 Feb 2018 02:34:50 +0000 (11:34 +0900)
committerseraphy <seraphy@seraphyware.jp>
Wed, 14 Feb 2018 02:54:06 +0000 (11:54 +0900)
15 files changed:
dist/.gitignore
dist/CharacterManaJ.jar [deleted file]
dist/appConfig.xml [deleted file]
dist/build_zip.xml [deleted file]
dist/charactermanaj.exe [deleted file]
others/preview.png [moved from src/main/resources/preview.png with 100% similarity]
pom.xml
src/main/assembly/charactermanaj_with_jre_zip.xml [new file with mode: 0644]
src/main/assembly/charactermanaj_zip.xml [new file with mode: 0644]
src/main/attachment/README_ja.txt [moved from dist/README_ja.txt with 100% similarity]
src/main/attachment/README_ja_withJRE.txt [moved from dist/README_ja_withJRE.txt with 100% similarity]
src/main/attachment/README_mac.txt [moved from dist/README_mac.txt with 100% similarity]
src/main/attachment/charactermanaj.l4j.ini [moved from dist/charactermanaj.l4j.ini with 100% similarity]
src/main/resources/charactermanaj.l4j.ini [deleted file]
src/main/resources/version.properties [deleted file]

index 9bbd20d..5b091dd 100644 (file)
@@ -2,8 +2,11 @@
 /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/CharacterManaJ.jar b/dist/CharacterManaJ.jar
deleted file mode 100644 (file)
index 2ab6f3c..0000000
Binary files a/dist/CharacterManaJ.jar and /dev/null differ
diff --git a/dist/appConfig.xml b/dist/appConfig.xml
deleted file mode 100644 (file)
index e98ba26..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">\r
-<properties version="1.0">\r
-       <entry key="dirWatchInterval">7000</entry>\r
-       <entry key="selectedItemBgColor">#ffc800</entry>\r
-       <entry key="noRemoveLog">false</entry>\r
-       <entry key="exportPresetWarningsForegroundColor">#ff0000</entry>\r
-       <entry key="checkedItemBgColor">#ffff</entry>\r
-       <entry key="compressionQuality">0.8</entry>\r
-       <entry key="commonCharacterDataDir"></entry>\r
-       <entry key="informationDialogOpenMethod">true</entry>\r
-       <entry key="gridColor">#808080</entry>\r
-       <entry key="sampleImageBgColor">#ffffff</entry>\r
-       <entry key="defaultImageBgColor">#ffffff</entry>\r
-       <entry key="invalidBgColor">#ff0000</entry>\r
-       <entry key="zipNameEncoding">csWindows31J</entry>\r
-       <entry key="jarTransferBufferSize">4096</entry>\r
-       <entry key="fileTransferBufferSize">4096</entry>\r
-       <entry key="enableDirWatch">true</entry>\r
-       <entry key="enableAutoColorChange">true</entry>\r
-       <entry key="authorEditConflictBgColor">#ffff00</entry>\r
-</properties>\r
diff --git a/dist/build_zip.xml b/dist/build_zip.xml
deleted file mode 100644 (file)
index 4264ca5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project name="makeDistributionArchive" default="makeSmallZip">\r
-       <description>CharacterManaJ</description>\r
-\r
-       <!-- ビルド日時とバージョン、ベンダー -->\r
-       <property file="../resources/version.properties"/>\r
-       <tstamp prefix="build-info">\r
-               <format property="current-date" pattern="yyyy-MM-dd" locale="en" />\r
-               <format property="current-time" pattern="hh:mm:ss a z" locale="en" />\r
-       </tstamp>\r
-\r
-       <!-- 出力するファイル名 -->\r
-       <property name="appName" value="CharacterManaJ_${implements_version}"/>\r
-\r
-       <!-- jreを含まない配布物を作成する -->\r
-       <target name="makeSmallZip" description="JREを含まないシンプルなWindows用のZIPを作成する">\r
-               <delete file="${appName}.zip"/>\r
-               <zip destfile="${appName}.zip" level="9">\r
-                       <fileset dir=".">\r
-                               <include name="README_ja.txt"/>\r
-                               <include name="appConfig.xml"/>\r
-                               <include name="charactermanaj.exe"/>\r
-                               <include name="charactermanaj.l4j.ini"/>\r
-                       </fileset>\r
-               </zip>\r
-       </target>\r
-\r
-       <!-- jreを含む配布物を作成する -->\r
-       <target name="makeWithJREZip" description="JREを含むWindows用のZIPを作成する">\r
-               <delete file="${appName}_with_JRE8.zip"/>\r
-               <zip destfile="${appName}_with_JRE8.zip" level="9">\r
-                       <fileset dir=".">\r
-                               <include name="README_ja_withJRE.txt"/>\r
-                               <include name="appConfig.xml"/>\r
-                               <include name="charactermanaj.exe"/>\r
-                               <include name="charactermanaj.l4j.ini"/>\r
-                               <include name="jre/**"/>\r
-                       </fileset>\r
-               </zip>\r
-       </target>\r
-\r
-</project>\r
diff --git a/dist/charactermanaj.exe b/dist/charactermanaj.exe
deleted file mode 100644 (file)
index 2043d19..0000000
Binary files a/dist/charactermanaj.exe and /dev/null differ
diff --git a/pom.xml b/pom.xml
index 18bcb6e..3d58b1d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,17 +4,20 @@
 \r
        <groupId>jp.seraphyware.charactermanaj</groupId>\r
        <artifactId>CharacterManaJ</artifactId>\r
-       <version>1.0</version>\r
+       <version>0.9.9.8</version>\r
 \r
        <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
                <mainClass>charactermanaj.CharacterManaJ</mainClass>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <maven.compiler.source>1.5</maven.compiler.source>\r
                <maven.compiler.target>1.5</maven.compiler.target>\r
+               <animalSnifferArtifact>java15</animalSnifferArtifact>\r
+               <animalSnifferArtifactVersion>1.0</animalSnifferArtifactVersion>\r
                <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>\r
        </properties>\r
 \r
@@ -26,6 +29,7 @@
                        <version>1.4</version>\r
                        <scope>provided</scope>\r
                </dependency>\r
+\r
                <!-- テスト -->\r
                <dependency>\r
                        <groupId>junit</groupId>\r
                        <version>4.11</version>\r
                        <scope>test</scope>\r
                </dependency>\r
-               <!-- テストモック https://mvnrepository.com/artifact/org.mockito/mockito-all -->\r
-               <dependency>\r
-                       <groupId>org.mockito</groupId>\r
-                       <artifactId>mockito-all</artifactId>\r
-                       <version>1.10.19</version>\r
-                       <scope>test</scope>\r
-               </dependency>\r
        </dependencies>\r
 \r
        <build>\r
                <plugins>\r
-                       <!-- プロパティの参照 -->\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>properties-maven-plugin</artifactId>\r
-                               <version>1.0.0</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <phase>initialize</phase>\r
-                                               <goals>\r
-                                                       <goal>read-project-properties</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <files>\r
-                                                               <file>src/main/resources/version.properties</file>\r
-                                                       </files>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
                        <plugin>\r
                                <!-- コンパイラープラグイン -->\r
                                <groupId>org.apache.maven.plugins</groupId>\r
@@ -83,9 +61,6 @@
                                        <finalName>${project.artifactId}</finalName>\r
                                        <archive>\r
                                                <manifest>\r
-                                                       <!-- 依存ライブラリ/lib/*.jarをクラスパスに追加する -->\r
-                                                       <addClasspath>true</addClasspath>\r
-                                                       <classpathPrefix>lib/</classpathPrefix>\r
                                                        <mainClass>${mainClass}</mainClass>\r
                                                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>\r
                                                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>\r
                                                <manifestEntries>\r
                                                        <!-- 起動時のスプラッシュ画像 -->\r
                                                        <SplashScreen-Image>splash.png</SplashScreen-Image>\r
-                                                       <Built-By>${vendor}</Built-By>\r
+                                                       <Built-By>${email}</Built-By>\r
                                                        <Build-At>${maven.build.timestamp}</Build-At>\r
-                                                       <Implementation-Vendor><![CDATA[Copyright (C) 2010 ${vendor}]]></Implementation-Vendor>\r
+                                                       <Implementation-Vendor><![CDATA[Copyright (C) 2010 ${email}]]></Implementation-Vendor>\r
                                                </manifestEntries>\r
                                        </archive>\r
                                </configuration>\r
                        </plugin>\r
-                       <plugin>\r
-                               <!-- 依存ライブラリをターゲットのlibフォルダ下にコピーする(package時) -->\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-dependency-plugin</artifactId>\r
-                               <version>2.10</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>copyLibs</id>\r
-                                               <phase>package</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-dependencies</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>\r
-                                                               ${project.build.directory}/lib\r
-                                                       </outputDirectory>\r
-                                                       <includeScope>runtime</includeScope>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-\r
-                       <plugin>\r
-                               <!-- リソースコピープラグイン -->\r
-                               <artifactId>maven-resources-plugin</artifactId>\r
-                               <version>2.7</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>copy-resources</id>\r
-                                               <phase>validate</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/target/conf</outputDirectory>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>conf</directory>\r
-                                                                       <filtering>false</filtering>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                                               <id>copy-ini-resources</id>\r
-                                               <phase>package</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/target</outputDirectory>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>src/main/resources</directory>\r
-                                                                       <includes>\r
-                                                                               <include>*.l4j.ini</include>\r
-                                                                       </includes>\r
-                                                                       <filtering>false</filtering>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <!-- 生成したexe, jar, iniをdistフォルダにコピーする -->\r
-                               <artifactId>maven-resources-plugin</artifactId>\r
-                               <version>2.7</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>copy-resources</id>\r
-                                               <phase>package</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/dist</outputDirectory>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>${basedir}/target</directory>\r
-                                                                       <includes>\r
-                                                                               <include>*.exe</include>\r
-                                                                               <include>*.jar</include>\r
-                                                                               <include>*.ini</include>\r
-                                                                       </includes>\r
-                                                                       <filtering>false</filtering>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
                </plugins>\r
        </build>\r
 \r
                                        <family>windows</family>\r
                                </os>\r
                        </activation>\r
+                       <properties>\r
+                               <jre.dir>${java.home}</jre.dir>\r
+                       </properties>\r
                        <build>\r
                                <plugins>\r
                                        <plugin>\r
                                                                                <maxHeapSize>128</maxHeapSize>\r
                                                                        </jre>\r
                                                                        <versionInfo>\r
-                                                                               <fileVersion>${exe_file_version}</fileVersion>\r
-                                                                               <txtFileVersion>${implements_version}</txtFileVersion>\r
+                                                                               <fileVersion>${project.version}</fileVersion>\r
+                                                                               <txtFileVersion>${project.version}</txtFileVersion>\r
                                                                                <fileDescription>${appname}</fileDescription>\r
-                                                                               <copyright>${vendor}</copyright>\r
-                                                                               <productVersion>${exe_file_version}</productVersion>\r
-                                                                               <txtProductVersion>${exe_file_version}</txtProductVersion>\r
+                                                                               <copyright>${maven.build.timestamp} ${email}</copyright>\r
+                                                                               <productVersion>${project.version}</productVersion>\r
+                                                                               <txtProductVersion>${project.version}</txtProductVersion>\r
                                                                                <productName>${appname}</productName>\r
                                                                                <internalName>${appname}</internalName>\r
                                                                                <originalFilename>${exename}</originalFilename>\r
                                                        </execution>\r
                                                </executions>\r
                                        </plugin>\r
+                                       <plugin>\r
+                                               <groupId>org.apache.maven.plugins</groupId>\r
+                                               <artifactId>maven-assembly-plugin</artifactId>\r
+                                               <version>2.6</version>\r
+                                               <executions>\r
+                                                       <execution>\r
+                                                               <!-- JREつきの配布用zipを生成する -->\r
+                                                               <id>create-distribution-with-jre</id>\r
+                                                               <phase>package</phase>\r
+                                                               <goals>\r
+                                                                       <goal>single</goal>\r
+                                                               </goals>\r
+                                                               <configuration>\r
+                                                                       <finalName>${appname}_${project.version}_with_JRE.zip</finalName>\r
+                                                                       <appendAssemblyId>false</appendAssemblyId>\r
+                                                                       <descriptors>\r
+                                                                               <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>\r
+                                                                       </descriptors>\r
+                                                               </configuration>\r
+                                                       </execution>\r
+                                                       <execution>\r
+                                                               <!-- JRE無しの配布用zipを生成する -->\r
+                                                               <id>create-distribution</id>\r
+                                                               <phase>package</phase>\r
+                                                               <goals>\r
+                                                                       <goal>single</goal>\r
+                                                               </goals>\r
+                                                               <configuration>\r
+                                                                       <finalName>${appname}_${project.version}.zip</finalName>\r
+                                                                       <appendAssemblyId>false</appendAssemblyId>\r
+                                                                       <descriptors>\r
+                                                                               <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>\r
+                                                                       </descriptors>\r
+                                                               </configuration>\r
+                                                       </execution>\r
+                                               </executions>\r
+                                       </plugin>\r
                                </plugins>\r
                        </build>\r
                </profile>\r
 \r
                <profile>\r
+                       <!-- MAC OSXの場合のビルド -->\r
                        <id>osx-profile</id>\r
                        <activation>\r
                                <os>\r
                        <build>\r
                                <plugins>\r
                                        <plugin>\r
+                                               <!-- 生成されたjarをdistフォルダにコピーする-->\r
+                                               <artifactId>maven-resources-plugin</artifactId>\r
+                                               <version>2.7</version>\r
+                                               <executions>\r
+                                                       <execution>\r
+                                                               <id>copy-jar</id>\r
+                                                               <phase>package</phase>\r
+                                                               <goals>\r
+                                                                       <goal>copy-resources</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>Version Calculation</id>\r
+                                                               <id>make-dmg</id>\r
                                                                <phase>package</phase>\r
                                                                <goals>\r
                                                                        <goal>exec</goal>\r
diff --git a/src/main/assembly/charactermanaj_with_jre_zip.xml b/src/main/assembly/charactermanaj_with_jre_zip.xml
new file mode 100644 (file)
index 0000000..3f66dc6
--- /dev/null
@@ -0,0 +1,37 @@
+<assembly>\r
+       <id>charactermanaj_with_jre_zip</id>\r
+       <formats>\r
+               <format>zip</format>\r
+       </formats>\r
+       <includeBaseDirectory>false</includeBaseDirectory>\r
+\r
+       <fileSets>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/target</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>*.exe</include>\r
+                               <include>*.jar</include>\r
+                       </includes>\r
+               </fileSet>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/src/main/resources</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>appConfig.xml</include>\r
+                       </includes>\r
+               </fileSet>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/src/main/attachment</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>charactermanaj.l4j.ini</include>\r
+                               <include>README_ja_withJRE.txt</include>\r
+                       </includes>\r
+               </fileSet>\r
+               <fileSet>\r
+                       <directory>${jre.dir}</directory>\r
+                       <outputDirectory>jre</outputDirectory>\r
+               </fileSet>\r
+       </fileSets>\r
+</assembly>\r
diff --git a/src/main/assembly/charactermanaj_zip.xml b/src/main/assembly/charactermanaj_zip.xml
new file mode 100644 (file)
index 0000000..6dfe370
--- /dev/null
@@ -0,0 +1,33 @@
+<assembly>\r
+       <id>charactermanaj_zip</id>\r
+       <formats>\r
+               <format>zip</format>\r
+       </formats>\r
+       <includeBaseDirectory>false</includeBaseDirectory>\r
+\r
+       <fileSets>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/target</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>*.exe</include>\r
+                               <include>*.jar</include>\r
+                       </includes>\r
+               </fileSet>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/src/main/resources</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>appConfig.xml</include>\r
+                       </includes>\r
+               </fileSet>\r
+               <fileSet>\r
+                       <directory>${project.basedir}/src/main/attachment</directory>\r
+                       <outputDirectory>.</outputDirectory>\r
+                       <includes>\r
+                               <include>charactermanaj.l4j.ini</include>\r
+                               <include>README_ja.txt</include>\r
+                       </includes>\r
+               </fileSet>\r
+       </fileSets>\r
+</assembly>\r
diff --git a/src/main/resources/charactermanaj.l4j.ini b/src/main/resources/charactermanaj.l4j.ini
deleted file mode 100644 (file)
index bcbb63f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
--Xms64m\r
--Xmx128m\r
-"-DcharactersDir=%EXEDIR%\characters"\r
-"-DappConfigFile=%EXEDIR%\appConfig.xml"\r
diff --git a/src/main/resources/version.properties b/src/main/resources/version.properties
deleted file mode 100644 (file)
index a62f113..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-vendor=seraphy@seraphyware.jp\r
-specification_version=1.0\r
-implements_version=0.998\r
-exe_file_version=0.9.9.8\r