Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Added optional "useJavaXKey" attribute
Browse files Browse the repository at this point in the history
for universalJavaApplicationStub-Support:
tofi86/universalJavaApplicationStub#9
  • Loading branch information
tofi86 committed May 15, 2015
1 parent f2188fb commit 05d0871
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Modifications
-----

* **version 2.4.0** (2015-05-15)
* Added optional `useJavaXKey` attribute to JarBundler task (for [universalJavaApplicationStub](https://github.com/tofi86/universalJavaApplicationStub)-Support)
* Added optional `hiResCapable` attribute to JarBundler task (for Plist key `NSHighResolutionCapable`)
* removed deprecated `aboutmenuname` attribute
* removed deprecated `infostring` and `shortinfostring` attributes (use `copyright` attribute instead)
Expand Down
26 changes: 19 additions & 7 deletions dox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ <h1>Version 2.4.0</h1>
<h2>What's New, May 2015</h2>
<!-- Released: May 2015 (version 2.4.0) -->
<ul>
<li>Added the optional 'hiResCapable' boolean attribute to JarBundler task.</li>
<li>Removed deprecated `aboutmenuname` attribute</li>
<li>Removed deprecated `infostring` and `shortinfostring` attributes (use `copyright` attribute instead)</li>
<li>Added optional <tt>useJavaXKey</tt> attribute to JarBundler task (for <a href="https://github.com/tofi86/universalJavaApplicationStub">universalJavaApplicationStub</a>-Support)</li>
<li>Added the optional <tt>hiResCapable</tt> boolean attribute to JarBundler task (for Plist key <tt>NSHighResolutionCapable</tt>)</li>
<li>Removed deprecated <tt>aboutmenuname</tt> attribute</li>
<li>Removed deprecated <tt>infostring</tt> and <tt>shortinfostring</tt> attributes (use <tt>copyright</tt> attribute instead)</li>
</ul>


Expand Down Expand Up @@ -404,7 +405,17 @@ <h2>Task Attributes, optional</h2>
</td>
</tr>


<tr>
<td class="attribute">useJavaXKey</td>
<td class="description">If true, the Plist dictionary key for Java options will be named <em>JavaX</em> instead of <em>Java</em>.<br/>
This feature was added for a better support of the alternative JavaApplication Stub "<a href="https://github.com/tofi86/universalJavaApplicationStub">universalJavaApplicationStub</a>"
which aims to support a variety of Java versions and beeing compatible with Apple AND Oracle Java.<br/>However, starting with Mac OS X 10.10, Apple is forcing to download the old Apple JRE 6
for all applications with a <em>Java</em> Plist dictionary key, regardless whether <tt>jvmversion</tt> says e.g. <em>1.6+</em>
<div>
Default: <tt>false</tt>
</div>
</td>
</tr>

<tr>
<td class="attribute">verbose</td>
Expand Down Expand Up @@ -785,9 +796,10 @@ <h2>History</h2>

<h3> Released: May 2015 (version 2.4.0)</h3>
<ul>
<li>Added the optional 'hiResCapable' boolean attribute to JarBundler task.</li>
<li>Removed deprecated `aboutmenuname` attribute</li>
<li>Removed deprecated `infostring` and `shortinfostring` attributes (use `copyright` attribute instead)</li>
<li>Added optional <tt>useJavaXKey</tt> attribute to JarBundler task (for <a href="https://github.com/tofi86/universalJavaApplicationStub">universalJavaApplicationStub</a>-Support)</li>
<li>Added the optional <tt>hiResCapable</tt> boolean attribute to JarBundler task (for Plist key <tt>NSHighResolutionCapable</tt>)</li>
<li>Removed deprecated <tt>aboutmenuname</tt> attribute</li>
<li>Removed deprecated <tt>infostring</tt> and <tt>shortinfostring</tt> attributes (use <tt>copyright</tt> attribute instead)</li>
</ul>

<h3> Released: Apr 2014 (version 2.3.0)</h3>
Expand Down
11 changes: 11 additions & 0 deletions src/net/sourceforge/jarbundler/AppBundleProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public class AppBundleProperties {
// HiRes capability, optional
private boolean mNSHighResolutionCapable = false;

// Support for JavaX key, optional
private boolean mJavaXKey = false;

// Explicit default: JavaApplicationStub
private String mCFBundleExecutable = "JavaApplicationStub";

Expand Down Expand Up @@ -284,6 +287,14 @@ public boolean getNSHighResolutionCapable() {
return mNSHighResolutionCapable;
}

public void setJavaXKey(boolean b) {
mJavaXKey = b;
}

public boolean getJavaXKey() {
return mJavaXKey;
}

public void setCFBundleExecutable(String s) {
mCFBundleExecutable = s;
}
Expand Down
7 changes: 7 additions & 0 deletions src/net/sourceforge/jarbundler/JarBundler.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,13 @@ public void setHiResCapable(boolean b) {
bundleProperties.setNSHighResolutionCapable(b);
}

/** Tobias Fischer, v2.4.0
* Setter for the alternative 'JavaX' dictionary key
*/
public void setUseJavaXKey(boolean b) {
bundleProperties.setJavaXKey(b);
}

/**
* Setter for the "smalltabs" attribute (optional)
*/
Expand Down
4 changes: 2 additions & 2 deletions src/net/sourceforge/jarbundler/PropertyListWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ private void buildDOM() {
if (documentTypes.size() > 0)
writeDocumentTypes(documentTypes, dict);

// Java entry in the plist dictionary
writeKey("Java", dict);
// Java / JavaX entry in the plist dictionary
writeKey(bundleProperties.getJavaXKey() ? "JavaX" : "Java", dict);
Node javaDict = createNode("dict", dict);

// Main class, required
Expand Down

0 comments on commit 05d0871

Please sign in to comment.