diff --git a/.gitignore b/.gitignore index 3177ec2d..c46888cc 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ /build history.txt -/target/ +target/ diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 29abf999..dc1b4149 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -3,4 +3,3 @@ encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 encoding//src/test/java=UTF-8 encoding//src/test/resources=UTF-8 -encoding/=UTF-8 diff --git a/.travis.yml b/.travis.yml index 247b7956..1a19a1cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,17 +10,19 @@ install: - mvn clean - mvn package -DskipTests=true before_deploy: -- bash scripts/create-windows-icon.sh -- bash scripts/create-mac-icon.sh -- mvn install -DskipTests=true -- bash scripts/rename-jar-file.sh -- export filename=$(bash scripts/get-amidst-filename.sh) +- bash travis-ci/scripts/create-mac-icon.sh +- bash travis-ci/scripts/create-windows-icon.sh +#- mvn package -DskipTests=true -f travis-ci/mac-wrapper/pom.xml +- mvn package -DskipTests=true -f travis-ci/windows-wrapper/pom.xml +- bash travis-ci/scripts/rename-jar-file.sh +- export filename=$(bash travis-ci/scripts/get-amidst-filename.sh) deploy: provider: releases api-key: secure: QMXa1QpW+mlTLlxCbKOAWIRUi2cR+Y2vMQDlwiV8BoUyZchvTBR+stDYuEdxd2fK8/aSRUWEgfUhKMJ4cIZEOOwz/UA/1RQmzumbFLexwTwDXfkTfCcDQFLtzywVoep2P3s1lpheo4f1G3z2sZTCxO5yRnpd/sBtWnaq3j5uifYZB+mv84eH+EsrQL7f+0KjycOPrAdiJ8xh/2twUtGMhaStrnhcH+RCi6qm6D5Dv4mwYM4wRxG3H9i2NceGa6lHIE4bU+kKY9lc3V6EzmTnnShwEcrf+4/ZfCe4A9aU3jzFhKCHKpJ4PlqLEtMeQ08ijaMrF4LaBqwRZ5il5nqKkFdfKOtx7EHqjxrQ1dT7JUXU/3lTfEX/DLbhPa3z5Tl9LgCu9flCS+ltQoPvx7MR1leaQeHNoFCfzWJQ8ytW2CEhnOqx3nr4AIW8q5akJxQB7USfHV5F8kw2T6QmzuniQRZex+15j9SLedaDXZCvno6C0+j59sABpiF9lRVww8jW6BxqklxDcjEtkMxyHiBCG0EgGlKJvVSyGGzDsjb8FweC1KQKBHuG+5UYNE1rJesj6rwfIIrbInjJRTPndb4GpuzzbqbTGxwHd2zqzkQhnxSjCoKIzyhpBzfyCJaqTv/DfimSc95sXH1w1d6zfcO01MkopXYUSlHvr/Rjxh8vE8U= file: - "target/${filename}.jar" +# - "target/${filename}.zip" - "target/${filename}.exe" skip_cleanup: true on: diff --git a/pom.xml b/pom.xml index c104bd19..9135ecd0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,16 +1,14 @@ 4.0.0 - AMIDST - AMIDST + amidst + amidst 0.0.1-SNAPSHOT - UTF-8 yyyy-MM-dd HH:mm - 1.8 - ${amidst.filename} + ${amidst.build.filename} org.codehaus.mojo @@ -67,8 +65,8 @@ maven-compiler-plugin 3.1 - ${jdk.version} - ${jdk.version} + ${amidst.build.jdk.version} + ${amidst.build.jdk.version} @@ -88,7 +86,7 @@ amidst.Amidst - ${amidst.filename} + ${amidst.build.filename} ${maven.build.timestamp} @@ -99,37 +97,6 @@ - - com.akathist.maven.plugins.launch4j - launch4j-maven-plugin - 1.7.8 - - - launch4j - install - - launch4j - - - gui - ${project.build.directory}/${amidst.filename}.exe - ${project.build.directory}/${amidst.filename}-jar-with-dependencies.jar - false - Error in Launcher - - amidst.Amidst - false - - ${project.build.directory}/icon.ico - - ${jdk.version}.0 - 512 - 1024 - - - - - @@ -163,15 +130,8 @@ org.codehaus.mojo properties-maven-plugin 1.0.0 - maven-plugin provided - - - com.akathist.maven.plugins.launch4j - launch4j-maven-plugin - 1.7.8 maven-plugin - provided \ No newline at end of file diff --git a/scripts/get-amidst-filename.sh b/scripts/get-amidst-filename.sh deleted file mode 100644 index fd501464..00000000 --- a/scripts/get-amidst-filename.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -grep amidst.filename src/main/resources/amidst/metadata.properties | cut -d "=" -f 2 diff --git a/scripts/zip-mac-app.sh b/scripts/zip-mac-app.sh deleted file mode 100644 index 6e20ed49..00000000 --- a/scripts/zip-mac-app.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -filename="`source scripts/get-amidst-filename.sh`" -cd "target/${filename}/" -zip -r "${filename}.zip" "AMIDST.app/" -mv "${filename}.zip" ".." - diff --git a/src/main/resources/amidst/metadata.properties b/src/main/resources/amidst/metadata.properties index 5a02e803..e589d534 100644 --- a/src/main/resources/amidst/metadata.properties +++ b/src/main/resources/amidst/metadata.properties @@ -1,4 +1,7 @@ -amidst.filename=AMIDST-v4.0-alpha1 +project.build.sourceEncoding=UTF-8 +amidst.build.filename=AMIDST-v4.0-alpha1 +amidst.build.jdk.version=1.8 + amidst.version.major=4 amidst.version.minor=0 amidst.gui.mainWindow.title=Amidst v4.0-alpha1 diff --git a/scripts/create-mac-icon.sh b/travis-ci/scripts/create-mac-icon.sh similarity index 100% rename from scripts/create-mac-icon.sh rename to travis-ci/scripts/create-mac-icon.sh diff --git a/scripts/create-windows-icon.sh b/travis-ci/scripts/create-windows-icon.sh similarity index 100% rename from scripts/create-windows-icon.sh rename to travis-ci/scripts/create-windows-icon.sh diff --git a/travis-ci/scripts/get-amidst-filename.sh b/travis-ci/scripts/get-amidst-filename.sh new file mode 100644 index 00000000..da97d64b --- /dev/null +++ b/travis-ci/scripts/get-amidst-filename.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +grep amidst.build.filename src/main/resources/amidst/metadata.properties | cut -d "=" -f 2 diff --git a/scripts/rename-jar-file.sh b/travis-ci/scripts/rename-jar-file.sh similarity index 65% rename from scripts/rename-jar-file.sh rename to travis-ci/scripts/rename-jar-file.sh index c1632d5a..42a6d83d 100644 --- a/scripts/rename-jar-file.sh +++ b/travis-ci/scripts/rename-jar-file.sh @@ -1,6 +1,6 @@ #!/bin/bash -filename="`source scripts/get-amidst-filename.sh`" +filename="`source travis-ci/scripts/get-amidst-filename.sh`" rm "target/${filename}.jar" mv "target/${filename}-jar-with-dependencies.jar" "target/${filename}.jar" diff --git a/travis-ci/scripts/zip-mac-app.sh b/travis-ci/scripts/zip-mac-app.sh new file mode 100644 index 00000000..cc3a97ec --- /dev/null +++ b/travis-ci/scripts/zip-mac-app.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +filename="`source travis-ci/scripts/get-amidst-filename.sh`" +cd "travis-ci/wrapper-for-mac/target/${filename}/" +rm "${filename}.zip" +zip -r "${filename}.zip" "AMIDST.app/" +mv "${filename}.zip" "../../../../target/" diff --git a/travis-ci/wrapper-for-mac/pom.xml b/travis-ci/wrapper-for-mac/pom.xml new file mode 100644 index 00000000..41d08175 --- /dev/null +++ b/travis-ci/wrapper-for-mac/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + amidst + mac-wrapper + 0.0.1-SNAPSHOT + + ${amidst.build.filename} + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + ../../src/main/resources/amidst/metadata.properties + + + + + + + sh.tak.appbundler + appbundle-maven-plugin + 1.0.4 + + + package + + bundle + + + amidst.Amidst + ../../target/icon.icns + ${amidst.build.jdk.version}+ + AMIDST + + + + + + + + + sh.tak.appbundler + appbundle-maven-plugin + 1.0.4 + maven-plugin + provided + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + maven-plugin + provided + + + \ No newline at end of file diff --git a/travis-ci/wrapper-for-windows/pom.xml b/travis-ci/wrapper-for-windows/pom.xml new file mode 100644 index 00000000..4b85742b --- /dev/null +++ b/travis-ci/wrapper-for-windows/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + amidst + windows-wrapper + 0.0.1-SNAPSHOT + + ${amidst.build.filename} + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + ../../src/main/resources/amidst/metadata.properties + + + + + + + com.akathist.maven.plugins.launch4j + launch4j-maven-plugin + 1.7.8 + + + launch4j + package + + launch4j + + + gui + ../../target/${amidst.build.filename}.exe + ../../target/${amidst.build.filename}-jar-with-dependencies.jar + false + Error in Launcher + + amidst.Amidst + false + + ../../target/icon.ico + + ${amidst.build.jdk.version}.0 + 512 + 1024 + + + + + + + + + + com.akathist.maven.plugins.launch4j + launch4j-maven-plugin + 1.7.8 + maven-plugin + provided + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + maven-plugin + provided + + + \ No newline at end of file