[Ohrrpgce] SVN: teeemcee/7703 email_save_to_developer, only works on Android. Requires 770bfd5 of sdl-

Ralph Versteegen teeemcee at gmail.com
Tue Feb 2 18:57:02 PST 2016


On 3 February 2016 at 07:16, James Paige <Bob at hamsterrepublic.com> wrote:

> On Tue, Feb 2, 2016 at 9:56 AM, Ralph Versteegen <teeemcee at gmail.com>
> wrote:
>
>> OK, I've fixed emailing, tested it with both gmail and the stock Android
>> email client, committed my changes to all three repositories, and split my
>> changes in sdl-android into the ohrrpgce and sdl_android branches.
>> You will need to run "changeAppSettings.sh -a" after pulling the latest
>> copy of sdl-android.
>>
>
> What does changeAppSettings.sh do? Just looking at the file, makes me
> thing it is re-generating AndroidAppSettings.cfg ...but I have a had-edited
> copy of that file for each and every game I have packaged.
>

changeAppSettings.sh is used both to change AndroidAppSettings.cfg, and to
apply the settings in it by patching the necessary files. With the -a
(automatic) option it only reapplies the existing settings.


> BTW, I'm no longer using the sdl-android build.sh script to build apks,
>> but only to build the binaries which I then copy over to ohrrpgce-android.
>> And I never did try packaging an apk with custom icons, etc. although I
>> think you did document it. So I don't know if I've broken anything on that
>> side. But I haven't added any of the missing functionality to
>> ohrrpgce-android yet.
>>
>>
> I'll test it and make sure none of it is broken (I think it is unlikely
> that your e-mail feature will have broken any of that)
>
>
>> Do you realise we now use FIVE build systems for Android? Scons,
>> ohrrpgce-android, ndk-build, ant, sdl-android's build.sh. Plus I spent I
>> lot of time with FB's build system too. Having both ohrrpgce-android and
>> sdl-android is becoming VERY painful because there is a lot of duplication
>> between them: all the java files and all the misc data files, which
>> actually are not always identical, and the duplicate build systems. I have
>> been copying files and modification back and forth all evening. I wasted
>> hours just figuring out how to make the java and AndroidManifest.xml files
>> in both projects as close as possible.
>>
>> We don't need to do anything in the sdl-android directory except compile
>> binaries with the NDK, would would allow removing all the redundancy.
>> However, splitting the C code into a different repository from everything
>> would not make complete sense, as there's interdependency between the java
>> and C SDL code (it's a small interface though). Being able to merge
>> upstream changes from sdl-android would also be good, but moving all of the
>> ohrrpgce-specific work into the ohrrpgce-android project would make merges
>> painful. But also not locking ourselves into SDL 1.2 instead of 2.0 would
>> be good. I'm really not sure how to handle this, but it seems like all of
>> our goals are hindered by mixing heaps of non-SDL-related code four-fold
>> into the sdl-android port's C code, java code, build system and data files.
>>
>
> I am happy to switch to ohrrpgce-android, but one thing which is super
> important to me is that I don't want to lose the ability to do seamless
> updates of games that have already been packaged with build.sh
>

That means we will need a function to automatically convert a
AndroidAppSettings.cfg file to a json config file for ohrrpgce-android.
That shouldn't be hard as nearly everything in AndroidAppSettings.cfg can
be ignored.


>
>>
>> So:
>> -java and C files should be in the same repo
>> -AndroidManifest.xml, etc, config and data files should be in the same
>> repo as java
>> -The build system should be in the same repo as all the config files
>> -We don't want two copies of anything unless they can just be symlinked
>> -The sdl-android build system adds a lot of complexity and is a
>> hinderance to customising things directly
>>
>> This looks a lot to me like we should move ohrrpgce-android and
>> sdl-android into the same repository, replacing the sdl-android build
>> system. And maybe we should simply not worry too much about changes to
>> upstream sdl-android (after 3 years we have never merged their changes yet,
>> almost all of which are specific to porting other programs).
>>
>
> Losing the ability to merge upstream sounds acceptable to me. In the early
> days of our android, porting, I didn't realize how stable and compatible it
> was going to turn out to be, and I had incorrectly imagined that we would
> have to be merging in important upstream bugfixes.
>

There are still some problems which I think might have been fixed upstream,
in particular keyboard improvements (but I don't remember what problems we
were having). As well as various new features and new platforms like
Android TV. And there is an SDL2 branch that looks like it could make
supporting SDL2 with our existing build process easy. So I do want to do a
merge although it will be painful.


>
>
>> And it seems probable that scons could handle compiling the OHR itself as
>> well (invoking ndk-build), though I guess that won't be much more
>> convenient than how we currently compile.
>>
>
> Yeah. Every big change in the build system carries its own cost, so lets
> only change the stuff that will really conspicuously benefit us.
>
> On 2 February 2016 at 20:20, Ralph Versteegen <teeemcee at gmail.com> wrote:
>
>> First, do "git remote -v" in the git repo to find out what name you've
>> assigned to my repository. It will probably be "origin" if you cloned my
>> repository in the first place. Then do "git pull <remotename> ohrrpgce" to
>> fetch my changes and merge into yours (actually fast forward in this case
>> where there seems to be nothing to merge).
>>
>> BTW, in git you would normally delete a branch after merging it into
>> another (git branch -d <name>), otherwise you end up with mountains of
>> historical branches as you have. So the name of the branch only gets
>> recorded (by default) in the commit message for the merge commit. On the
>> other hand in hg every commit permanently records the name of the branches
>> it was part of. The hg equivalent of a branch in git is actually called a
>> bookmark.
>>
>> However, it looks like I'll have to make futher changes to the java code.
>>
>>
>> On 2 February 2016 at 04:19, James Paige <Bob at hamsterrepublic.com> wrote:
>>
>>> I was going to test the fixes to the battle stack on Android, but I can
>>> no longer compile the android port. I assume this is because "Requires
>>> 770bfd5 of sdl-android" but I only just barely understand what that means.
>>>
>>> I am guessing that 770bfd5 identifies a commit in your git tree for
>>> sdl-android.
>>>
>>> I searched around on your guthub page and found it here:
>>> https://github.com/rversteegen/commandergenius/commits/ohrrpgce
>>>
>>> ...Although I have no idea how to merge it into my own tree
>>>
>>> /home/james/misc/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
>>> warning: hidden symbol '__cxa_begin_cleanup' in
>>> ./obj/local/armeabi/libgnustl_static.a(eh_arm.o) is referenced by DSO
>>> ./obj/local/armeabi/libsdl-1.2.so
>>> /home/james/misc/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
>>> warning: hidden symbol '__cxa_type_match' in
>>> ./obj/local/armeabi/libgnustl_static.a(eh_arm.o) is referenced by DSO
>>> ./obj/local/armeabi/libsdl-1.2.so
>>> /home/james/misc/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
>>> ./obj/local/armeabi/objs-debug/application/ohrrpgce/tmp/game-allmodex.o: in
>>> function
>>> EMAIL_FILES:jni/../jni/application/ohrrpgce/tmp/game-allmodex.c:12918:
>>> error: undefined reference to 'SDL_ANDROID_EmailFiles'
>>> collect2: ld returned 1 exit status
>>> make: *** [obj/local/armeabi/libapplication.so] Error 1
>>>
>>>
>>>
>>>
>>> On Mon, Feb 1, 2016 at 4:35 AM, <subversion at hamsterrepublic.com> wrote:
>>>
>>>> teeemcee
>>>> 2016-02-01 04:35:06 -0800 (Mon, 01 Feb 2016)
>>>> 455
>>>> email_save_to_developer, only works on Android. Requires 770bfd5 of
>>>> sdl-android
>>>>
>>>> This emails an rsav file and g_debug.txt. Not sure it actually works;
>>>> it worked
>>>> until I modified the java function to accept more than one file, and
>>>> then gmail
>>>> started crashing and the usb link to my phone stopped working.
>>>>
>>>> Added an option to the F8 debug menu to email the save, but of course
>>>> you can't
>>>> press F8 on a phone, and the option doesn't appear on other platforms.
>>>> ---
>>>> U   wip/allmodex.bas
>>>> U   wip/allmodex.bi
>>>> U   wip/game.bas
>>>> U   wip/game.bi
>>>> U   wip/gglobals.bi
>>>> U   wip/savegame.rbas
>>>> U   wip/testgame/autotest.rpg
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>>
>>>
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>>
>>
>
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20160203/22080ab4/attachment-0001.htm>


More information about the Ohrrpgce mailing list