premake / Generating .vcxproj & .androidproj for Android platform...

127 views
Skip to first unread message

Tarmo Pikaro

unread,
Feb 12, 2017, 4:56:29 AM2/12/17
to Premake Development
Hi !

I'll now try to brief in about changes I have made in syncProj regarding Android platform support, I hope someone who will implement this support into premake, will try to get same functions / keywords supported as I have added , or discuss if it makes sense to implement it differently with me - so I can change syncProj behavior to match premake.

Like mentioned in another post https://groups.google.com/forum/#!topic/premake-development/m28pgc8ZsUc - I've introduced new function "osbase", which allows to specify target project build instead of command line argument. ("vs2010", "vs2012", "vs2015", and now also new "android").

I have also added androidapilevel to define Android packaging project API level, usage for example:
.cs:
        androidapilevel
("android-22");


.lua (proposed):
        androidapilevel
"android-22"



In android packaging project it's possible to refer from one project another project, something like "dependson", only on project level, not on solution level.
I have tried to extend "dependson" function call, so you can specify dependency on project.

.cs:
     dependson
(
       
"a5651b81-1c70-4416-b60f-a5b2094a211a", "../Android1.NativeActivity/Android1.NativeActivity.vcxproj"
     
);


.lua (proposed):
     dependson
{
       
"a5651b81-1c70-4416-b60f-a5b2094a211a", "../Android1.NativeActivity/Android1.NativeActivity.vcxproj"
     
}



In case if someone interested - here is my last commit:



Revision: 29

Author: tarmopikaro
Date: 12. helmikuuta 2017 11:45:51
Message:
Feature: Android projects generation, first alpha.
Feature: Add "osbase" function for platform selection.
Feature: Add "androidapilevel" for specifying android api level.
Feature: "dependson" will allow now to specify project guid
----
Modified : /Project.cs
Modified : /
SolutionProjectBuilder.cs
Modified : /syncProj.cs
Modified : /
syncproj.xml



I will try to continue further development, I suspect some tuning will still be needed, at least packaging project file extension needs to be changed.

starkos

unread,
Feb 12, 2017, 11:49:55 AM2/12/17
to premake-d...@googlegroups.com
Someone else please step in if they feel differently, but from my perspective this entire thread is feeling very unproductive. Tarmo, you're saying you want to do something like `osbase { "vs2012", "android" }` ( which makes little sense as Visual Studio is not an OS or a "base") and then… what exactly? Some magic happens and you get some projects that do…something? When we ask what exactly it is you're trying to achieve you just repeat your API demands without any additional information.

The source code for Premake is freely available to anyone who wants it. Maybe the best course of action is for you to identify one feature that you would like to see in Premake, try to code it up, and submit a pull request for it. If you're stuck on something, feel free to post here or open an issue with more specific questions. Then we would have something concrete that we could provide real feedback about.

Also: while I sincerely wish you the very best of luck with your project—I can see why people would find it useful—this forum is for discussing Premake. I don't mind you posting an occasional short status update and link to your project, but your development plans and C# examples are off-topic here. It is easy and free to open a discussion group here on Google, and you are welcome to post a link to your group if you like.

Again, I encourage you to continue your project, but I'd like to see this thread steered into a more productive direction. 

Thanks!

@starkos


Tarmo Pikaro

unread,
Feb 12, 2017, 5:13:37 PM2/12/17
to Premake Development
> this forum is for discussing Premake. I don't mind you posting an occasional short status update and link to your project, but your development plans and C# examples are off-topic here.

You're right in a way. Basically I've teached syncProj to create .lua scripts as well. You can use "syncProj <solution.sln> -lua" - and it will dump you working .lua script.
So in that sense this is a correct forum for discussion, but of course I could leave C# snipets out of scope. :-)

> Tarmo, you're saying you want to do something like `osbase { "vs2012", "android" }
Never mind that discussion, I have integrated "osbase" kind of function inside syncProj, but for premake5 it will remain as a comment. I have added also "vsver" function, which somehow corresponds to _ACTION on solution level.

> Maybe the best course of action is for you to identify one feature that you would like to see in Premake, try to code it up, and submit a pull request for it.
I have tried to follow to some level of how android support could be integrated inside premake ( https://github.com/premake/premake-core/issues/665 => discussion ), but it was not trivial, after which I've decided to code syncProj.
But now I can generate .lua script as well, if you make Android support into premake, I could offer you generation support sln > to > lua. (This is what I have asked about androidapilevel support)

starkos

unread,
Feb 12, 2017, 6:17:29 PM2/12/17
to Premake Development
Are you aware of the Android modules listed here? 



—st.

Sam Surtees

unread,
Feb 13, 2017, 1:04:58 AM2/13/17
to Premake Development
I agree with Starkos here. Good luck with your project and all that, but please stop hijacking this community for the development of your project. We've tried to understand and help you, but you repeatedly avoid our questions and waste our time.

Tarmo Pikaro

unread,
Feb 14, 2017, 12:35:04 PM2/14/17
to Premake Development
Last time I did not manage to get android support work, like I've mentioned - I suspect premake baseline to be incompatible with android modules.
Hopefully you will manage to get it working.

Cheers. :-)

Sam Surtees

unread,
Feb 14, 2017, 9:58:55 PM2/14/17
to Premake Development
The Android module that I'm using works perfectly fine.
Reply all
Reply to author
Forward
0 new messages