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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2012, 04:07 PM   #61
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 4,111
Karma: 3854695
Join Date: Feb 2012
Device: Intel 4004
Quote:
Originally Posted by digory View Post
EDIT: Added dashes--- because this editor does not preserve the formatting.
In your profile here, select the "advanced editor" rather than the "default editor".
Then use the appropriate type(s) of block quotes.
Translation: The problem is on your side of the keyboard.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan
knc1 is offline   Reply With Quote
Old 07-01-2012, 11:54 PM   #62
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,023
Karma: 6352591
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by digory View Post
EDIT: Added dashes--- because this editor does not preserve the formatting.
To preserve formatting you can wrap text in CODE tags, like this:
Code:
Here is some text.
    Here is some indented text.
        This is more indented.
    And out a level.
Or instead of preserving formatting, you can create formatting with INDENT tags, like this:

Text
Indented text.
More indent.
Less indent.

Just quote this message in a new message then view the tags in your edit box.

These tags and more have toolbar icons for them, when you click the "Advanced Edit" button.

Beware that the indent tag adds extra blank lines that you may need to mess with to get it the way you want. After the "end indent" tag, you may need to add a couple of blank lines.
__________________
geekmaster is offline   Reply With Quote
 
Enthusiast
Old 07-02-2012, 12:42 AM   #63
digory
Enthusiast
digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 28
Karma: 50000
Join Date: Jun 2012
Device: kindle touch
OK, thanks. But the editor is the minor problem.

The KTextArea isn't documented in Amazon's dev kit reference, so I replaced the KTextArea with a Button. Now it compiles, cool! However, it still doesn't work. The following is a bash script that generates my azw2:

Code:
#!/bin/bash

PROJECTNAME=HelloWorld
CLASSPATH=../lib/Kindlet-2.1.jar
export CLASSPATH

echo "Making $PROJECTNAME..."

if [ -f developer.keystore ]; then
  echo "developer.keystore exists!"
else
  echo "Generating developer.keystore..."
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias dk$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias di$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
  keytool -genkeypair -keystore developer.keystore -storepass password -keypass password -alias dn$PROJECTNAME -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -validity 5300
fi

echo "Compiling..."
javac *.java

echo "Creating jar file..."
/bin/rm $PROJECTNAME.jar >&/dev/null
/bin/rm $PROJECTNAME.azw2 >&/dev/null
jar cvmf $PROJECTNAME.manifest $PROJECTNAME.jar *.java

echo "Creating signed azw2 file..."

jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar dk$PROJECTNAME
jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar di$PROJECTNAME
jarsigner -keystore developer.keystore -storepass password $PROJECTNAME.jar dn$PROJECTNAME

mv $PROJECTNAME.jar $PROJECTNAME.azw2

echo "Done."
The PROJECTNAME (the azw2's name) can be any arbitrary name, or does it need to have the same name as the public class (which is Main)? Anyway, when I move this azw2 to the documents folder, it doesn't show up in the Kindle. There is still something wrong here...

Last edited by digory; 07-02-2012 at 12:49 AM.
digory is offline   Reply With Quote
Old 07-02-2012, 03:18 PM   #64
digory
Enthusiast
digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!digory is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 28
Karma: 50000
Join Date: Jun 2012
Device: kindle touch
There was a mistake in my bash script: I added *.java to the jar instead of *.class. Stupid me. Another, minor mistake was that I named my key aliases as xy$PROJECTNAME. I should've used xy$USER, because I obviously need only one developer key triplet, to be used for all my projects. It still wouldn't work, though, and I learnt that the manifest file in the original post was wrong. Here's one that actually works:
Code:
Manifest-Version: 1.0
Main-Class: com.digory.helloworld.Main
Implementation-Title: Hello World!
Implementation-Version: 1.0
Implementation-Vendor: digory
Extension-List: SDK
SDK-Extension-Name: com.amazon.kindle.kindlet
SDK-Specification-Version: 2.1
Toolbar-Mode: persistent
Font-Size-Mode: point
The lines Main-Class and those concerning the SDK seem to be important in particular, but are not included in the manifest shown on the first post in this thread. Somebody please update that post!

Last edited by digory; 07-06-2012 at 03:49 AM.
digory is offline   Reply With Quote
Old 09-04-2012, 09:33 PM   #65
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 5,134
Karma: 5328985
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
Quote:
Originally Posted by digory View Post
There was a mistake in my bash script: I added *.java to the jar instead of *.class. Stupid me. Another, minor mistake was that I named my key aliases as xy$PROJECTNAME. I should've used xy$USER, because I obviously need only one developer key triplet, to be used for all my projects. It still wouldn't work, though, and I learnt that the manifest file in the original post was wrong. Here's one that actually works:
Code:
Manifest-Version: 1.0
Main-Class: com.digory.helloworld.Main
Implementation-Title: Hello World!
Implementation-Version: 1.0
Implementation-Vendor: digory
Extension-List: SDK
SDK-Extension-Name: com.amazon.kindle.kindlet
SDK-Specification-Version: 2.1
Toolbar-Mode: persistent
Font-Size-Mode: point
The lines Main-Class and those concerning the SDK seem to be important in particular, but are not included in the manifest shown on the first post in this thread. Somebody please update that post!

Did you update the post with the wrong code in it then?

I still see *.java etc?
__________________
Audiophile and electron bully.
My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK
Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him.
The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set
twobob is online now   Reply With Quote
Old 09-05-2012, 08:50 AM   #66
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 5,134
Karma: 5328985
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
helllooo from a 3.3

okay. here's one that worked for me on 3. (3.3, SDK 1.2, Java 1.4.2_19)

(remember to derive from com.amazon.kindle.kindlet.AbstractKindlet as shown in this project...)

Included the sign.sh that you call like ./sign.sh filename.jar

Included the developer.keystore from ixtabs font project.

you run it against the EXPORTED jar

dump the final azw2 in /mnt/us/documents

should be golden.

Quote:
#!/bin/sh
dbus-send --system /default com.lab126.powerd.resuming int32:1
called update.sh is an optional file you *could* make, to assist in quick index updating (that's what I run).

hope this helps someone like me who was struggling with the info that is mainly for 4 and 5's these days.
Attached Thumbnails
Click image for larger version

Name:	ImageMagick: kindle.fb.pgm_059.png
Views:	124
Size:	9.5 KB
ID:	91843  
Attached Files
File Type: gz test-for-a-3.3-using-sdk-1.2-on-1.4.2_19.tar.gz (8.0 KB, 65 views)
__________________
Audiophile and electron bully.
My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK
Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him.
The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set

Last edited by twobob; 09-05-2012 at 07:27 PM. Reason: added com.amazon.kindle.kindlet.AbstractKindlet
twobob is online now   Reply With Quote
Old 09-06-2012, 09:02 PM   #67
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 5,134
Karma: 5328985
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
Lifecycle

http://docs.oracle.com/javase/tutori...lifeCycle.html helpful reading.

retroweaver

http://www.openmamba.org/showfile.ht...weaver125.spec

http://retroweaver.sourceforge.net/g...aver-guide.pdf

and more generally about the java: Bit of a "cvm" overview

Spoiler:
__________________
Audiophile and electron bully.
My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK
Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him.
The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set

Last edited by twobob; 01-10-2013 at 07:52 AM.
twobob is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do you write? J.H. Farr Writers' Corner 42 10-27-2010 12:11 PM
I Write Like Moejoe Writers' Corner 15 07-30-2010 09:44 PM
Would you like to write with me? Elliot Writers' Corner 0 12-29-2009 12:09 PM
Write Fast, Write Slow? Moejoe Writers' Corner 14 03-25-2009 09:55 AM
iLiad jharker:would you please write a guide on installing iLiadPowerManagement tudou331100 iRex Developer's Corner 10 01-22-2009 11:19 PM


All times are GMT -4. The time now is 12:55 PM.


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