jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.16k stars 263 forks source link

Source structure #91

Closed AbandonedCart closed 9 years ago

AbandonedCart commented 9 years ago

Have you considered making a root project and adding the individual projects as submodules?

This would allow you to sync the entire project (including directory structure) and set the external makefiles to relative paths. It would eliminate the entire manual setup because you could also call the builds in sequence from a master build script.

As a side note, the build appears to have a specific order so that would no longer be a concern, either.

If needed, I can put together an example.

LinkofHyrule89 commented 9 years ago

I think that this would definitely be a good idea. I've talked to the developer about getting the project ported to Android Studio and Gradle and from what I understand Gradle is a very useful and diverse system that can be used independent of Android Studio.

AbandonedCart commented 9 years ago

It is also a PITA to configure and maintain.

https://github.com/AbandonedCart/Play-Emulator is all it would take. It is less of a full conversion to another build system and more just linking the projects together.

LinkofHyrule89 commented 9 years ago

Well anything to make them more unified is a step in the right direction. It took me a while to even get the thing setup to compile lol.

Zer0xFF commented 9 years ago

I agree on the use of submodules, it would make life so much easier, to begin with.

why don't you like Gradle/Android Studio @LoungeKatt ? while I don't actually mind the current method, Google are slowly adding ndk support to studio which should come in handy. http://tools.android.com/tech-docs/android-ndk-preview

AbandonedCart commented 9 years ago

It would be one thing if the emulator were fully functional and you switched to a new system, but is it really worth trying to get the thing running with beta-quality tools?

They released Android L as a preview and it worked to get an idea of how it worked, but I wouldn't have gone hiking in the woods during bear season with that being my firmware.

Zer0xFF commented 9 years ago

well, no and I only referenced the preview to give prospective of future benefits. as it stands now though, Android Studio would provide a graphical interface for editing the Emulators UI and thats as much benefits as it brings to the table. though from the looks of it and unfortunately so, it seems gradle (even the preview) isn't compatible with current ndk build format, thus it would require a bit of restructuring, but I do hope by the time its finished, we can reference the ndk source instead of having it be part of gradle project.

AbandonedCart commented 9 years ago

It's all well and good to work on it until it's ready and then submit it as a replacement, I just wouldn't recommend making release builds on it until that time.

It would make a good experimental branch.

jpd002 commented 9 years ago

@LoungeKatt Thanks for the example, I've setup the official repo with the submodules: https://github.com/jpd002/Play-Build

The next step would probably be to change all paths to relative paths to make sure we don't rely on ExternalDependencies files anymore.

AbandonedCart commented 9 years ago

I am curious how that goes on Windows. I had to edit some of the Android.mk files to get the relative paths to match up. For some reason it works but doesn't look right.

LinkofHyrule89 commented 9 years ago

There are ways to get the NDK to work with the stable version of Android studio which can be used until the Release Candidate 1 hits the stable branch. I've not tried this method but came across it when I was researching how I could setup the project in Android Studio. Unfortunately I wasn't as successful with what I wanted to do as I wanted to be since I don't really have a good knowledge of how everything works yet. Anyways hope this link can be useful. http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/

jpd002 commented 9 years ago

I've changed some of the build scripts yesterday to remove some of the stuff from ExternalDependencies.mk (namely in the CodeGen project). It assumes a directory structure like the one present in the Play-Build project.