Programming

New Android Project _003

Using subversion for android development

0

I’ve started to learn the basics of Android Apps development. As always that there is code involved, I like to use a code versioning tool. In my case I use subversion.

The general rule of thumb I use when using subversion is to add everything to subversion except the auto generated files. For Android this means, add everything generated by eclipse ADT plugin except the gen and bin folders.

I  tell the steps to follow to create a new project and upload to a subversion repository. In this example I use a folder in my home directory to store the project files. Instead of letting Eclipse create the folder I do it myself and then I check out the option “Use default location”.

  • Launch Eclipse and create a new Android Project, setting the location you want to use

  • Check out your subversion trunk development at your selected location
svn co http://path/to/your/subversion/trunk ~/libtronicsExample
  • Add everything to subversion
cd ~/libtronicsExample
svn add *
svn add .project
svn add .classpath
  • Revert bin and gen contents (but keep versioning the root folders, as you need them to build the project)
cd ~/libtronicsExample
cd bin
svn revert --depth infinity *
cd ../gen
svn revert --depth infinity *
  • Check what are you versioning
cd  ~/libtronicsExample
svn status

Here you see that “bin” folder is being versioned, but its contents aren’t. We do this to avoid storing changes on files that are autogenerated on each build

  • Submit it
cd  ~/libtronicsExample
svn ci -m "My first commit of my next awesome Android App"

Compiling PyQwt5 in Windows

2

At work, we made a python program to display plots of some data. This program is based in python, pyQt, PyQwt5, guiqwt and matplotlib. We are using python 2.7 for all of our developments. We use linux for development, but this application main users are Windows Users, so we had to generate a windows binary of this application. For all libraries there was a binary for windows 32 bits and python 2.7, except for PyQwt, so we had to compile it. Yes, compile!

In order to compile PyQwt-5.2.0 for python 2.7 with pyQt4 we need to install all dependencies. What I installed:

I’m not sure qt is absolutely needed, but when I finally was able to compile everything, it was installed.
Then I downloaded PyQwt-5.2.0.tar.gz and saved into my desktop and uncompress it.
Then I followed the step found on PyQwt installation page, plus some more commands:
cd PyQwt-5.2.0
cd configure
configqt.bat
vcvars32.bat
python configure.py -Q ../qwt-5.2
nmake
nmake install
(it is so strange to do this things on windows when you are used to do it on Linux)(BTW, Windows command line sucks!)
Before everything worked I had to solve some issues:
  • After installing Visual C++ 2010, nmake was not found, I had to add “C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\” to the path
  • vcvars32.bat is a batch command to set the paths correctly for Visual c++ 2010, it is located at same place as nmake.
  • when running “python configure.py -Q ../qwt-5.2″ an error message box appeared as it was unable to find mspdb100.dll, I searched it on my Program files and copied it to PyQwt-5.2.0/configure
Menu_004

Eclipse setup for pyQt (II)

4

As I’m learning python and Qt I change my mind on some of the tips I’ve already posted here. This is the case for my old tip on how to configure Eclipse to work with PyQt4. That old post should be called “How to compile ui files from eclipse”, so I will try to ammend my error in this new post.

(more…)

Check your 3rd party depencies with python

0

At work we are developing software in python which depends on libraries not installed by default in a Linux installation. When the python interpreter can not found a module imported inside a python script an exception is raised. This breaks the current execution and outputs the execution trace on the terminal. To give more detailed information and not the trace which can be hard to read for non developers I check dependencies of my programs on launch.

(more…)

ExternalTools

Eclipse setup for pyQT

2

Update: I’ve written an updated and extended version of how to setup Eclipse for PyQt development here.

 

Lately I’m working using pyQt as the GUI of my python scripts. I prefer eclipse + pydev over EricIde, but EricIde has some features not present on pydev. Basic feature I was missing was to launch pyuic from my IDE.

(more…)

Go to Top