Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > Miscellaneous > Archive > Sunrise

Notices

 
 
Thread Tools Search this Thread
Old 09-30-2005, 05:25 PM   #1
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
Sunrise on Mac OS X

Hello,
I just noticed that Sunrise was not Windows-only anymore, and tried to run it on Mac OS X, since Laurens said it might be possible. Here is the how-to, as I couldn't find one :

What you will need :
- Mac OS X 10.4
- Java 1.5, which requires Mac OS X 10.4
- The SWT libraries for Mac OS X. Both the 3.1 Stable and 3.2M2 Development versions work, but with the 3.1 Stable one you will get a ~2000-pixel wide About dialog in Sunrise.

In the sunrise-0.42f folder, remove both .so files then go to the lib subfolder and remove swt.jar. From the files you downloaded from Eclipse.org, take all the .jnilib files as well as swt.jar and copy them to the lib folder in the sunrise-0.42f folder.
Next, open the run.sh script in TextEdit (in Plain Text mode, not Rich Text), TextWrangler or pico in the Terminal. Change its contents to (one long line) :
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java -XstartOnFirstThread -Xmx128m -classpath "/System/Library/Java:/Users/me/NewSofts/sunrise-0.42f/lib/swt.jar:/Users/me/NewSofts/sunrise-0.42f/sunrise-desktop.jar" -Djava.awt.headless=true -Djava.library.path="/Users/me/NewSofts/sunrise-0.42f/lib" -jar sunrise-desktop.jar
Of course, change /Users/me/NewSofts/sunrise-0.42f to the path to the folder containing Sunrise.
After that open Terminal and cd to the sunrise-0.42f folder, then type chmod +x run.sh.
To launch Sunrise, type ./run.sh.

Notes :
- Use File -> Exit to quit Sunrise, as Command-Q or SWT -> Quit SWT will freeze Sunrise. Even then, Sunrise might not always completely quit and you will have to Force Quit it (control-click on its icon in the Dock and choose Force Quit)
- Some PNG and GIF images will not be converted. This seems to be because of the option -Djava.awt.headless=true, as Sunrise throws a java.awt.HeadlessException: null error for each image not converted, but without this option Sunrise will freeze if you try to convert anything, because of a bug that affects Java applications using SWT and AWT on Mac OS X.

I have tried packaging this in a .app application bundle but due to Sunrise using SWT, it is quite complicated (for an example that works, you can have a look at Azureus's application bundle). I've read that Eclipse has an application bundle exporter, but I wasn't going to download and install Eclipse just for that. Using Jar Builder which is included in the Apple developer tools, the applications crashes on launch with a java.lang.NullPointerException.

Hope this was useful/interesting to someone.
Attached Thumbnails
Click image for larger version

Name:	Sunrise.png
Views:	823
Size:	48.6 KB
ID:	858  

Last edited by Sawtooth; 10-29-2005 at 07:53 AM. Reason: fixed a small typo
Sawtooth is offline  
Old 10-06-2005, 01:40 PM   #2
ticotek
ubergeek
ticotek began at the beginning.
 
Posts: 4
Karma: 18
Join Date: Mar 2005
Location: Venezulea
Device: Asus A730
Sawtooth thanks a million!, I've been traying for months to get it to run but I had never managed it. Followed your instructions and works perfectly, I even made an applescript app so I don't need to go to the terminal to launch.

Thanks again.
ticotek is offline  
Advert
Old 10-07-2005, 09:51 AM   #3
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
Thumbs up Great!

Good to hear you got it working!
Laurens is offline  
Old 10-07-2005, 12:13 PM   #4
ticotek
ubergeek
ticotek began at the beginning.
 
Posts: 4
Karma: 18
Join Date: Mar 2005
Location: Venezulea
Device: Asus A730
Hey Laurens, should have thanked you too. I really love Jpluck/Sunrise ed, and it is an important part of my workflow (I cant sit down and really read on my laptop or desktop), so I tag all the articles I want to calmly read to my delicious account and make sunrise download it.

I also wanted to share that until I updated tp Firefox 1.5 beta2 the "Send to sunrise" thingy worked perfectly. There is a way to make previous extensions work in beta2 but I haven't had time.

Thanks Again Laurens, and I hope that after you have everything up and running with your new app in windows you might consider a Mac version.
ticotek is offline  
Old 10-28-2005, 04:34 PM   #5
just_jeepin
Addict
just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.
 
just_jeepin's Avatar
 
Posts: 226
Karma: 1010500
Join Date: Oct 2005
Device: Kindle Paperwhite 2
Help

Help, I've followed your instructions with 0.42f and 0.42i and can't get it to work. Here's what I get in the Terminal:

dhcp-246-42811:/Applications/sunrise-0.42i dkidd$ chmod +x run.sh
dhcp-246-42811:/Applications/sunrise-0.42i dkidd$ ./run.sh
java.lang.UnsatisfiedLinkError: no swt-pi-carbon-3139 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.eclipse.swt.internal.Library.loadLibrary(Libra ry.java:123)
at org.eclipse.swt.internal.carbon.OS.<clinit>(OS.jav a:20)
at org.eclipse.swt.widgets.Display.createDisplay(Disp lay.java:856)
at org.eclipse.swt.widgets.Display.create(Display.jav a:836)
at org.eclipse.swt.graphics.Device.<init>(Device.java :118)
at org.eclipse.swt.widgets.Display.<init>(Display.jav a:676)
at org.eclipse.swt.widgets.Display.<init>(Display.jav a:667)
at org.eclipse.swt.widgets.Display.getDefault(Display .java:1237)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:24 2)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:33 0)
at com.distantchord.swt.Window.<init>(Unknown Source)
at com.distantchord.sunrise.ui.MainWindow.<init>(Unkn own Source)
at com.distantchord.sunrise.apps.Desktop.run(Unknown Source)
at com.distantchord.sunrise.apps.Desktop.main(Unknown Source)
Exception in thread "main" java.lang.NoClassDefFoundError
at org.eclipse.swt.widgets.Display.createDisplay(Disp lay.java:856)
at org.eclipse.swt.widgets.Display.create(Display.jav a:836)
at org.eclipse.swt.graphics.Device.<init>(Device.java :118)
at org.eclipse.swt.widgets.Display.<init>(Display.jav a:676)
at org.eclipse.swt.widgets.Display.<init>(Display.jav a:667)
at org.eclipse.swt.widgets.Display.getDefault(Display .java:1237)
at com.distantchord.swt.SWTUtil.showExceptionInfo(Unk nown Source)
at com.distantchord.sunrise.apps.Desktop.run(Unknown Source)
at com.distantchord.sunrise.apps.Desktop.main(Unknown Source)
dhcp-246-42811:/Applications/sunrise-0.42i dkidd$


Thanks for any help!
just_jeepin is offline  
Advert
Old 10-29-2005, 07:50 AM   #6
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
Quote:
java.lang.UnsatisfiedLinkError: no swt-pi-carbon-3139 in java.library.path
According to this error, either swt-pi-carbon-3139.jnilib is not in the right folder (lib), or java.library.path is incorrect/incomplete in run.sh.
Sawtooth is offline  
Old 10-31-2005, 02:57 PM   #7
just_jeepin
Addict
just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.
 
just_jeepin's Avatar
 
Posts: 226
Karma: 1010500
Join Date: Oct 2005
Device: Kindle Paperwhite 2
Well, I checked and everything seems to be correct but I still get the error. Is there a reason why a pre-compiled version can't be distributed? For those of us 'commandline unsavy'.
just_jeepin is offline  
Old 11-03-2005, 02:02 PM   #8
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
You must mean a double-clickable version (Sunrise is already compiled). Well, the only reason until now is that nobody had provided one :-)

I've attached the one I just made.

Note that you still need to install Java 1.5 before using it.
Sawtooth is offline  
Old 11-03-2005, 02:26 PM   #9
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
Great work! I don't have a Mac, but I'm sure it'll work fine. OK if I upload this to the SourceForge file server?
Laurens is offline  
Old 11-03-2005, 04:30 PM   #10
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
No problem, you can upload it on SourceForge.
Though it would be wise (and I say that from experience ) to wait for at least one user to say that it works on his/her Mac.
Sawtooth is offline  
Old 11-03-2005, 06:05 PM   #11
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
Sure, I'll wait a few days.
Laurens is offline  
Old 11-04-2005, 11:11 AM   #12
just_jeepin
Addict
just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.just_jeepin ought to be getting tired of karma fortunes by now.
 
just_jeepin's Avatar
 
Posts: 226
Karma: 1010500
Join Date: Oct 2005
Device: Kindle Paperwhite 2
It works great except two small problems...

When I quit the windows closes but the icon in the dock stays and I have to force quit it.

When I open sunrise it doesn't automatically open my saved sdl file.

Otherwise VERY nice.


UPDATE: If you click on the red close button (instead of Command+Q) it will close properly and then the next time you open Sunrise it will open your sdl file.

Last edited by just_jeepin; 11-04-2005 at 09:58 PM. Reason: update
just_jeepin is offline  
Old 11-05-2005, 09:29 AM   #13
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
As I said in the first message of this thread, Sunrise will crash if you use Command-Q or SWT -> Quit SWT. Use File -> Exit, or, as you discovered, close the window.
Note that when Sunrise throws an error on an image conversion (java.awt.HeadlessException: null), you will most likely have to Force quit it anyway (it will hang while quitting).
I'm going to add a small readme to the archive...

EDIT : Here is the new archive [EDIT: a new version is out, see later posts]. It has a readme and a license, SunriseCLI, Send to Sunrise and the documentation are more accessible and the application is a little better (its Dock icon doesn't briefly disappear during launch).

Last edited by Sawtooth; 11-16-2005 at 04:17 PM. Reason: Removed old version
Sawtooth is offline  
Old 11-07-2005, 01:55 PM   #14
ticotek
ubergeek
ticotek began at the beginning.
 
Posts: 4
Karma: 18
Join Date: Mar 2005
Location: Venezulea
Device: Asus A730
Hey Sawtooth, the latest file you attached works great on my PowerMac 1.6 running 10.4.3. As soon as I try it on my iBook i will post again.
ticotek is offline  
Old 11-16-2005, 04:40 PM   #15
Sawtooth
Member
Sawtooth has learned how to buy an e-book online
 
Posts: 10
Karma: 90
Join Date: Sep 2005
Device: Sony Clié SJ22
Apple has just released a new version of Java 1.5 for Mac OS X, and Eclipse released SWT 3.2M3 earlier this month. Both improve Sunrise on Mac OS X quite a bit :
- All images are now converted (the SWT+AWT bug is fixed, or worked-around enough so that things work).
- Redrawings of windows are instantaneous (some widgets were slow to redraw when switching from tab to tab).
- Sunrise should no longer have a reason to crash when you choose File -> Exit or close the window (sadly, it still crashes if you type Command-Q or choose SWT -> Quit).

I had to make a few adjustments to the package to integrate all this, so here is a new one. I think this one is good to go on Sourceforge.

Note for non-Mac OS X users : the folder __MACOSX and the .files and ._files in the archive are invisible on Mac OS X. These files and folder are required.

Last edited by Sawtooth; 11-27-2005 at 05:37 PM.
Sawtooth is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac users that are Reader owners, help a new Mac owner AnemicOak Sony Reader 8 06-12-2010 04:36 PM
Where is the Sunrise showcase? AceHarddrive Reading and Management 2 12-16-2006 05:21 AM
Plucker/Sunrise resets TX erosebud12 Reading and Management 10 06-27-2006 08:14 AM


All times are GMT -4. The time now is 04:48 PM.


MobileRead.com is a privately owned, operated and funded community.