Ubuntu 15.04 Feature : Ubuntu Make

One of the hurdle as a developer, especially when you're exploring a new programming languages, is quite tedious to setup the a sensible default development environment in GNU/Linux distros. Case in point, Android development. Which IDE should I install? Which Android SDK version should I download? Which Android emulator should I use? All these unanswered questions preventing your from quickly setting up the environment so that you can focus on the thing that a developer should do in the first place, writing code. My current solution is to store all this environment settings and setup in a Github repository.

Meanwhile, to solve this similar issue, Fedora introduced DevAssistant, which I've tried briefly in Fedora 22. It just a wizard which let you pick and install all the necessary packages by programming languages. Ubuntu follow suit by introducing something similar called Ubuntu Make in 15.04. We will look into this today.

As usual, let's us install it as by default, this is not a common package. Interestingly, notice all the Python 3 packages for its dependencies. Is good that everyone move to Python 3 already and Canonical leading the effort.
$ sudo apt-get install ubuntu-make
[sudo] password for ang: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libyaml-0-2 python3-argcomplete python3-progressbar python3-yaml
The following NEW packages will be installed:
  libyaml-0-2 python3-argcomplete python3-progressbar python3-yaml ubuntu-make
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 218 kB of archives.
After this operation, 1,235 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
......

Running the program. Surprisingly, there is no GUI version compare to DevAssistant. And also, why named the application umake and not ubuntu-make? For a second, I've mistaken it for CMake, a build system. Why Python, Ruby, and PHP are missing from the list instead of Dart? Is Dart still relevant? After it was decided not to add its Virtual Machine to Google Chrome browser, I don't think it will get any more traction.
$ umake 
usage: umake [--help] [-v] [-r] {web,games,dart,ide,android,go} ...

Deploy and setup developers environment easily on ubuntu

positional arguments:
  {web,games,dart,ide,android,go}
                        Developer environment
    web                 Web Developer Environment
    games               Games Development Environment
    dart                Dartlang Development Environment
    ide                 Generic IDEs
    android             Android Development Environment
    go                  Go language

optional arguments:
  --help                Show this help
  -v, --verbose         Increase output verbosity (2 levels)
  -r, --remove          Remove specified framework if installed

Note that you can also configure different debug logs behaviors using LOG_CFG
pointing to a log yaml profile.

Surprisingly, no man page?
$ man umake
No manual entry for umake
See 'man 7 undocumented' for help when manual pages are not available.

Regardless the missing man page, let continue with setting the environment for Android development. Run the command below, choose the installation path, and agree to the terms and conditions. The tool will download all the necessary packages and create a Android Studio launcher in the left panel. This will take a while as there are a lot of packages to be downloaded. To see the list of packages, add the -v parameter to verbosely show the status of the tool.
$ umake android
[sudo] password for ang: 
Choose installation path: /home/ang/.project/tools/android/android-studio
Before installing Android Studio or the standalone SDK tools,
you must agree to the following terms and conditions.
......
[I Accept (a)/I don't accept (N)] a
Downloading and installing requirements                                                                                                                                         
100% |######################################################################|
Installing Android Studio
|###########################################################################|
Installation done

Something to take note, while the Ubuntu-Make did install all the necessary basic packages, it still does not download the Android SDK platform tools. This have to be done through the Android Studio itself.

As I mentioned earlier, to show the list of packages to be installed when running umake command, we can use the -v parameter. Let's try with setting up the Golang environment as shown below. What does the console output tell us? For one, umake will download and install the latest binary packages from the upstream (the creator, in this case Google) itself instead of the downstream (the packager, Canonical) itself.
$ umake -v go
INFO: Logging level set to INFO
INFO: Create a new apt cache
INFO: libxtst6:i386 isn't installed
INFO: libxext6:i386 isn't installed
INFO: libxi6:i386 isn't installed
INFO: libxt6:i386 isn't installed
INFO: libxpm4:i386 isn't installed
INFO: libxmu6:i386 isn't installed
INFO: libxp6:i386 isn't installed
INFO: libgtk2.0-0:i386 isn't installed
INFO: libatk1.0-0:i386 isn't installed
INFO: libcairo2:i386 isn't installed
INFO: libexpat1:i386 isn't installed
INFO: libfontconfig1:i386 isn't installed
INFO: libfreetype6:i386 isn't installed
INFO: libglib2.0-0:i386 isn't installed
INFO: libice6:i386 isn't installed
INFO: libpango1.0-0:i386 isn't installed
INFO: libpng12-0:i386 isn't installed
INFO: libsm6:i386 isn't installed
INFO: libxau6:i386 isn't installed
INFO: libxcursor1:i386 isn't installed
INFO: libxdmcp6:i386 isn't installed
INFO: libxfixes3:i386 isn't installed
INFO: libx11-6:i386 isn't installed
INFO: libxinerama1:i386 isn't installed
INFO: libxrandr2:i386 isn't installed
INFO: libxrender1:i386 isn't installed
INFO: libnss3-1d:i386 isn't installed
INFO: libnspr4-0d:i386 isn't installed
INFO: libcurl3:i386 isn't installed
INFO: libasound2:i386 isn't installed
Choose installation path: /home/ang/.project/tools/go/go-lang
INFO: Start downloading DownloadItem(url='https://golang.org/dl/', checksum=None, headers=None, ignore_encoding=False) in memory
INFO: Starting new HTTPS connection (1): golang.org
INFO: https://golang.org/dl/ download finished
INFO: All pending downloads for [DownloadItem(url='https://golang.org/dl/', checksum=None, headers=None, ignore_encoding=False)] done
INFO: Installation [] pending                                                      
INFO: Start downloading DownloadItem(url='https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz', checksum=Checksum(checksum_type=, checksum_value='5020af94b52b65cc9b6f11d50a67e4bae07b0aff'), headers=None, ignore_encoding=False) to a temp file
INFO: Starting new HTTPS connection (1): storage.googleapis.com
Downloading and installing requirements
INFO: https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz download finished |####################################################################################### |
INFO: All pending downloads for [DownloadItem(url='https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz', checksum=Checksum(checksum_type=, checksum_value='5020af94b52b65cc9b6f11d50a67e4bae07b0aff'), headers=None, ignore_encoding=False)] done
100% |###################################################################################|
INFO: Requesting decompression to /home/ang/.project/tools/go/go-lang
Installing Go Lang
INFO: Decompression to /home/ang/.project/tools/go/go-lang finished 
INFO: All pending decompression done to ['/home/ang/.project/tools/go/go-lang'] done.
|########################################################################################|
You need to restart a shell session for your installation to work
Installation done

Next, as the console message indicates, we need to restart our shell session. Either command will do.
$ exec bash -l
$ su -l $USER

By checking the location of the Golang binary.
$ which go
/home/ang/.project/tools/go/go-lang/bin/go

However, the environment is still not automatically configured as we still need to manually set the $GOROOT path.
$ go version
go: cannot find GOROOT directory: /home/ang/.project/tools/go/go-lang:

Looking into other developer environments. I'm going to try every single one later if time permitted.
$ umake ide
ERROR: A default framework for category IDE was requested where there is none
usage: umake ide [-h]
                 {rubymine,webstorm,pycharm,idea-ultimate,idea,phpstorm,eclipse,pycharm-professional,pycharm-educational}
                 ...

$ umake games
ERROR: A default framework for category Games was requested where there is none
usage: umake games [-h] {stencyl} ...

$ umake web
ERROR: A default framework for category Web was requested where there is none
usage: umake web [-h] {firefox-dev} ...Let's try other different development environment instead.

In short, there is a lot of potential with this tool but still, there are some bugs and missing environments that needs to be fixed. To help out, check the Github repository.

No comments:

Post a Comment