Hi again,

build_all.sh seems to have worked!

If you don't mind me asking questions... How do I know make it into an .apk
that I can install?


Some notes...

I built python 2.6.4 from source, and copied the python and pgen from there
into hostpython and hostpgen in the python source dir that's included in
pgs4a.

Then I needed to download the ndk 4b.  Which isn't listed on the android ndk
website, so that took a bit of finding.  Aparently the newer SDL in git
supports 5b... but the library hangs on anything below android 2.2 devices.
    http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip

I had to fix a few instances for getattr in the pyrex, that used the third
argument as a default argument.  I think the version that comes with ubuntu
only works with 2 arguments.  I submitted a branch to merge a fix if you
want it.

cya.


On Fri, Mar 11, 2011 at 3:12 PM, René Dudfield <[email protected]> wrote:

> Hi,
>
> last night I tried to compile pygame subset for android but run into my
> first error.
>
> Writing some notes here for referencing later...
>
> It looks like the ndk r5b is different to r4b which is specified in the
> environment.
>     http://developer.android.com/sdk/ndk/index.html
>
> I changed the paths in environment.sh to the new places, but got an error
> after a while of building.
>
> I am using 32bit ubuntu though, and I didn't compile python like you said.
> So I'll try compiling python2.6.4 from source as hostpython and hostpgen
> like you say... and then if that still fails I'll try using the r4b ndk.
>
> cya!
>
>
>
> On Wed, Feb 23, 2011 at 9:03 PM, Tom Rothamel <[email protected]> wrote:
>
>>
>>
>> On Wed, Feb 23, 2011 at 5:24 AM, René Dudfield <[email protected]> wrote:
>>
>>> Do you build it on ubuntu?  If so, what packages do you need to install
>>> to package it?
>>>
>>
>> Yes. From Ubuntu I grabbed the jdk and ant, while I downloaded the
>> android-sdk and android-ndk directly from google.
>>
>> If you're not using 64-bit ubuntu, you'll need to compile python 2.6.4 and
>> copy the python and pgen binaries into Python-2.6.4 as hostpython and
>> hostpgen, respectively.
>>
>> Is there a way to install it without the market?  My cheapo tablet doesn't
>>> have the market on it yet(without a hack), since it's still android 2.2, and
>>> apparently they're not supposed to put the market on 2.2 with 10 inch
>>> screens.  I guess I can just build packages which include pygame for people
>>> to download manually.
>>>
>>
>> Two ways (both of which require you to enable "Unknown Sources" on the
>> Applications Settings screen):
>>
>> - You can just download the .apk file using the web browser, go into
>> downloads, and choose it. That should install the app.
>> - Once you have the sdk set up, you can connect to the computer and run
>> "adb install -r app.apk". (This also requires you to enable U
>>
>>
>>> Is the web cam supported?  I'd guess not.  My device has one, so it'd be
>>> neat if it was working.  I wonder if we can use normal linux video interface
>>> (then we can use the code included in pygame already) or if we'd need to use
>>> some other API.
>>>
>>
>> I don't believe that the NDK supports accessing the camera directly. So
>> we'd probably have to use JNI to access the camera.
>>
>>
>>> What do you think of including other common game modules?  For example,
>>> numpy, pybox2d ( http://code.google.com/p/pybox2d/ ), pyaudio, etc.
>>>
>>  Is there a chance to get ctypes working?  Or is that not possible with
>>> the python?
>>
>>
>> It probably makes sense to have a way of including these modules, if they
>> can be cross-compiled. With the new model (where each application ships with
>> its own copy of python and pygame), it probably makes sense to have a way
>> for people to choose which modules should be included. That's what I'm doing
>> with the Ren'Py-specific modules.
>>
>> At the same time, convincing Python to cross-compile is something of a
>> challenge, since there isn't a supported way of doing so.
>>
>>
>

Reply via email to