[liblouis-liblouisxml] Re: build.xml and Ant

  • From: "Michael Whapples" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "mwhapples@xxxxxxx" for DMARC)
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 18 Aug 2015 18:36:37 +0100

Having a very quick look through the code I assume the main class is:
org.aph.braillezephyr.Main

Michael Whapples

On 18/08/2015 18:29, Greg Kearney wrote:

OK I think I am makeing some very slow progress here. I now have an app that in
place of chrashing at once now bounes the icon but does not start. I suspect it
is becuse of this item which need to be sent

MainClass
This is a required key. It designates the name of the class containing the
application’s main method. If the classes are included in your application as a
JAR file, use the main class’s fully qualified class name, including its
package, to locate the class within the JAR file.

so the question is jsut what do they expect for the "main class’s fully qualified
class name, including its package, to locate the class within the JAR file"


Here is the file I have now:

<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>JavaAppLauncher</string>
<key>CFBundleIconFile</key>
<string>GenericApp.icns</string>
<key>CFBundleIdentifier</key>
<string>components.BrailleZephyr</string>
<key>CFBundleDisplayName</key>
<string>BrailleZephyr</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BrailleZephyr</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>JVMMainClassName</key>
<string>components.BrailleZephyr</string>
<key>JVMOptions</key>
<array>
<string>-XstartOnFirstThread</string>
</array>
<key>JVMArguments</key>
<array>
</array>
</dict>


<key>Java</key>
<dict>
<key>JVMVersion</key>
<string>1.5+</string>
<key>MainClass</key>
<string>com.aph.BrailleZephyr</string>
<key>Properties</key>
<dict>
<key>apple.laf.useScreenMenuBar</key>
<string>true</string>
</dict>
<key>VMOptions</key>
<string>-XstartOnFirstThread</string>
</dict>
</plist>




Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Aug 18, 2015, at 10:20 AM, Michael Whapples (Redacted sender "mwhapples@xxxxxxx"
for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

OK, that looks very different from the info.plist examples on the Apple
developer sites I linked to. The pages I linked to had a key named Java which
had a dictionary for its value. Within that dictionary all the Java specific
options were given.

May be try that third party ant task I linked to.

May be something changed when Oracle started maintaining the JVM for MacOSX.

Michael Whapples

On 18/08/2015 18:14, Greg Kearney wrote:
I know I can edit the plist below is what I have which does not work:

<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>JavaAppLauncher</string>
<key>CFBundleIconFile</key>
<string>GenericApp.icns</string>
<key>CFBundleIdentifier</key>
<string>components.BrailleZephyr</string>
<key>CFBundleDisplayName</key>
<string>BrailleZephyr</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BrailleZephyr</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>JVMMainClassName</key>
<string>components.BrailleZephyr</string>
<key>JVMOptions</key>
<array>
<string>-XstartOnFirstThread</string>
</array>
<key>JVMArguments</key>
<array>
</array>
</dict>
</plist>


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Aug 18, 2015, at 10:07 AM, Michael Whapples (Redacted sender "mwhapples@xxxxxxx"
for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

You can edit the info.plist file using a specific editor included in XCode or
use any text editor. To view the content of the appbundle in the finder you
need to get the finder to show the content of the appbundle (I think in the
context menu you can find this option).

Here is a general page on Apple developer about producing an appbundle for a
Java application and it covers editing the info.plist file:
https://developer.apple.com/library/mac/documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html

There are other tools out there for making appbundles of Java applications, as
an example: http://informagen.com/JarBundler/

The final option is to manually get gradle to create the correct directory
structure and such like.

Michael Whapples

On 18/08/2015 17:43, Greg Kearney wrote:
If you could offer some kind of suggestion as to how to modify the info.plist
file I will try it. I have the bundle made up but it will not run without the
-XstartOnFirstThread option.

Thanks


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Aug 18, 2015, at 9:19 AM, Michael Whapples (Redacted sender "mwhapples@xxxxxxx"
for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

OK, the answer is quite simple, it was the first search result when I did a web
search:
https://developer.apple.com/library/mac/documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html

There is a Java key dictionary for the info.plist file. The example on that
page looks like it passes in a Java VM argument which is what we need.

Michael Whapples

On 18/08/2015 17:13, Greg Kearney wrote:
That is not possible on Mac due to the need to have the -XstartOnFirstThread
option set which must be done by the command line: java -jar
-XstartOnFirstThread *.jar if we could figure out a way to have the
XstartOnFirstThread start witout that then the JAR file would work fine.

We would still however have other issues, such as distribution, opening BRF
files into it and so on.


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Aug 18, 2015, at 8:57 AM, Michael Gray <mgray@xxxxxxx> wrote:

On Windows and the Linux distros I have tried so far, all of them can just
execute the jar directly.

MRG
mgray@xxxxxxx


________________________________________
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] on behalf of Greg Kearney
[gkearney@xxxxxxxxx]
Sent: Tuesday, August 18, 2015 11:54 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: build.xml and Ant

For the Apple MacOS app store we will need to generate a signed bundle at some
point. Launch4j may well build a Window executable but does not solve the
issues of MacOS application bundles however.


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Aug 18, 2015, at 8:29 AM, Michael Whapples (Redacted sender "mwhapples@xxxxxxx"
for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

It is worth noting that gradle could be used instead of ant, gradle can use any
ant task and so could be used to generate the app bundle.

An alternative, less Apple Mac way of doing this, is to use something like
launch4j which produces a shell script which searches for a suitable JRE and
launches the jar application with the appropriate arguments. This though means
a directory of files and launching a shell script.

Eclipse RCP applications are similar, except I think the launcher is an app
bundle, but it relies on other files external to the app bundle as well.

Windows is less of a problem as there is less of a standard of bundling
applications in a specific way, a directory of files with an executable is more
acceptable. I don't know how appstore apps on windows are structured.

Michael Whapples

On 18/08/2015 16:11, Greg Kearney wrote:
Upon doing more research I have found that the stand alone MacOS application
will need to be built using ant and a file called build.xml so it would be
helpful if such a file that works to build the MacOS application bundle be
included.

Here is a link to the pages that expalin this.
https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

The big issue that I see is how to get the XstartOnFirstThread working as well.


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org

For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: