Remembering JUST why I abandoned Unix, the ego cult, the fact that all American unix programmers of any repute where tied into DARPA CIA/NSA, and the endless “required knowhow” in order to still make 1 + 1 = 2, we went back in time, 10+ years, and tried to compile something – the android ADAL library. From source. Of course, one has to first spend hours learning to get the tool chain fixed .. that enables compilation.
Remember Microsoft, this is WHY we go through the pain of learning Windows dogma (once) – so we don’t have to all this! Endlessly.
So first, on MAC OS (lets not even think about doing it on the hated-windows) first we install maven, using vi (which I still remember well, from 30 years ago). And then we follow the instructions to update the android SDK/buildtools/SDKtools/Eclipse or something else to work together.
yes we have confirmed that we have all packages of the android SDK (build tools and various other tool like things) installed, and the installer even did something right, in the platforms directory (which it might not, depending on how its feeling today, apparently).
It was a miserable experience. The key is to happen to know that in your .bash_profile needs to export ANDROID_HOME with a variable that includes the /sdk element added to the end of the download path of the expanded tarball.
Remember this is based on using a variant of the shell I abandoned after Unix System 7 became BSD 2 and later SunOS 4, in 1983/1987…, and instructions even had me use the vi(1) tool (that I learned the hard way, 30 years ago – being actually useful on a UK quality consumer-grade 300 baud modem over a voice circuit set for spying). Remember that Turing had a 20kbps teleprinter line to Arlington Hall and the Washington Navy Yard (where I got to work…for a bit in the very rooms where bombes had once worked). Back in 1945…(never mind 1983) folks were sending automated job orders to remote Turing bombes… using a synchronous GGCS-Tunny-like electronic cipher machine capable of working at those baud rates…. Meanwhile back in the UK…in the 1980s…
ok. So does our Android IDE/SDK now build things using the maven-style makefile?
So I cannot answer that question yet, but I can run a fancy make(1) job (known as mvn(1) , now) on the ADAL library:
Lets stop trying to follow the broken English in the instructions (which just makes the half-sensical technical references with steps-to-do even worse than the norm). Let’s just tryout the helloApp samples (that should link against the adal DLL/jar just built by maven.).
in empty workspace, sue the ‘import’ project – existing android code.
note I opted out of the importing of the second project, above.
To build the source we need to clean up a little and get things linking.
First remove the reference to the project we just avoided loading in to the IDE.
Then we add a lib folder to the project, and import (using the file system) the adal library stored in a jar file.
once created, we right click on the lib directory in order to import a jar file
Finally, we can now refer to the library file as a linkable resource, by using control right click on the project to get to the properties and the load path:
Then we repeat the lib (import and reference) process for “GSON” (which we downloaded from here ).
Now we have compiled and linked!
note the strange absence of the valus in lib/ – once one performs a build reference to the lib.jar file.
Of course, running it is problematic too! To accomplish that, we do as we mentioned in our previous post: we add a throwaway project built using the add (android application) project wizard. Once that runs, we get when running our own testapp: