Skip to content

Commit a53e3be

Browse files
committed
Import ae version
1 parent e7c973f commit a53e3be

40 files changed

+4568
-264
lines changed

README.md

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,88 @@
1+
appbundler
2+
=============
13

2-
This repository is a clone of "appbundler"
4+
A fork of the [Java Application Bundler](https://svn.java.net/svn/appbundler~svn)
5+
with the following changes:
36

4-
https://java.net/projects/appbundler
7+
- The native binary is created as universal (32/64)
8+
- Fixes [icon not showing bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7159381) in `JavaAppLauncher`
9+
- Adds `LC_CTYPE` environment variable to the `Info.plist` file in order to fix an [issue with `File.exists()` in OpenJDK 7](http://java.net/jira/browse/MACOSX_PORT-165) **(Contributed by Steve Hannah)**
10+
- Allows to specify the name of the executable instead of using the default `"JavaAppLauncher"` **(contributed by Karl von Randow)**
11+
- Adds `classpathref` support to the `bundleapp` task
12+
- Adds support for `JVMArchs` and `LSArchitecturePriority` keys
13+
- Allows to specify a custom value for `CFBundleVersion`
14+
- Allows specifying registered file extensions using `CFBundleDocumentTypes`
15+
- Passes to the Java application a set of environment variables with the paths of
16+
the OSX special folders and whether the application is running in the
17+
sandbox (see below).
18+
- Allows overriding of passed JVM options by the bundled app itself via java.util.Preferences **(contributed by Hendrik Schreiber)**
19+
- Allows running the Application as `privileged` - e.g. for Setup **(Contributed by Gerry Weißbach)**
20+
- Allows specifying a JNLP file (`jnlplaunchername`) as alternative to the `mainclassname` which can then be launched without hassle when the Application is signed. See [How to sign (dynamic) JNLP files for OSX 10.8.4 and Gatekeeper](http://stackoverflow.com/questions/16958130/how-to-sign-dynamic-jnlp-files-for-osx-10-8-4-and-gatekeeper) **(Contributed by Gerry Weißbach)**
521

6-
Arduino is currently using a patched version of appbundler that allows to set
7-
version number and file associations. You can see the patch applied in the "arduino"
8-
branch of this repository.
22+
These are the environment variables passed to the JVM:
923

10-
https://github.com/arduino/appbundler/commits/arduino
24+
- `LibraryDirectory`
25+
- `DocumentsDirectory`
26+
- `CachesDirectory`
27+
- `ApplicationSupportDirectory`
28+
- `SandboxEnabled` (the String `true` or `false`)
1129

12-
The patches were submitted upstream but they are unlike to be merged since appbundler
13-
seems to be phased out in favor of JavaFX.
1430

31+
Example:
32+
33+
<target name="bundle">
34+
<taskdef name="bundleapp"
35+
classpath="appbundler-1.0ea.jar"
36+
classname="com.oracle.appbundler.AppBundlerTask"/>
37+
38+
<bundleapp
39+
classpathref="runclasspathref"
40+
outputdirectory="${dist}"
41+
name="${bundle.name}"
42+
displayname="${bundle.displayname}"
43+
executableName="MyApp"
44+
identifier="com.company.product"
45+
shortversion="${version.public}"
46+
version="${version.internal}"
47+
icon="${bundle.icon}"
48+
mainclassname="Main"
49+
copyright="2012 Your Company"
50+
applicationCategory="public.app-category.finance">
51+
52+
<runtime dir="${runtime}/Contents/Home"/>
53+
54+
<arch name="x86_64"/>
55+
<arch name="i386"/>
56+
57+
<bundledocument extensions="png,jpg"
58+
icon="${bundle.icon}"
59+
name="Images"
60+
role="editor">
61+
</bundledocument>
62+
63+
<bundledocument extensions="pdf"
64+
icon="${bundle.icon}"
65+
name="PDF files"
66+
role="viewer">
67+
</bundledocument>
68+
69+
<bundledocument extensions="custom"
70+
icon="${bundle.icon}"
71+
name="Custom data"
72+
role="editor"
73+
isPackage="true">
74+
</bundledocument>
75+
76+
<!-- Workaround since the icon parameter for bundleapp doesn't work -->
77+
<option value="-Xdock:icon=Contents/Resources/${bundle.icon}"/>
78+
79+
<option value="-Dapple.laf.useScreenMenuBar=true"/>
80+
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
81+
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
82+
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=${bundle.name}"/>
83+
<option value="-Dcom.apple.smallTabs=true"/>
84+
<option value="-Dfile.encoding=UTF-8"/>
85+
86+
<option value="-Xmx1024M" name="Xmx"/>
87+
</bundleapp>
88+
</target>

README.md.orig

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
appbundler
2+
=============
3+
4+
A fork of the [Java Application Bundler](https://svn.java.net/svn/appbundler~svn)
5+
with the following changes:
6+
7+
- The native binary is created as universal (32/64)
8+
- Fixes [icon not showing bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7159381) in `JavaAppLauncher`
9+
- Adds `LC_CTYPE` environment variable to the `Info.plist` file in order to fix an [issue with `File.exists()` in OpenJDK 7](http://java.net/jira/browse/MACOSX_PORT-165) **(Contributed by Steve Hannah)**
10+
- Allows to specify the name of the executable instead of using the default `"JavaAppLauncher"` **(contributed by Karl von Randow)**
11+
- Adds `classpathref` support to the `bundleapp` task
12+
- Adds support for `JVMArchs` and `LSArchitecturePriority` keys
13+
- Allows to specify a custom value for `CFBundleVersion`
14+
- Allows specifying registered file extensions using `CFBundleDocumentTypes`
15+
- Passes to the Java application a set of environment variables with the paths of
16+
the OSX special folders and whether the application is running in the
17+
sandbox (see below).
18+
- Allows overriding of passed JVM options by the bundled app itself via java.util.Preferences **(contributed by Hendrik Schreiber)**
19+
- Allows running the Application as `privileged` - e.g. for Setup **(Contributed by Gerry Weißbach)**
20+
- Allows specifying a JNLP file (`jnlplaunchername`) as alternative to the `mainclassname` which can then be launched without hassle when the Application is signed. See [How to sign (dynamic) JNLP files for OSX 10.8.4 and Gatekeeper](http://stackoverflow.com/questions/16958130/how-to-sign-dynamic-jnlp-files-for-osx-10-8-4-and-gatekeeper) **(Contributed by Gerry Weißbach)**
21+
22+
These are the environment variables passed to the JVM:
23+
24+
- `LibraryDirectory`
25+
- `DocumentsDirectory`
26+
- `CachesDirectory`
27+
- `ApplicationSupportDirectory`
28+
- `SandboxEnabled` (the String `true` or `false`)
29+
30+
31+
Example:
32+
33+
<target name="bundle">
34+
<taskdef name="bundleapp"
35+
classpath="appbundler-1.0ea.jar"
36+
classname="com.oracle.appbundler.AppBundlerTask"/>
37+
38+
<bundleapp
39+
classpathref="runclasspathref"
40+
outputdirectory="${dist}"
41+
name="${bundle.name}"
42+
displayname="${bundle.displayname}"
43+
executableName="MyApp"
44+
identifier="com.company.product"
45+
shortversion="${version.public}"
46+
version="${version.internal}"
47+
icon="${bundle.icon}"
48+
mainclassname="Main"
49+
copyright="2012 Your Company"
50+
applicationCategory="public.app-category.finance">
51+
52+
<runtime dir="${runtime}/Contents/Home"/>
53+
54+
<arch name="x86_64"/>
55+
<arch name="i386"/>
56+
57+
<bundledocument extensions="png,jpg"
58+
icon="${bundle.icon}"
59+
name="Images"
60+
role="editor">
61+
</bundledocument>
62+
63+
<bundledocument extensions="pdf"
64+
icon="${bundle.icon}"
65+
name="PDF files"
66+
role="viewer">
67+
</bundledocument>
68+
69+
<bundledocument extensions="custom"
70+
icon="${bundle.icon}"
71+
name="Custom data"
72+
role="editor"
73+
isPackage="true">
74+
</bundledocument>
75+
76+
<!-- Workaround since the icon parameter for bundleapp doesn't work -->
77+
<option value="-Xdock:icon=Contents/Resources/${bundle.icon}"/>
78+
79+
<option value="-Dapple.laf.useScreenMenuBar=true"/>
80+
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
81+
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
82+
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=${bundle.name}"/>
83+
<option value="-Dcom.apple.smallTabs=true"/>
84+
<option value="-Dfile.encoding=UTF-8"/>
85+
86+
<option value="-Xmx1024M" name="Xmx"/>
87+
</bundleapp>
88+
</target>

TODO

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Architectures should be automatically inferred from the embedded JVM
2+
- It makes more sense to take as input a JRE instead of taking a JDK and strip
3+
it until it becomes a JRE...

appbundler/.classpath

Lines changed: 0 additions & 7 deletions
This file was deleted.

appbundler/.project

Lines changed: 0 additions & 17 deletions
This file was deleted.

appbundler/bin/appbundler-1.0ea.jar

175 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)