📜 ⬆️ ⬇️

Blackberry - development site: Eclipse + CVS hosting

Blackberry (further BB) in Russia remains exotic, but even more exotic BB sounds in combination with the GPL. It turns out applications for BB can be developed at all without the cost of development tools or licenses. It is not necessary to distribute applications through the BB App Store, so nothing prevents to release them under the GPL. With Apple or WP7 ecosystem without jailbreak, this will not work (for example, Videolan). I will tell on my example how to set up a free platform for developing, testing and installing BB applications in Java in a group.


I have long had the idea to add one function to the email client BB, namely the ability to search for recipients or the sender in the corporate address book. A utility already written in Java can also search for contacts on LinkedIn.com and 123people.com . Since I don’t plan to earn money on the program, I designed it as a GPL project and at the same time set up a public CVS ​​for those who would like to join.

In general, all the steps are either trivial or have already been described in this blog, you just need to know what to choose. In addition to the step to connect Eclipse to the CVS server BerliOS.de . And on WinXP, this is slightly complicated by the lack of an SSH2 client out of the box. This is so that you do not spend the whole evening searching for information, and I will describe this process in detail here. And the rest of the points briefly.
')
Directly the instruction about CVS in a couple of paragraphs down. If you still have questions on other items, ask them in the comments.

List of tools for development.

The goal was to spend as little time as possible on learning and configuration. So I took what RIM recommends in order not to get into some kind of dead end. In the end, the list is:

WindowsXP
Java CE
Eclipse in the BB package with a plugin device simulator.
Berlios.de (CVS hosting)
PuTTY

Payment

In addition to WinXP, which I already had, everything else is available for free and without complicated registration.
RIM, the company that makes Blackberry, seems to have understood that the slogan is Developers, Developers, Developers! true not only for microsoft :-) and lately has done quite a lot to attract developers. A rather active forum has been created in which RIM staff are helping well. The price for placing programs in the Blackberry App Store is currently zero. And just the other day, canceled the fee for the keys for signing applications.

Process


There was already an article about development for BB in Eclipse. So just briefly about the process and the role of the tools in it:

Explanation


I traveled this path for my developer.berlios.de/projects/contextlookup project. I will not change the names in order not to alter the screenshots, and not to invent templates.
On the BerliOS server, this project was given a unix name contextlookup , I set up my login name diego_goeid and PuTTY in C: \ PuTTY . Change them according to your situation. If you suddenly want to participate in my specific project, you will only need to change the login.

BerliOS.de is an analogue of Sourceforge from Germany, only it is specifically created to support FOSS and is not subject to US patent and export laws. On it you can get free space for your project, project management system, bug tracker, mailing lists, your third level domain, wiki, and much more. When registering, specify the usual coordinates, name and description of the project. A day later, you open access, and most services are already operational. But CVS is for you, as the administrator will still need to be enabled.

The first part of the instructions for the project administrator only:


1. Define a category and add a description for your project, otherwise the robot will not create a directory for your CVS.
2. In the admin interface, add a check for CVS.
3. Wait.
4. I had to wait a couple of hours. Then the directory /cvsroot/contextlookup . It is already possible to place files in it and we proceed to the second part.

The second part of the instructions for those who want to use the existing CVS via SSH2 from Eclipse.



Briefly: in order to set up access using a public key, PuTTY is used and then you can already switch to the built-in SSH2 client in Eclipse.
  1. Download PuTTY install
  2. Generate a pair of rsa keys using Keygen from the installer.
  3. Load your keys into PageAnt and keep it working while you are using PuTTY.
  4. Copy your public key to Berlios via the web interface at the bottom of the account settings page (CVS / SVN / SSH Shared Keys: [Edit Keys]). Option for a simple developer - send your key to the administrator.
  5. Log in with your login and password to SSH2 shell cvs.berlios.de using PuTTY and run the command ssh-copy-id -i ~/.ssh/id_rsa.pub diego_ogeid@cvs.berlios.de
  6. Now check if you can log in from cmd.exe using the command (plink.exe from PuTTY) plink diego_ogeid@cvs.berlios.de . When asked about this, add cvs.berlios.de to your list of familiar servers.


You can now connect Eclipse to CVS for verification.

  1. Select Team->Share Project from the project context menu in Eclipse and then Create a new repository location
  2. fill in the form:
    Connection type: ext
    CVS host: cvs.berlios.de
    Repository path: /cvsroot/contextlookup
    User: diego_ogeid
    Port: default


  3. Configure configuration settings “configure connection preferences ...” c plink
    CVS_RSH: C:\PuTTY\plink.exe
    Parameters: {user}@{host}
    cvs server: cvs.berlios.de



    More in the settings do not need to climb. And then set something else wrong :-)
  4. When Eclipse asks "Select the name of the module in the CVS repository" leave "Use project name as module name"
  5. Now you should be able to connect to CVS and upload / download files.


And now without plink

After you have successfully connected and uploaded files, you can change the connection method to the pserverssh2 embedded in Eclipse.
For this:
  1. Export your keys from KeyGen in the OpenSSH format.
  2. Import them by clicking on the “SSH2” link that appears in “configure connection preferences ...”. After you add them in the id_rsa field will be present twice.
  3. Change the connection method to these values.
    CVS host: cvs.berlios.de
    Repository path: /cvsroot/contextlookup
    User: diego_ogeid
    Connection type: pserverssh2
    Port: default

  4. Everything should work the same as the first time.


Used docks:




Plans


I am also thinking of writing about the first steps in studying the BB User Interface API and a little experience in optimizing my application for speed. Write if it interests you. I would also be happy if the Java bison looks at my code.

In the end, lyrical digression:


RIM of course overslept the market for third-party applications. Most likely because of the orientation to the corporate (and conservative) segment, they were afraid to open the API. Yes, and we must pay tribute to Jobs and Co., a model with an open API phone, but tightly controlled by the App Store, this is really a bold move. At least in terms of costs for those who check these applications on the Apple side. In fact, this is another department testers.

But in general, the ability to write for the BB in Java has been a very long time ago, since 2004, if I remember correctly. I like the BB because a lot is being done in it according to generally accepted standards, with obvious logic and with fairly good compatibility with other systems. In particular, their server can be connected to almost any mail server, and so on. For this and for the high level of security they are loved. And the latest devices are quite good in terms of multimedia. So for people who work in large companies, BB is a very good alternative and sometimes the only suitable device.
That's why I use it.
The end.

Source: https://habr.com/ru/post/114171/


All Articles