Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 8e3b2dc

Browse files
authored
Release version 3.0.2 (#64)
2 parents 67d52f9 + a58b554 commit 8e3b2dc

6 files changed

+45
-26
lines changed

.github/issue_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ I'm submitting a…
2424

2525
**Do you have screenshots, GIFs, demos or samples which demonstrate the problem or enhancement?**
2626

27-
![image description](url)
27+
2828

2929
**What is the motivation / use case for changing the behavior?**
3030

3131

3232

3333
**Please tell us about your environment:**
3434

35+
- universalJavaApplicationStub version:
3536
- Mac OS version:
3637
- Java version(s):
3738

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
(Add x between brackets to check.)
44

5+
- [ ] I’ve updated my fork from the `develop` branch before proposing this pull request
56
- [ ] I’m making this pull request against the `develop` branch
6-
- [ ] I’ve updated from the `develop` branch before proposing this pull request
77
- [ ] I’ve tested the changes for bug fixes and/or features
88
- [ ] I’ve documented new code
99

.travis.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ language: generic
44
# https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
55
matrix:
66
include:
7-
# OS X 10.10
8-
- os: osx
9-
osx_image: xcode6.4
107
# OS X 10.11
118
- os: osx
129
osx_image: xcode8
@@ -15,14 +12,31 @@ matrix:
1512
osx_image: xcode9
1613
# OS X 10.13
1714
- os: osx
18-
osx_image: xcode9.3beta
15+
osx_image: xcode9.3
16+
17+
18+
# Homebrew needs ruby 2.3 and should be updated everytime to use the latest
19+
# version of shellcheck
20+
before_install:
21+
- rvm install 2.3.0
22+
- brew update
23+
24+
install:
25+
- brew install shellcheck
26+
27+
before_script:
28+
- sw_vers
29+
- shellcheck -V
1930

2031

2132
# run the 'java-version-tester' script and show&save (`tee`) the output to a
2233
# logfile; then grep the logfile for 'FAILED' entries which would cause grep
2334
# to exit with 0; then run 'test' command and swap the grep exit code
2435
# to return with 0 if grep doesn't match and return with 1 if it matches
2536
script:
26-
- sw_vers
2737
- bash test/java-version-tester.sh | tee test/java-version-tester.log
2838
- cat test/java-version-tester.log | grep FAILED ; test $? -eq 1
39+
# test with shellcheck for bash syntax errors which should fail the build
40+
# grep for errors until shellcheck issue / feature request
41+
# https://github.com/koalaman/shellcheck/issues/524 is implemented
42+
- shellcheck -s bash -f gcc src/universalJavaApplicationStub | grep "error:" ; test $? -eq 1

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
ChangeLog
22
---------
33

4+
### v3.0.2 (2018-04-12)
5+
* Bugfix: fix typo in JVMOptions expansion on java exec call (PR #63, Thanks to @michaelweiser for his contribution)
6+
* Added a basic Travis CI build pipeline running a `shellcheck` test for errors and executing the basic testsuite
7+
48
### v3.0.1 (2018-03-10)
59
* Bugfix: remove build number from JVM version number when creating comparable version number or extracting major version (fixes #61)
610

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
universalJavaApplicationStub
22
============================
33

4-
[![Current release](https://img.shields.io/github/release/tofi86/universalJavaApplicationStub.svg)](https://github.com/tofi86/universalJavaApplicationStub/releases) [![Join the chat at https://gitter.im/tofi86/universalJavaApplicationStub](https://badges.gitter.im/tofi86/universalJavaApplicationStub.svg)](https://gitter.im/tofi86/universalJavaApplicationStub?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
[![Build Status](https://travis-ci.org/tofi86/universalJavaApplicationStub.svg?branch=master)](https://travis-ci.org/tofi86/universalJavaApplicationStub) [![Current release](https://img.shields.io/github/release/tofi86/universalJavaApplicationStub.svg)](https://github.com/tofi86/universalJavaApplicationStub/releases) [![Join the chat at https://gitter.im/tofi86/universalJavaApplicationStub](https://badges.gitter.im/tofi86/universalJavaApplicationStub.svg)](https://gitter.im/tofi86/universalJavaApplicationStub?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55

66
A BASH based *JavaApplicationStub* for Java Apps on Mac OS X that works with both Apple's and Oracle's plist format. It is released under the [MIT License](https://github.com/tofi86/universalJavaApplicationStub/blob/master/LICENSE).
77

@@ -43,29 +43,29 @@ How the script works
4343

4444
You don't need a native `JavaApplicationStub` file anymore. The Bash script needs to be executable – that's all.
4545

46-
The script reads JVM properties from `Info.plist` regardless of whether it's Apple or Oracle syntax and feeds them to a commandline `java` call like the following:
46+
The script reads JVM properties from `Info.plist` regardless of whether it's Apple or Oracle syntax and passes them to a `exec java` call like the following simplified:
4747

4848
```Bash
4949
# execute Java and set
5050
# - classpath
5151
# - splash image
5252
# - dock icon
5353
# - app name
54-
# - JVM options
55-
# - JVM default options
54+
# - JVM options / properties (-D)
55+
# - JVM default options (-X)
5656
# - main class
57-
# - main arguments
58-
# - passthru arguments
57+
# - main class arguments
58+
# - passthrough arguments from Terminal or Drag'n'Drop to Finder icon
5959
exec "${JAVACMD}" \
6060
-cp "${JVMClassPath}" \
6161
-splash:"${ResourcesFolder}/${JVMSplashFile}" \
6262
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
6363
-Xdock:name="${CFBundleName}" \
64-
${JVMOptions:+$JVMOptions }\
65-
${JVMDefaultOptions:+$JVMDefaultOptions }\
66-
${JVMMainClass}\
67-
${MainArgs:+ $MainArgs}\
68-
${ArgsPassthru:+ $ArgsPassthru}
64+
${JVMOptions} \
65+
${JVMDefaultOptions} \
66+
${JVMMainClass} \
67+
${MainArgsArr} \
68+
${ArgsPassthru}
6969
```
7070

7171
It sets the classpath, the dock icon, the *AboutMenuName* (as Xdock parameter) and then every *JVMOptions*, *JVMDefaultOptions* or *JVMArguments* found in the `Info.plist` file. See the table below for more supported Plist keys.

src/universalJavaApplicationStub

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# #
1212
# @author Tobias Fischer #
1313
# @url https://github.com/tofi86/universalJavaApplicationStub #
14-
# @date 2018-03-10 #
15-
# @version 3.0.1 #
14+
# @date 2018-04-12 #
15+
# @version 3.0.2 #
1616
# #
1717
##################################################################################
1818
# #
@@ -741,7 +741,7 @@ fi
741741
export CFProcessPath="$0"
742742

743743
# remove Apples ProcessSerialNumber from passthru arguments (#39)
744-
if [[ $@ == -psn* ]] ; then
744+
if [[ "$*" == -psn* ]] ; then
745745
ArgsPassthru=()
746746
else
747747
ArgsPassthru=("$@")
@@ -756,18 +756,18 @@ stub_logger "[WorkingDirectory] ${WorkingDirectory}"
756756
# - splash image
757757
# - dock icon
758758
# - app name
759-
# - JVM options
760-
# - JVM default options
759+
# - JVM options / properties (-D)
760+
# - JVM default options (-X)
761761
# - main class
762-
# - main arguments
763-
# - passthru arguments
762+
# - main class arguments
763+
# - passthrough arguments from Terminal or Drag'n'Drop to Finder icon
764764
stub_logger "[Exec] \"$JAVACMD\" -cp \"${JVMClassPath}\" -splash:\"${ResourcesFolder}/${JVMSplashFile}\" -Xdock:icon=\"${ResourcesFolder}/${CFBundleIconFile}\" -Xdock:name=\"${CFBundleName}\" ${JVMOptionsArr:+$(printf "'%s' " "${JVMOptionsArr[@]}") }${JVMDefaultOptions:+$JVMDefaultOptions }${JVMMainClass}${MainArgsArr:+ $(printf "'%s' " "${MainArgsArr[@]}")}${ArgsPassthru:+ $(printf "'%s' " "${ArgsPassthru[@]}")}"
765765
exec "${JAVACMD}" \
766766
-cp "${JVMClassPath}" \
767767
-splash:"${ResourcesFolder}/${JVMSplashFile}" \
768768
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
769769
-Xdock:name="${CFBundleName}" \
770-
${JVMOptions:+"$JVMOptions[@]}" }\
770+
${JVMOptions:+"${JVMOptions[@]}" }\
771771
${JVMDefaultOptions:+$JVMDefaultOptions }\
772772
"${JVMMainClass}"\
773773
${MainArgsArr:+ "${MainArgsArr[@]}"}\

0 commit comments

Comments
 (0)