Posts: 7,564
Threads: 234
Joined: Aug 2007
(26.08.2010, 21:50)hvdwolf Wrote: The structure of the Application now is (I removed unnecessary listing info):
Code: ls -lR RouteConverter64.app
RouteConverter64.app/Contents:
Info.plist
MacOS
Resources
RouteConverter64.app/Contents/MacOS:
Java6Check.jar
RouteConverterPrereleaseMac64.jar
error_message.app
routeconverter
RouteConverter64.app/Contents/Resources:
RouteConverter.icns
I've tried to reproduce this structure with the new http://www.routeconverter.de/download/Ro...eMac64.zip
Does that work for you?
(26.08.2010, 21:50)hvdwolf Wrote: 1 - I wrote this simple applescript application (10 minutes work), but I don't know whether your application does shows a (graphical) error message of it's own as I can't test that right now. Does it?
Yes, it does.
--
Christian
Posts: 157
Threads: 8
Joined: May 2010
28.08.2010, 12:28
(27.08.2010, 20:54)routeconverter Wrote: I've tried to reproduce this structure with the new http://www.routeconverter.de/download/Ro...eMac64.zip
Does that work for you? Unfortunately not. The structure as such is correct, but: - You spelled the routeconverter script as Routeconverter. OSX is case sensitive. As such it is not a problem, but the Info.plist file has the section
<key>CFBundleExecutable</key>
<string>routeconverter</string>
If you prefer the script to be called Routeconverter or RouteConverter (or whatever), the CFBundleExecutable string in the Info.plist file should be the same.
- The script should have the executable bit set and it didn't. When committing from OSX/BSD/Linux and so on to svn/cvs/git/mercurial and so on, the file attributes are maintained. I don't know how this works from Windows for un*x like files.
- I assume you copy/pasted my posted shell script entries into some text editor and saved it. Windows adds it own line ends/line feeds. For text files that's no big deal but it corrupts the shell script which makes that it doesn't work even when the file attributes have been set correctly.
But we are almost there.
(27.08.2010, 20:54)routeconverter Wrote: (26.08.2010, 21:50)hvdwolf Wrote: 1 - I wrote this simple applescript application (10 minutes work), but I don't know whether your application does shows a (graphical) error message of it's own as I can't test that right now. Does it?
Yes, it does.
Great. This keeps it to a java only bundle.
Posts: 7,564
Threads: 234
Joined: Aug 2007
(28.08.2010, 12:28)hvdwolf Wrote: The structure as such is correct, but:- You spelled the routeconverter script as Routeconverter. OSX is case sensitive. As such it is not a problem, but the Info.plist file has the section
<key>CFBundleExecutable</key>
<string>routeconverter</string>
If you prefer the script to be called Routeconverter or RouteConverter (or whatever), the CFBundleExecutable string in the Info.plist file should be the same.
I wanted the script called "RouteConverter" and in the downloaded ZIP the
<key>CFBundleExecutable</key>
<string>RouteConverter</string>
matches the MacOS/RouteConverter script. What went wrong there?
--
Christian
Posts: 157
Threads: 8
Joined: May 2010
29.08.2010, 13:53
(This post was last modified: 29.08.2010, 13:55 by hvdwolf.)
(29.08.2010, 12:15)routeconverter Wrote: I wanted the script called "RouteConverter" and in the downloaded ZIP the
<key>CFBundleExecutable</key>
<string>RouteConverter</string>
matches the MacOS/RouteConverter script. What went wrong there?
I downloaded the zip again and you are right. Probably I made an error. Sorry.
Next: I could not get in touch with that friend of mine, but I tested the shell script as such on an old linux Knoppix live disk I had (version 5.1) which is running java 1.5.0_10. I used the linux prerelease.
Your Java6Check.jar works fine and so does my script.
Posts: 7,564
Threads: 234
Joined: Aug 2007
(29.08.2010, 13:53)hvdwolf Wrote: I downloaded the zip again and you are right. Probably I made an error. Sorry.
No problem, it's good to know where the problem came from.
So if I'd set the executable bit and remove the Windows Carriage Returns, it should work, shouldn't it?
(29.08.2010, 13:53)hvdwolf Wrote: Your Java6Check.jar works fine and so does my script.
Great, thank you for testing.
--
Christian
Posts: 7,564
Threads: 234
Joined: Aug 2007
29.08.2010, 20:26
(This post was last modified: 29.08.2010, 20:26 by routeconverter.)
(28.08.2010, 12:28)hvdwolf Wrote: The structure as such is correct, but:- You spelled the routeconverter script as Routeconverter. OSX is case sensitive. As such it is not a problem, but the Info.plist file has the section
<key>CFBundleExecutable</key>
<string>routeconverter</string>
If you prefer the script to be called Routeconverter or RouteConverter (or whatever), the CFBundleExecutable string in the Info.plist file should be the same.
- The script should have the executable bit set and it didn't. When committing from OSX/BSD/Linux and so on to svn/cvs/git/mercurial and so on, the file attributes are maintained. I don't know how this works from Windows for un*x like files.
- I assume you copy/pasted my posted shell script entries into some text editor and saved it. Windows adds it own line ends/line feeds. For text files that's no big deal but it corrupts the shell script which makes that it doesn't work even when the file attributes have been set correctly.
But we are almost there.
I hope so. Please try http://www.routeconverter.de/download/Ro...eMac64.zip again.
And btw, I've verified that Java6Check.jar works with Java 1.4.2 on Windows and that it shows a dialog if the version is not Java 1.6
--
Christian
Posts: 157
Threads: 8
Joined: May 2010
(29.08.2010, 20:26)routeconverter Wrote: Please try http://www.routeconverter.de/download/Ro...eMac64.zip again.
And btw, I've verified that Java6Check.jar works with Java 1.4.2 on Windows and that it shows a dialog if the version is not Java 1.6
I can't download from the post (just like the previous) but I downloaded from the PreReleases page.
It opens so your Application bundle now works. Congratulations.
One other remark: The last 2 prereleases don't contain a menu. Not the application and neither the jar.
Posts: 7,564
Threads: 234
Joined: Aug 2007
(29.08.2010, 20:51)hvdwolf Wrote: I can't download from the post (just like the previous) but I downloaded from the PreReleases page.
It opens so your Application bundle now works. Congratulations.
Thank you for your invaluable help!
(29.08.2010, 20:51)hvdwolf Wrote: One other remark: The last 2 prereleases don't contain a menu. Not the application and neither the jar.
If've tried to help with the menu delay problem by setting
System.setProperty("com.apple.mrj.application.apple.menu.about.name", appleAppMenuName);
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.showGrowBox", "true");
Will revert that.
--
Christian
Posts: 7,564
Threads: 234
Joined: Aug 2007
30.08.2010, 07:45
(This post was last modified: 30.08.2010, 07:46 by routeconverter.)
(29.08.2010, 21:25)routeconverter Wrote: Will revert that.
Although it looked pretty reasonable to set these flags
http://developer.apple.com/mac/library/r...rties.html
Or do I miss something?
Quote:com.apple.mrj.application.apple.menu.about.name
Sets the application name that is displayed in the application menu and in the Dock.
This property take a string of text as an argument. For example, java -Dcom.apple.mrj.application.apple.menu.about.name="Application Name" yourApplication.
apple.laf.useScreenMenuBar
If you are using the Aqua look and feel, this puts Swing menus in the Mac OS X menu bar. Note that JMenuBars in JDialogs are not moved to the Mac OS X menu bar.
The default value is false. Java applications created with Project Builder have this set to true.
apple.awt.showGrowBox
Most native Mac OS X windows have a resize control in the bottom right corner. By default, Java application windows that use the Aqua look and feel have the functionality of this control, but there is no user interface cue that it is there. This flag causes the resize control to be displayed.
The default value is false.
apple.awt.brushMetalLook
This flag allows you to display your main windows with the “textured” Aqua window appearance. This should only be applied to the primary application window, and should not affect supporting windows like dialogs or preference windows.
The default value is false.
--
Christian
Posts: 157
Threads: 8
Joined: May 2010
30.08.2010, 10:48
(This post was last modified: 30.08.2010, 10:49 by hvdwolf.)
(30.08.2010, 07:45)routeconverter Wrote: Although it looked pretty reasonable to set these flags
http://developer.apple.com/mac/library/r...rties.html
Or do I miss something?
That is very old and I have no idea if it's still correct. Apple had the bad habit to change the naming from 1.4.x to SE 5 (1.5.x) to SE 6 (1.6.x).
It is better to check here. I will have a look as well tonight.
|