Page 9 of 19

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Fri Mar 22, 2013 1:40 pm
by PyTom
Are you sure you have the JDK, and not the JRE?

The only other thing I can think of is to try a different bitness of JDK - if you have the 32-bit JDK, install the 64-bit version, and vice versa.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Fri Mar 22, 2013 2:00 pm
by Juny
Interitum wrote:Well, can't get past Step 2.
Checked the path, attempted fixing it.
No go.
JDK exists, re-installed both that and Python.
Ideas?
Thanks in advance.
I had the same problem, in my case I solved it by installing Pythom 32bit instead of the 64bit version.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Fri Mar 22, 2013 4:43 pm
by Interitum
Yup, 100% positive. I've developed in Java before so I had the JDK even before this.
Unfortunately, I'm running a 32-bit machine, so I can't test out 64-bit installs.
Guess I'm just in bad luck. I'll try running this on my other machines later.
Thanks anyways!

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Mon Mar 25, 2013 5:34 am
by Code Monkey
I am getting the same issue where I can't get past step 2. I've uninstalled and re-installed both the JDK and Python for both 32 bit and 64 bit. I've tried all possible combinations for a few hours and to no avail. Has anyone come across any solutions around this? I'm using Windows 7 64 bit

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Mon Mar 25, 2013 12:00 pm
by Hseo
Ok for javac part (you didn't download JDK )
You just need to let you PC know where is java file...
=
Justin Buser wrote:To permanently set your JAVA_HOME Environment Variable under Windows do the following:

Click Start, right click on Computer and select properties (you can also hold down the windows key and press the pause/break key).
Click on Advanced system settings on the left.
Click the Environment Variables button on the bottom.
Click the New... button below the System variables window.

Enter the following:

Variable name: JAVA_HOME
Variable value: C:\jdk1.6.0_23\
(C:\jdk1.6.0_23\ = Java home file)

Click Ok, Ok, Ok, and close the system control panel you opened in step 1
Close and re-open your command prompt.
Source:
http://stackoverflow.com/questions/4613 ... ndroid-sdk

//

For Access denied >>> just open android.py with Editra than remove all # line ( three line )

(I might edit it later if I have more problem.)

edit:
- Error 183: [Error 183] Cannot create a file when that file already exists: 'a ssets/common'

Answer = Remove common folder from Mygame(your_game_name) folder

Sourse:
http://direct-lemmasoft.renai.us/forums ... =8&t=18346

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Tue Mar 26, 2013 2:51 am
by Code Monkey
Interitum I got it to work with a 64-bit machine by using the 64-bit JDK in the JAVA_HOME path.

JAVA_HOME : C:\Program Files\Java\jdk1.7.0_17

It has to be set, even if the JDK is installed and Java is properly set in the Path Environment Variable and it is found through the cmd. If your JAVA_HOME isn't set, the installer fails at step 2.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 04, 2013 2:02 am
by kirbysuperstar
I updated to the latest version of RAPT (April 1?) and while I can compile/build with no issue, I get this exception when I try to run it. The line the error is referring to seems to be the build.directory_name variable. A Windows build works no issue.

Logcat:

Code: Select all

I/python  (31668): Private directory is /data/data/com.gchoake.pc98/files
I/python  (31668): Argument is /data/data/com.gchoake.pc98/files
I/python  (31668): Handing off to main.
I/python  (31668): /data/data/com.gchoake.pc98/files/renpy/bootstrap.py:268: RuntimeWarning: import cdrom: No module named cdrom
I/python  (31668): (ImportError: No module named cdrom)
I/python  (31668): Imported android.sound.
I/python  (31668): Screen diagonal is 4.44172334235 inches.
I/python  (31668): Full traceback:
I/python  (31668):   File "/home/tom/ab/android-rebuild/private/renpy/execution.py", line 265, in run
I/python  (31668):   File "/home/tom/ab/android-rebuild/private/renpy/ast.py", line 632, in execute
I/python  (31668):   File "/home/tom/ab/android-rebuild/private/renpy/python.py", line 972, in py_exec_bytecode
I/python  (31668):   File "game\options.rpy", line 286, in <module>
I/python  (31668): NameError: name 'build' is not defined
I/python  (31668): While executing init code:
I/python  (31668):   File "game\options.rpy", line 281, in script
I/python  (31668):   File "game\options.rpy", line 286, in python
I/python  (31668): NameError: name 'build' is not defined
I/python  (31668): Logging to /data/data/com.gchoake.pc98/files/log.txt
I/python  (31668): Traceback (most recent call last):
I/python  (31668):   File "start.pyx", line 55, in start (jni/../jni/application/src//start.c:1352)
I/python  (31668):   File "/data/data/com.gchoake.pc98/files/main.py", line 141, in main
I/python  (31668):     renpy.bootstrap.bootstrap(renpy_base)
I/python  (31668):   File "/home/tom/ab/android-rebuild/private/renpy/bootstrap.py", line 323, in bootstrap
I/python  (31668): SystemExit: 0
Device is a Nexus 4 running 4.2.2.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Wed Apr 10, 2013 1:09 am
by Code Monkey
Has anyone had issues trying to load files on RAPT using open or codecs? Whenever I try to load a file I get "Exception: Couldn't find file 'content/activity/tv/tv/_1_1.xml'." The game works fine on desktop builds and the file exists and I'm using renpy.loader.transfn to load the files, but when I build the game with RAPT, it's as if the sub directories don't get included in the build within the game folder. Any pointers or help as to what I'm doing wrong would be appreciated. Thanks!

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Wed Apr 10, 2013 10:25 am
by PyTom
How are you opening the files?

On android, the files are stored inside the APK, where possible. To get at them, you want to use renpy.file, which returns a file-like object. transfn won't work - it's not even documented - since the files don't exist on disk.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Mon Apr 15, 2013 12:27 am
by Code Monkey
Oh thank you for clarifying that. renpy.file works. I was opening the files with codecs.open and renpy.loader.transfn. That was the last step needed in getting Dandelion ported to Android. The game works! Thanks PyTom you're a genius!!! ^_^

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 25, 2013 1:11 am
by LolicOnion
I released my VN (https://play.google.com/store/apps/deta ... roid&hl=en) to the Google Play Store on March 23, and I wanted to say how much I appreciate Ren'Py and Rapt for making everything possible!

If you're looking to improve Rapt, The Google developer console has supplied crash info and such. (ex: http://puu.sh/2GG90.png ) Each one goes into more detail if I click on them. I'll even share my game's code with you if you need it. I don't know if any of this can help you or not, but I thought I'd throw it up here anyway just in case anyone was interested.

Thanks for everything!

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 25, 2013 5:31 am
by AnonymusSensei
^
wow cool :D


hy all!
i'm planning to develop VN to android too :D
i'm android developer, indie, so i already used to use eclipse as java build to package to android.
but the file and folder that RAPT generated still makes me confuse...

in order to progress, i only need 2 file
AndroidManifest.xml (easy to found, but well.. it's still a template. is there a 'specific-per-game-file'?)
but the second is so hard, where is the Main File that use .java ??
the list there is :
SDLSurfaceView.java
ResourceManager.java
RenPySound.java
PythonActivity.java
Hardware.java
AssetExtract.java
In Src isn't? but it's all a 'template' for general, right?

is there a way that i can edit the Main File.java for my own specific game?

sory if my question makes confusion, i hope anyone have answer :)

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 25, 2013 9:59 am
by PyTom
LolicOnion: Cool. I'll take a look at the errors in a bit.

AnonymusSensei: Ren'Py uses the Android NDK, as it's written mostly in C and Python. There isn't really a single main file, although execution mostly starts in PythonActivity.

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 25, 2013 11:25 am
by AnonymusSensei
PyTom wrote:LolicOnion: Cool. I'll take a look at the errors in a bit.

AnonymusSensei: Ren'Py uses the Android NDK, as it's written mostly in C and Python. There isn't really a single main file, although execution mostly starts in PythonActivity.
wow really fast response :D

hmmm yeah looks like that's the one :D

Code: Select all

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
this line usually for main file, thanks :3/

but errr...
how do i change package name to match my game package?

Code: Select all

package org.renpy.android;
as far as i know, my game data is stored in android.jonson or something, right??

so if i add code to pythonActivity (the 'template one' in the src folder), is the final signed .apk will be using my package data from android.jonson WITH additional code that i add in the pythonActivity??

Re: RAPT - Ren'Py Android Packaging Tool

Posted: Thu Apr 25, 2013 12:54 pm
by PyTom
Unless you're customizing things, you won't need to change the (java) package name. (And I suspect it won't work if you do.) There's no reason to have the Java package name match the android one, except perhaps to be able to import R from the right place. (And you can just do that by hand.)

What are you trying to accomplish. Add an ad library?