www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cross platform android ldc compiler

reply Andre Pany <andre s-e-a-p.de> writes:
Hi,

I want to share an idea with you. I do not know how far I will
come myself with this idea due to my lack of linux and ldc 
knowledge.

There is a great virtualization tool called docker. With this
tool it is possible to create images of software tools. This 
images
will run out of the box on every system (mac/linux/windows).

I think of a docker image containing ldc and all necessary 
dependencies
for compiling an android/ios application. The D source code you
can store in a shared directory between your host system and the
docker virtual system. The docker image could in addition provide
a web interface to start the compilation/linking process.

In the end, if you have the docker image, you will have s.th. 
like a
"D android compiler as a service" which works on every major
operation system. Just install docker and select the image from 
the free
docker marketplace.

Kind regards
André
Jun 17 2016
next sibling parent reply Gerald <gerald.b.nunn gmail.com> writes:
On Friday, 17 June 2016 at 11:48:23 UTC, Andre Pany wrote:
 Hi,

 I want to share an idea with you. I do not know how far I will
 come myself with this idea due to my lack of linux and ldc 
 knowledge.

 There is a great virtualization tool called docker. With this
 tool it is possible to create images of software tools. This 
 images
 will run out of the box on every system (mac/linux/windows).

 I think of a docker image containing ldc and all necessary 
 dependencies
 for compiling an android/ios application. The D source code you
 can store in a shared directory between your host system and the
 docker virtual system. The docker image could in addition 
 provide
 a web interface to start the compilation/linking process.

 In the end, if you have the docker image, you will have s.th. 
 like a
 "D android compiler as a service" which works on every major
 operation system. Just install docker and select the image from 
 the free
 docker marketplace.
Docker doesn't run natively on Windows and OSX, it requires a VM such as VirtualBox, since it depends on linux kernel features like cgroups. IMHO, a better solution for a development environment then docker would be Vagrant (https://www.vagrantup.com) as this is the sort of use case it is designed around and it is based on VMs from the get-go (though it can work with docker as a provider as well),
Jun 17 2016
parent reply Andre Pany <andre s-e-a-p.de> writes:
On Friday, 17 June 2016 at 12:26:18 UTC, Gerald wrote:
 On Friday, 17 June 2016 at 11:48:23 UTC, Andre Pany wrote:
 Hi,

 I want to share an idea with you. I do not know how far I will
 come myself with this idea due to my lack of linux and ldc 
 knowledge.

 There is a great virtualization tool called docker. With this
 tool it is possible to create images of software tools. This 
 images
 will run out of the box on every system (mac/linux/windows).

 I think of a docker image containing ldc and all necessary 
 dependencies
 for compiling an android/ios application. The D source code you
 can store in a shared directory between your host system and 
 the
 docker virtual system. The docker image could in addition 
 provide
 a web interface to start the compilation/linking process.

 In the end, if you have the docker image, you will have s.th. 
 like a
 "D android compiler as a service" which works on every major
 operation system. Just install docker and select the image 
 from the free
 docker marketplace.
Docker doesn't run natively on Windows and OSX, it requires a VM such as VirtualBox, since it depends on linux kernel features like cgroups. IMHO, a better solution for a development environment then docker would be Vagrant (https://www.vagrantup.com) as this is the sort of use case it is designed around and it is based on VMs from the get-go (though it can work with docker as a provider as well),
For windows and mac VirtualBox is included in the docker installation routine. Most users won't even notice Virtual Box is working behind the scene of docker. Last time I checked vagrant, I thought vagrant is a generator for virtual box images, but i will check again and include it into my research. Kind regards Andre
Jun 17 2016
parent reply wobbles <grogan.colin gmail.com> writes:
On Friday, 17 June 2016 at 13:35:01 UTC, Andre Pany wrote:
 On Friday, 17 June 2016 at 12:26:18 UTC, Gerald wrote:
 On Friday, 17 June 2016 at 11:48:23 UTC, Andre Pany wrote:
 [...]
For windows and mac VirtualBox is included in the docker installation routine. Most users won't even notice Virtual Box is working behind the scene of docker. Last time I checked vagrant, I thought vagrant is a generator for virtual box images, but i will check again and include it into my research. Kind regards Andre
Docker will be changing in the near future - there'll be no VirtualBox from now on. At least, I don't think so going from the Beta, but maybe it's just even more hidden from the user now.
Jun 17 2016
parent Jacob Carlborg <doob me.com> writes:
On 2016-06-17 17:22, wobbles wrote:

 Docker will be changing in the near future - there'll be no VirtualBox
 from now on. At least, I don't think so going from the Beta, but maybe
 it's just even more hidden from the user now.
It's still going to use virtualization. Just a different technically than VirtualBox, something that is more platform specific. On OS X it's xhyve and on Windows Hyber-V [1]. [1] https://blog.docker.com/2016/03/docker-for-mac-windows-beta/ -- /Jacob Carlborg
Jun 18 2016
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2016-06-17 13:48, Andre Pany wrote:

 I think of a docker image containing ldc and all necessary dependencies
 for compiling an android/ios application.
I think it's only possible to compile iOS applications on OS X and it's not possible to run OS X inside a docker container. -- /Jacob Carlborg
Jun 18 2016
parent reply Andre Pany <andre s-e-a-p.de> writes:
On Saturday, 18 June 2016 at 11:05:58 UTC, Jacob Carlborg wrote:
 On 2016-06-17 13:48, Andre Pany wrote:

 I think of a docker image containing ldc and all necessary 
 dependencies
 for compiling an android/ios application.
I think it's only possible to compile iOS applications on OS X and it's not possible to run OS X inside a docker container.
You are right. I thought it would be possible to create ios applications also from a linux system. But as you need OS X, the docker approach isn't possible. Kind regards Andre
Jun 18 2016
parent Jacob Carlborg <doob me.com> writes:
On 2016-06-18 18:39, Andre Pany wrote:

 You are right. I thought it would be possible to create ios applications
 also from a linux system. But as you need OS X, the docker approach
 isn't possible.
It should work for Android though. -- /Jacob Carlborg
Jun 19 2016