Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Windows compatibility patches and External storage location fixes. #922

Merged
merged 0 commits into from Aug 6, 2012

Conversation

Projects
None yet
4 participants
Contributor

falcon4ever commented Feb 19, 2012

As requested in #794 I've branched openframeworks:develop into my own branch and applied the fixes required to build openFrameworks for Android with MinGW on the windows platform.

The instructions on how to compile are still valid (except for the part of patching):
http://www.multigesture.net/articles/how-to-setup-openframeworks-for-android-on-windows/

Note 1: You will need to run:
android.bat update project --target android-8 --path C:\openFrameworks\addons\ofxAndroid\ofAndroidLib

This updates the project files for ofAndroidLib project. I didn't included those because those are user specific (they contain the path to the sdk)

Note 2: d3ddf8e
I only added this commit in order to make the examples build properly. Someone still needs to fix the proper implementation.

Note 3: 7a9cf0b
While working on NodeBeat, we found out that not all devices are using /mnt/sdcard as their external storage location. In some cases the sdcard is located somewhere else ("Environment.getExternalStorageDirectory()" doesnt always return the correct location). This commit fixes this problem by checking several locations as reported on multiple Stackoverflow threads. More info about this issue can be found in the commit description.

Contributor

ofTheo commented Feb 24, 2012

hey thanks - I am going to have @arturoc comment on this as I have no idea :)

Owner

arturoc commented Feb 25, 2012

i need to test this, will do soon

Contributor

falcon4ever commented Mar 14, 2012

I tried to update my development fork today (to sync up again with the parenting OF/develop branch), but noticed that the examples now moved to a different location. Does this mean I will need to redo my changes? Also, it seems that I couldn't just merge as it resulted in some conflicts in TortoiseGit..

edit:
Nvm, I just made another branch (developQNX)

Owner

bilderbuchi commented Mar 15, 2012

Nvm, I just made another branch (developQNX)

If you moved your work to the other branch, you should update your source branch in this PR ("from falcon4ever:develop" -> "from falcon4ever:developQNX"). Then you can work in this new branch until it can be merged cleanly - the PR will automatically update with new commits you make to its source branch, and the web interface will show you if it will merge cleanly at the bottom.

Contributor

falcon4ever commented Mar 15, 2012

bilderbuchi:

Thanks for your response

Here is what I did:

  1. I created a new branch called "developQNX" which is based on falcon4ever:develop the last commit before these patches.
  2. Next I made my falcon4ever:developQNX local branch active and pulled from oF:develop all the commits that have been made since last month.
  3. Pushed falcon4ever:developQNX to github
  4. So now falcon4ever:developQNX is basically equal to oF:develop and does not include any of my patches in this pull request.

So I didn't really moved my work to another branch, I just made a new branch so I could work with all the fixes the OF devs submitted to the develop branch since last month (as I am currenty creating patches required for ofxQNX). Actually, the only conflict when trying to update falcon4ever:develop, is that I'm using the newer ADT build files (project.properties & ant.properties) which replaces the currently used default.properties & build.properties (which are deleted on mine). But since on of:develop those files are removed/moved, tortoiseGIT doesnt seem to know what to do. Mind you, these filename changes have been required with the release of ADT 14.0.0 (SDK Tools r14, Oct 2011), the current ADT is 16.0.1.

Pardon my ignorance, but I am not sure what you mean with "update your source branch in this PR ("from falcon4ever:develop" -> "from falcon4ever:developQNX")". Do you mean that if I had imported all (3) changes from falcon4ever:develop into falcon4ever:developQNX I should edit this PR request?

Owner

bilderbuchi commented Mar 15, 2012

Yes, I had the impression that you moved your 3 commits into developQNX, but since then I realized that you didn't - no changes to the source branch are necessary.

Regarding the new location of the examples, you should just add a commit to falcon4ever:develop which moves them to the correct, new, location, then this won't be a problem.
Are you sure that the ADT build files are causing the merge problems? Because they are correctly recognized as renames in this PRs diff view (the yellow arrow symbol). My guess it that you modified some part of the android examples which has been touched by someone else since you branched off of of:develop.

Owner

bilderbuchi commented Mar 15, 2012

OK, I went ahead and compared a bit. github's history view is really practical to see the last changes in a directory/file.
You should take a look at the following commits, somewhere in there is your conflict.

in ofxAndroid, there are just two commits which might clash with yours:
9ff376a
b5ff63a edit: This one can't cause the troubles, either.

the commit moving the examples can't have done anything, it was just moved files and directories: 0e83945 - just move yours according to the new structure, as mentioned above.
Then there were two which added a new example with a name you don't use, this can't produce a conflict: 28b5b73 dfa8084

so the conflict must be in those two commits in ofxAndroid.

Owner

bilderbuchi commented Mar 15, 2012

OK, one I definitely found. There is even a commit comment by yourself saying it shouldn't be merged!
d3ddf8e
So this commit has to go: When in falcon4ever:develop say ´git revert d3ddf8e`, this will create a commit undoing changes introduced by that commit. See http://gitready.com/intermediate/2009/03/16/rolling-back-changes-with-revert.html

Owner

bilderbuchi commented Mar 15, 2012

Another possible problem: You try to rename addons/ofxAndroid/ofAndroidLib/default.properties, but it has been removed by arturo in 9ff376a in the meantime.
I think that's it.

Contributor

falcon4ever commented Mar 15, 2012

Hi bilderbuchi,

I really appreciate the effort you're making :). Alright I'll try to get rid of that commit as you suggested and then try to pull from of:develop again to see if it merges correctly into my falcon4ever:develop

Owner

bilderbuchi commented Mar 15, 2012

you should merge the other way round... from your develop into your developQNX. (that would be equivalent to this PR)
great fun with those names - that's why it makes sense to have separately named branches for PRs.. ;-)
Easier way: just revert that commit, push your develop to origin, and see if this PR turns green :-)
Then you have to move the examples to the right folder, and see if ofAndroidLib/default.properties really causes problems.

Contributor

falcon4ever commented Mar 15, 2012

So I reverted that particular commit and pulled again from the of:develop. But actually default.properties isnt the issue as thats not giving any conflict here (prob because the renaming went alright). Its just project.properties locally:

And the rest of the examples show this:

I havent yet moved the examples in this case (seems not to be possible with TortoiseGit, so I might need to do it in some shell).

edit
Alright this is what the LOG said:
CONFLICT (rename/delete): addons/ofxAndroid/ofAndroidLib/project.properties deleted in aa68b7d and renamed in HEAD. Version HEAD of addons/ofxAndroid/ofAndroidLib/project.properties left in tree.
Automatic merge failed; fix conflicts and then commit the result.

and some more

CONFLICT (rename/delete): examples/android/androidVBOExample/default.properties deleted in HEAD and renamed in aa68b7d. Version aa68b7d of examples/android/androidVBOExample/default.properties left in tree.
CONFLICT (rename/delete): examples/android/androidVBOExample/build.properties deleted in HEAD and renamed in aa68b7d. Version aa68b7d of examples/android/androidVBOExample/build.properties left in tree.
CONFLICT (rename/delete): examples/android/androidTouchExample/default.properties deleted in HEAD and renamed in aa68b7d. Version aa68b7d of examples/android/androidTouchExample/default.properties left in tree.
CONFLICT (rename/delete): examples/android/androidTouchExample/build.properties deleted in HEAD and renamed in aa68b7d. Version aa68b7d of examples/android/androidTouchExample/build.properties left in tree.

Owner

bilderbuchi commented May 29, 2012

What's the status of this PR?
Honestly, at this point I think it will be faster if you re-do your changes based on the state of the current of/develop, instead of trying to get this one to merge correctly.

Contributor

falcon4ever commented May 30, 2012

Dunno, thought arturoc was gonna try it out...

Well if there is enough interest, I could redo the changes. Unfortunately I won't have time to do it until later next month.

Owner

arturoc commented May 30, 2012

hey, sorry totally forgot about this. i updated the android version to be compatible with the ndk r7, i'm going to try to merge it, will tell you if i have any problem

@falcon4ever falcon4ever merged commit 140f967 into openframeworks:develop Aug 6, 2012

Owner

bilderbuchi commented Aug 6, 2012

I'm sorry, what just happened here? @falcon4ever did you merge this PR into your own repo, or close it, or whatever? cause it looks like you merged into OF/openframeworks, and that shouldn't be possible. Also, I can't find a trace of this happening in the OF repo. I'm confused...

Contributor

falcon4ever commented Aug 6, 2012

I'm just going to redo my Windows patches based on the latest of:develop (0071).

I still have to check if it builds with the latest NDK on Windows and MinGW anyway. I did discussed this with arturo on IRC a few days ago, so I'll be sending a new pull request maybe later this week.

Contributor

falcon4ever commented Aug 6, 2012

Oh and the merge thing, I'm reorganizing my repo so I can work like this:
https://github.com/openframeworks/openFrameworks/wiki/openFrameworks-git-workflow

The develop branch will now be in sync with the original one, and I'll be creating a new branch for my android patches (i.e. develop-Android)

The content of my "old" develop branch with my old android/windows patches isn't lost, it is just moved to "develop-007-Android" for people who want to use it with the older NDK (it should still work with r6b)

Owner

bilderbuchi commented Aug 6, 2012

ah, I see. I figured something like this must be involved. Thanks :-)

Contributor

falcon4ever commented Aug 12, 2012

Found some time to do the patching and testing today, a new pull request is available here:
#1484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment