I forgot to answer your other question. The DBE is still new. At the moment it does not provide enough support to let user easily build the downstream project just yet, but it is totally possible. I mean our CI has shown one (quick and dirty) way of doing that and there are other ways too, e.g. building your own custom docker image with your custom Urho3D library already built inside it, or modify the convenient script “dockerized.sh” for your own project to also mount a chosen Urho3D built tree from your host, normally known as URHO3D_HOME, so that it can be referenced inside the container when building your own project.
BTW, I have updated the tags in the “Docker Hub”, so the workaround in my earlier post is not needed anymore.
EDIT: In case it is still not obvious to you how the CI does it, I have summarized the nutshell as follows. If you don’t have a new downstream project created yet, you can quickly get one via rake scaffolding task.
$ rake scaffolding dir=my-downstream-project
The new project resides inside the Urho3D project root and this is important for the quick and dirty approach. I come back to that later. Modify the skeleton project to your heart’s content and when you are ready to build it, do this below. This uses a feature that all basic docker user should already know.
$ script/dockerized.sh web bash
and you are now in an interactive shell from inside the container! CD to your downstream project and build it as you would have normally done it.
urho3d@fishtank:/path/to/Urho3D/project/root$ cd my-downstream-project
urho3d@fishtank:/path/to/Urho3D/project/root/my-downstream-project$ URHO3D_HOME=$(pwd)/../build/web rake cmake web && rake make web
And voila! Exit the shell to go back to the host when you are done. This works because the DBE can see and touch anything inside the Urho3D project root directory and since the downstream project is inside this directory then the DBE can freely perform build operation on it too. As a bonus it also can see the parent directory contains a build tree subdir to be denoted as “URHO3D_HOME”. This is why earlier I said it is important to create the new downstream project inside the Urho3D project root if you take this quick and dirty approach. The other approaches I mentioned in my previous post do not have this restriction.
One last thing. If you do using this quick and dirty approach and you don’t like to drop into an interactive shell each time you want to build then you are in luck. There is another hidden gem that I believe I haven’t told anyone anywhere yet. In the Urho3D project root create a new file “.rake/my-downstream-project.rake”. Create the “.rake” subdir if you don’t have it yet. And put these lines inside the file.
task :build do
Dir.chdir 'my-downstream-project' do
system 'URHO3D_HOME=$(pwd)/../build/web/ rake cmake web && rake make web' or abort 'Failed to build'
end
end
Then you can build your downstream project by simply typing this one liner at the Urho3D project root.
$ script/dockerized.sh web rake build
In the example above I created a new rake task and called it “build”. You can substitute that to anything you like.