Tarsnap GUI v0.8

Tarsnap logo
New year brings fresh meat. I’ve just tagged version 0.8 at Github:

https://github.com/Tarsnap/tarsnap-gui/releases/tag/v0.8

This release continues on the track already paved by the previous release in terms of performance, code robustness and adherence to modern C++ practices and UI consistency, adds a bunch of new features like simulation mode, skip files flagged nodump in the file system and a persistent Journal, as well as numerous other improvements, fixes and adjustments throughout the whole spectrum. This release makes Tarsnap GUI leaner, faster and more robust overall.

More cool things have been packed packed into this release, so I urge you to read the announcement e-mail for all the juicy bits:

http://mail.tarsnap.com/tarsnap-users/msg01215.html

Take Tarsnap GUI v0.8 for a ride and let me know what you make of it:

https://github.com/Tarsnap/tarsnap-gui

Tagged with:
 

Tarsnap GUI v0.7

Tarsnap v07 OSX

I’ve just tagged version 0.7 at Github:

https://github.com/Tarsnap/tarsnap-gui/releases/tag/v0.7

This release improves on the earlier v0.6 release, adds a bunch of new features like desktop notifications, skip files and the ability grab the Tarsnap credit from the website, along with a slew of general improvements, fixes and UI refinements. Better looking, leaner and more robust.

Desktop notifications are especially useful for the scheduled job backups, so that you are notified when the backups have started, completed or failed. OS X displays the notifications like this in the Notifications Centre:

Tarsnap OSX notifications

These are arguably valuable for quickly reviewing scheduled backups that have completed while you were away.

I’ve also carefully refined the UI for high res/dpi displays so that it looks gorgeous. This is how casually browsing your archives in Tarsnap looks like on a 40″ 4k display:

Tarsnap OSX 4k

More cool things have been packed packed into this release, so I urge you to read the announcement e-mail for all the insight:

http://mail.tarsnap.com/tarsnap-users/msg01175.html

Take Tarsnap GUI v0.7 for a ride and let me know what you make of it:

https://github.com/Tarsnap/tarsnap-gui

Tagged with:
 

Johnny 2.0 (reloaded)

johnny

Johnny, the GUI interface for the popular John the Ripper password cracker has received quite some love this past summer in an orchestrated effort to pick it up and drag it beyond the stale 1.0 branch.

Johnny who

Johnny is the cross-platform Open Source GUI frontend for the infamous password security testing suite John the Ripper. It was originally proposed and designed by your’s truly in 2011 as a POC, then version 1.0 basic implementation was achieved by Aleksey Cherepanov as part of GSoC 2012. Nothing much else happened beyond the 1.1 fix release.

Johnny’s original aim is to automate and simplify the password testing/cracking routine across all major desktops with the help of the tremendously versatile and robust John the Ripper suite, as well as add extra functionality on top of it, specific to the desktop and GUI paradigms in contrast to the command line, like improved hash and password handling, multiple attacks and session management, easily define and test complex attack rules, visual feedback and statistics, all of it by building on the immense capabilities and features already offered by both JtR core/proper as well as jumbo flavors.

Johnny 2.0 reloaded

Fast forward to 2015, I finally got some spare time to turn my attention towards Johnny again in order to further the stated goal for Johnny in the previous paragraph. So I devised a fresh plan for developing Johnny further and reconsolidate the original mission. The development plan has turned into reality with the acceptance of Mathieu Laprise as a student coder for Openwall (the org behind JtR and many other cool projects) as part of this year’s GSoC iteration. The tasks in the roadmap were split between me and Mathieu and with help from my co-mentor Aleksey Cherepanov we proceeded to the actual work involved in rebooting Johnny.

Now that the summer has concluded, it’s time to draw a summary of the achievements:

  • Cross platform issues fixed across all latest versions of supported Operating Systems and desktops
  • The UI has been significantly revamped for improved usability, robustness and consistency and looks across latest desktop paradigms
  • Full translation and I18N support added (only French for now, contribute translations to your own language on github)
  • Attack session history and persistence, easier to define new attacks
  • Greater coverage of JtR core and jumbo functionality (fork, jumbo attack modes, hash format detection)
  • Improved input and output options (2john format conversion support, export to CSV)
  • Smarter Passwords table (ability to show hash format, filter, sort, include/exclude from attack)
  • You can now test passwords manually via the Guess button

Overall Johnny is faster, more robust, better looking and much more equipped and forward looking (code and internals wise) than the previous incarnation and resulted in a significant code/ui refactoring of the original codebase (maybe 80% rewrite). All of the goodness described above and more was delivered to users in three releases starting with a major version bump to 2.0 to reinstate the fresh reboot and outlook for the project. The latest release is v2.2 and is considered to be stable and feature packed enough to be called the official GUI for John the Ripper. There are binary packages for Windows and OS X and detailed source build instructions for the other platforms on the wiki page for Johnny, thus I urge you to give it a spin and leave feedback here, on Github (where the project is hosted and tracked) or on the john-users mailing list. As always, contribution of any kind is very appreciated.

Acknowledgementsgsoc2015-300x270

 

Thanks to Mathieu Laprise for his important and dedicated contribution to Johnny as a student coder for GSoC 2015 and we hope to hear back from him from time to time. Big thanks to the entire john-dev community and Aleksey Cherepanov. Also an extended appreciation goes to Google for their continued dedication to support Open Source and contribute big bucks in the process.

 

 

Johnny on Ubuntu

Johnny on Ubuntu

Johnny on Gnome 3

Johnny on Gnome 3

Johnny on OS X Yosemite

Johnny on OS X Yosemite

 

http://www.openwall.info/wiki/john/johnny

https://github.com/shinnok/johnny

Tagged with:
 

Tarsnap frontend released

 

For the better part of the last half year I’ve been working on a Graphical User Interface for the popular Tarsnap online backup service. The frontend enables desktop users to benefit from the same advantages that the Tarsnap service offers, admittedly only at the command line interface. These benefits include:

  • cost effectiveness;
  • flexibility and control of your backup process;
  • total openness on the client side;

While the Tarsnap service is of immense efficiency and conveniency for server and scripted backups thanks to its Unix utility design, that same characteristic makes it a good choice for wrapping a desktop application with a graphical interface on top so that more users can benefit from truly secure and well designed backups as well as to easily define and use more complex backup routines from a comfortable and lean interface.

Tarsnap-v0.5-OSX-Yosemite-Wizard

Tarsnap Setup Wizard

 

The application is cross platform, written in C++ with the help of the Qt SDK and is released under the BSD 2 clause license. It has been tested on OS X Yosemite, FreeBSD and most Linux distributions with a wide audience.

In the present state, the application makes it easy to:

  1. Configure Tarsnap on your system via a Setup Wizard;
  2. Make single shot backups from the Backup tab, for quickly putting some important files and directories at rest on Tarsnap;
  3. List, inspect and manage your backup archives from the Archives tab  ;
  4. Define frequent backups you attend to as a job from the Jobs tab; A job has custom backup paths and settings;
  5. Provides useful customizations and help via the Settings and Help tabs;

The current version is 0.5. There’s so much more to be implemented and ground to cover in both usability as well as Tarsnap options breadth and depth coverage. So stay tuned for further releases and announcements to this blog, @shinn0K, @tarsnap or the tarsnap-users mail list.

Project page and source code is available at GitHub: https://github.com/Tarsnap/tarsnap-gui

Head over to this overview Wiki page for extra details regarding the current release. Also read the announcement e-mail on the tarsnap-users mail list.

As explained in the wiki page and the announcement e-mail, there are no binary redistributable packages for now, mainly because there aren’t any for the Tarsnap command line client either. This might change in the future though.

As with any Open Source project, I encourage you to participate via discussion, feedback, code contributions, bug reports, fixes and platform testing. Basically any type of constructive and informative contribution is very much welcomed.

Tagged with:
 

Inspired by my previous post on using Qt Creator on non-Qt SDK projects, I went a step further and integrated the Linux Man Pages section 2(system calls) and section 3(library functions) as a context help module in Qt Creator and Qt Assistant. Having documentation on all of the Linux system calls and system libraries at one click away(F1) is a great advantage and boost to productivity when doing system programming on Linux(and not only), especially now that Linux has around 400 system calls and GlibC 1400 functions.

 

The Man pages have been bundled as a Qt Compiled Help module that is easily plugged into Qt Creator or Qt Assistant. The HTML pages used are the official ones available at kernel.org, the online version. I have removed the Google search and StatCounter Code since they are not necessary for this purpose.

The manpages are accessible by context help, when pressing F1 on a declared function like select or printf or by visiting the Help screen and browsing them alphabetically or by searching the index. You can find more information about them right there in the Help screen in the Linux Man pages category.

You can download a gzipped version Qt Compiled Help Linux Manpages from here:

http://trunk.shinnok.com/qt/manpages.qch.gz

Using it is pretty straight straight forward, open up Qt Creator and go to Tools -> Options -> Help screen. Switch over to the Documentation tab and then click on Add, like so:

Browse to your gunzipped manpages.qch location and click Open. You should now see an entry named org.kernel.manpages.1.0 that points to your supplied location:

Remember that if you remove or move the .qch to another location Qt Creator will not be able to find it anymore, since it doesn’t create a copy for itself. It’s best if you put in a place that makes sense in this manner.

If i see demand for this module, I’ll move the instructions on how to import the Linux man pages Qt Compiled Help module, as well as download links, to the main site(shinnok.com) and I will try and update them every so often once I hear of important changes to the man pages. Till then, this will be a blog simple post.

Happy hacking!

Tagged with:
 

[Update1 20-07-2011] As per numerous requests, the games list has been updated with some more cool games that I’ve missed. They have been prepended  to the top of the list and as before, they are in no particular order.

While the popular conception when it comes to games for Linux is that they are almost non-existent, this is only true when it comes to big and popular commercial franchises that are backed up by giant video game studios and publishers like EA Games, Blizzard and Konami. On the other hand, Linux(and other platforms like *BSD) benefits from a myriad of open source and free games, some smaller for casual gaming and others more impressive like MMORPG’s and FPS’s that could compete with some of the commercial games out there in their branch either in the current state or given some fresh amount of contribution. Open source games are a convoluted topic and are somewhat special and unlike a traditional Open Source project because they require much more then code contribution, which foss minded hackers and geeks are eager to contribute anytime during the day. The three major issues with open source games that are apart from a traditional open source project are:

1. Harder to steer and govern – Traditional open source projects usually have a specific purpose and use case, thus there’s not much to argue about why and if a specific tool should do what it does. At most there is a how attached to it, like how to best implement that specific functionality or how to interact with the user better. When it comes to games there’s game behavior and mechanics that are to be settled upon, these are complex and intricate issues that involve ethics, human emotions, economy, public perception and many more aspects that given a set of 10 people to decide upon you’re most likely to come up with 5 different solutions and opinions then a single one. Some open source games have suffered from this and more will in future, because these issues pertain to human aspects and perception rather then technical ones.

There’s not much to argue about whether the best algorithm should be used over an existing crappy implementation, but there’s lots to argue about whether a character class should be more powerful then another or if health and mana potions should be acquirable at the market or at all. In these cases, a more Nazzi, restrained and centralized government would have worked better then the open one as well as more defined game behavior and mechanic in the first place.

So if you’re the master of an open source game, stop paying attention to each and every comment and complaint on the forums and irc channels or even better, stop putting to heart every single argument you stumble upon, you’re doing a great job and you know it, have a plan and stick to it. Ignoring useless flames and rants and random people telling you what to do or what your game should be like is not the right path to take in this case. Of course you should not be an ass(2,3) or take this advice to the extreme since that will hurt your project even more than doing good or even put you in danger of sporks.

2. Games are multifaceted productions – that involve game design, graphic design, media and 3D content, story telling, script planning and development, besides the usual code. When it comes to games, code is not the problem, content is. There are lots of hackers willing to throw some code at a cool open source project, however, there aren’t that many game designers or graphics designers that are willing to contribute in their free time just because it’s fun or intriguing. Just not long ago, the only open source or royalty free media that you could get your hands on were icon packs and wallpapers.

Thus if it happens that your a game designer, graphic designer, media creator or story and script planner and you’re complaining about the lack of games on the Linux platform, remember that you can change that, with minor chunks of your free time applied to the right Open Source game or at least apply to a game studio that ships cross platform games. Stop complaining, take action.

3. Most games nowadays require some form of online interaction – be it either for ranking and competing or multi-player gaming or availability, single player games are not that fun anymore. You have to have some form of online or social interaction within the game for it to last. Zelda, Doom and Duke3D were cool and fun as long as there were no real alternatives. As soon as you get World of Warcraft, Starcraft and  Halo you’ll never look back until melancholy for old times and old school strikes. So what does this online interaction involve? Well it involves data storage, bandwidth, servers, maintenance and web development. These resources don’t come free in anyway, form or shape and they mostly cost money. The guy working on the C/C++ core engine of the game or the shaders/3D guy isn’t likely(or have time) to maintain a web server or do web development either. You need donations  for the hardware and network part as well as contribution for maintenance and web development.

If you’re the CEO or have influence over a hosting or isp company you could help Open Source Gaming by donating resources to those games that need it. If you’re a web developer, designer or sysadmin you can help in building and maintaining the infrastructure that a multiplayer game needs.

So that’s what I think about Open Source Games and why they are a special breed and also tried to appeal to those that could help in changing history and the status quo. Open source games are fun and addictive to contribute to and you should give it a try, be it either code or game content. That’s why I’m going to list some of the coolest and/or popular Open Source games out there to help you make your mind as well as prove to you that, yes, there are great Open Source games:

Xonotic

Xonotic is a free (GPL), fast-paced first-person shooter that works on Microsoft Windows, Mac OSX and Linux. Xonotic is a direct successor of the Nexuiz Project. Xonotic places focus on community involvement as its principal driving force and structures itself to respect that. The aim of Xonotic is to become the best possible open-source FPS (first-person-shooter) of its kind.

httpvh://www.youtube.com/watch?v=5SZgyP-0C0Q

Zero Ballistics

Zero Ballistics is a unique blend of multiplayer first person shooter and tank combat game. Easy to learn, difficult to master was our mantra during the development of the game. Set in lush alpine environments covering all seasons, playing Zero Ballistics is as thrilling as it is relaxing.

httpvh://www.youtube.com/watch?v=xEvaTjxp_bo

Speed Dreams

Speed Dreams is a 3d cross-platform, open source motorsport simulation and racing game. It is released under the GNU General Public License (GPL). Speed Dreams is a fork of the open racing car simulator Torcs, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism.

httpvh://www.youtube.com/watch?v=pRhTv3gaNwA

FreedroidRPG

Freedroid RPG is an RPG with isometric graphics. In it, the player is Tux, who must fight rebelling robots in order to restore peace to humankind. To do so, Tux may take over robots in a minigame based off the classic game Paradroid, or may simply blast them to pieces with a weapon.

S.C.O.U.R.G.E. 2

S.C.O.U.R.G.E. 2 is a cross platform, open source rogue-like game in the fine tradition of NetHack and Moria It sports a graphical front-end, similar to glHack or the Falcon’s eye.The design of the 3D UI is an attempt at the best of both worlds from old to new: It lets you rotate the view, zoom in/out, view special effects, and more with the feeling of the old-school isometric games like Exult or Woodward.

Secret Maryo Chronicles

Secret Maryo Chronicles is an Open Source two-dimensional platform game with a design similar to classic computer games. SMC has computer support to a great degree by using an accelerated Open Graphics Library for the best possible graphic design and stock performance.

Danger from the Deep

 Danger from the Deep is an open-source World War II German U-boat simulation, striving for technical and historical accuracy.

Red Eclipse

The game is a single-player and multi-player first-person ego-shooter, built as a total conversion of Cube Engine 2, which lends itself toward a balanced gameplay, completely at the control of map makers, while maintaining a general theme of agility in a variety of environments.

httpvh://www.youtube.com/watch?v=mjHVb3z72tM

Widelands   

Widelands is an open source (GPLed) real-time strategy game. It is built upon the SDL and other open source libraries and is (and will always be) under heavy development. If you knew Settlers I & II™ (© Bluebyte), then you already have a rough idea what Widelands is all about because widelands is heavily inspired by those two games.

Unknown Horizons

Unknown Horizons is a 2D realtime strategy simulation with an emphasis on economy and city building. Expand your small settlement to a strong and wealthy colony, collect taxes and supply your inhabitants with valuable goods. Increase your power with a well balanced economy and with strategic trade and diplomacy.

FreeCol

FreeCol is a turn-based strategy game based on the old gameColonization, and similar to Civilization. The objective of the game is to create an independent nation.  You start with only a few colonists defying the stormy seas in their search for new land. Will you guide them on the Colonization of a New World?

PrBoom

PrBoom, the purest Doom-Port? Aims to be the most stable Doom port with the highest compatibility to the major Doom versions. Highres software and nice OpenGL rendering. Full Boom and most if not all MBF features.

EDuke32

EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooterDuke Nukem 3D— Duke3D for short—to Windows, Linux, Mac OS X, FreeBSD, several handhelds, your family toaster, and to your girlfriend’s vibrator. We’ve added thousands of cool and useful features and upgrades for regular players and additional editing capabilities and scripting extensions for homebrew developers and mod creators. EDuke32 is completely free, open source software.

httpvh://www.youtube.com/watch?v=Al7i_v1a0m0

VCMI

VCMI Project – Heroes 3: WoG recreated -We want to rewrite the entire H3 engine (VCMI is NOT another mod) giving it new possibilities. Few years of intensive work resulted in creating application with impressive amount of features.

ioquake3

This project, ioquake3 (or ioq3 for short,) aims to build upon id Software’s Quake 3 source code release. The source code was released on August 20, 2005 under the GPLv2. Since then, we have been cleaning up, fixing bugs, and adding features.

OpenArena

OpenArena is a community-produced deathmatch FPS based on GPL idTech3 technology. There are many game types supported including Free For All, Capture The Flag, Domination, Overload, Harvester, and more. There are 17 unique player models to choose from and 12 weapons. OpenArena is based on the ioquake3 engine mentioned above.

Planeshift

PlaneShift is a Role Playing Game immersed into a 3D virtual fantasy world which is to play. Fully free means you will have no surprises of premium content which will limit your gameplay or unbalance the game. There are no limitations in skills, ranks, abilities, items you can gain with your free account. There are no time limits or additional constraints. Servers and bandwidth will be donated by sponsors. PlaneShift is made by a group of RPG enthusiasts and not by a commercial company. This allows us to expand the game without any constraint or limitation. PlaneShift is Open Source for the client and server code, so everyone can contribute to its development!

httpvh://www.youtube.com/watch?v=S6v-sPejxdo

XMoto

X-Moto is a challenging 2D motocross platform game, where physics plays an all important role in the gameplay. You need to control your bike to its limits, if you want to have a chance to finish the most difficult challenges.

WorldForge

The WorldForge project is about building tools to allow the construction of online role-playing games. The original community came together over a decade ago, out of a desire to create a game that was better and freer than Ultima Online. But as the aims of the project evolved and became more ambitious, the overall goal changed. Instead of one game, we instead decided build a flexible framework that would allow everyone to contribute their own unique ideas and goals to the Worldforge project, allowing a multitude of games to be created.

Vega Strike

Vega Strike is an Open Source 3D Action-Space-Sim that lets you trade, fight, and explore in a vast universe. Vega Strike is built on top of OpenGL and runs on Win/Lin/Mac platforms. Vega Strike (the game) is currently in a playable state, but both game engine and dataset are under continued development.

Warsow

Warsow is a completely free fastpaced first-person shooter (FPS) set in a futuristic cartoon-like world for Windows, Linux and Mac OS X.

httpvh://www.youtube.com/watch?v=vtJKrIngTIs

The Ur-Quan Masters

 

The project started in August 2002, when Toys For Bob released the partially ported sources of Star Control 2 3DO version to the fan community. Our goal is to port this wonderful game to current personal computers and operating systems. It is and will remain 100% free of charge, and anyone can contribute to the project and thus help make it even better.

Spring

Spring is a project aiming to create a new and versatile RTS Engine. Spring is not actually a game, but a powerful free cross-platform RTS engine.

OpenTTD

OpenTTD is an open source simulation game based upon the popular Microprose game “Transport Tycoon Deluxe”, written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.

Warzone 2100 

In Warzone 2100, you command the forces of The Project in a battle to rebuild the world after mankind has almost been destroyed by nuclear missiles. The game offers campaign, multi-player, and single-player skirmish modes. An extensive tech tree with over 400 different technologies, combined with the unit design system, allows for a wide variety of possible units and tactics.

0 A.D.

0 A.D. (pronounced “zero ey-dee”) is a free, open-source, cross-platform real-time strategy (RTS) game of ancient warfare. In short, it is a historically-based war/economy game that allows players to relive or rewrite the history of Western civilizations, focusing on the years between 500 B.C. and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D graphics, detailed artwork, sound, and a flexible and powerful custom-built game engine. This is an Age of Empires clone.

FreeCiv

Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization. The game commences in prehistory and your mission is to lead your tribe from the stone age to the space age.

LinCity

LinCity-NG is a city simulation game. It is a polished and improved version of the classicLinCity game. In the game, you are required to build and maintain a city. You can win the game either by building a sustainable economy or by evacuating all citizens with spaceships.

Simutrans 

Simutrans is a freeware and open-source transportation simulation game.Your goal is to establish a successful transport company. Transport passengers, mail and goods by rail, road, ship and air. Interconnect cities, districts, public buildings, industries and tourist attractions by buiding a transport network you always dreamed of. Control and watch your finances and the traffic of your vehicles and goods. Start in 1880 and finish in 2050. There will be new vehicles and buildings throughout this time.

Hedgewars

Hedgewars is a turn based strategy, artillery, action and comedy game, featuring the antics of pink hedgehogs with attitude as they battle from the depths of hell to the depths of space.

CUBE 2: Sauerbraten

Cube 2: Sauerbraten is a free multiplayer/singleplayer first person shooter, built as a major redesign of theCube FPS. Much like the original Cube, the aim of this game is not necessarily to produce the most features & eyecandy possible, but rather to allow map/geometry editing to be done dynamically in-game, to create fun gameplay and an elegant engine.The engine supporting the game is entirely original in code & design, and its code is Open Source (ZLIB license, read the docs for more on how you can use the engine). While you’re at it, you should check AssaultCube too.

The Battle for Wesnoth is a Free, turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.

Glest

Glest is a free 3D real-time strategy game, where you control the armies of two different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield. Glest is not just a game, but also an engine to make strategy games, based on XML and a set of tools. A few mods already exist.

UFO: Alien Invasion

It is the year 2084. You control a secret organisation charged with defending Earth from a brutal alien enemy. Build up your bases, prepare your team, and dive head-first into the fast and flowing turn-based combat. UFO: Alien Invasion is a squad-based tactical strategy game in the tradition of the old X-COM PC games, but with a twist. Our game combines military realism with hard science-fiction and the weirdness of an alien invasion. The carefully constructed turn-based system gives you pin-point control of your squad while maintaining a sense of pace and danger.

Extreme Tux Racer

Extreme Tux Racer is an open-source downhill racing game starring Tux, the Linux mascot. It follows in the path of Tux Racer and its derivatives.

 

This list is not set in stone and I’ll try and update it with some personal comments for each game that I’ve played and possibly more media and links, as well as add games that should definitely make this list but I somehow missed them, thus, if you have any notable mentions that you feel I shouldn’t have left out please feel free to let me know with a comment.

Tagged with:
 

 

Qt Creator

Leading rant:

Inspired by this post(read it because I am going to reference it) on the Wikitech mailing list I was inspired to write about Qt Creator, the IDE that I use for about an year now for almost any kind of C/C++ project and which I think it is pretty close to being a type 1 Integrated Development Environment, as written by Paul in that e-mail, which is a real and useful IDE, at least for my use cases. Qt Creator is a powerful and flexible IDE most useful for C/C++ code and especially when used in combination with the Qt SDK. However, due it’s extreme flexibility, Qt Creator can be tweaked to work with almost any kind of C/C++ source project, from the default qmake project files to CMake, GNU Autotools(the GNU Build System), standalone Makefiles or even custom commands for direct access command line steps for direct compiler and linkage directives.

While I prefer type 2 IDE’s for most of the day, which are powerful text editors like Vim for casual hacking or minor code modifications, which VIM excels at, especially with its modal mode, delving into an entirely unknown code base(especially a big one) or using new libraries and apis or for long coding sessions, in a simple text editor, even as powerfull as Vim or Emacs, things start to get inconvenient pretty easily and you will notice a slow down, mainly because of the poor code browsing, syntax highlighting(C++) and code completion capabilities that they posses. They are not to be blamed though and there’s also nothing wrong with them, they are simply text editors and not IDE’s. Since Vim is my favorite text editor, I tried various combinations of Ctags and CScope and all kinds of crazy hacks on top of that, just to be able to have code nagivation and code completion at least to some extent. You can find my Vimrc file in here, without Ctags and CScope, since that would make for entire post by its own.

However, I got tired of it after some time, especially because it doesn’t work that nice with some of the crazy quirks that C++ for e.g. exhibits and because I have to keep the databases that those tools use up to date frequently and manually, for every project that I am working on. For terminal only access, coding like this is fine, to some extent, however, this seemed really overkill on my desktop, especially since I am running an X desktop with a GUI and knowing that I could do better to be more productive in 2011.

Ok, let’s take a first look at how Qt Creator looks like in action, since I know I made you curious by now:

Now I’m going to list some of the strongest points and features that Qt Creator has and that I think make it stand out:

  • Open Source – http://qt.gitorious.org/qt-creator
  • Cross Platform – Works on Linux, Windows and Mac OS X like a charm
  • Actively developed and improved
  • Strong orientation and support for C/C++ native development
  • Excellent syntax highlighting
  • Magnificent code browsing and navigation in combination with useful and customizable keyboard shortcuts
  • Great and generic(works with any file you include, it doesn’t have to know anything special about it) code completion support
  • Easily customizable and Extensible through plugins
  • Support for integration with various Source Control Management tools like Git, Subversion, Bazaar, Mercurial, CVS and more.
  • Debugger integration with both GDB and Microsoft’s Debugging Tools for Windows through CDB (this one could use some improvement but it’s still better the debugging from the command line)
  • Custom configure, build, clean and deployment steps
  • Integration with tools like Valgrind
  • Per project settings
  • Vim editing mode
  • Code snippets
  • A pretty fast IDE, even when indexing hundreds of files with hundreds of thousands lines of code for the first time
  • Linux Man Pages context help integration – thanks to the flexible Qt Help System, this can be extended to almost any API

Although I only listed what I like the most on top of my head, Qt Creator has many cool and useful features and the only way to experience them all, is to start using it and you really should give it a spin, because as you can see, it’s feature list is nothing close to short. You can find some videos that show you some of the features I described above in action on Youtube, but keep in mind that they are kind of old(around 2009) and Qt Creator has very much evolved a lot since then.

The how to:

Now let’s get to the main purpose of this post, using Qt Creator with GNU Build System projects. A project that follows the GNU Build System usually is composed of a configure file and several other inputs(configure.ac, Makefile.am) that help in creating the Makefiles that will build the actual project on the target platform. The GNU Build System is, of course, much more then that, but for this tutorial, that’s all you need to know and because these steps will also work for projects that have only the Makefiles for e.g.

Next I’m going to show you how easy it is to use Qt Creator with the Nmap security scanner based on the steps outlined below:

  1. Download and install Qt Creator from http://qt.nokia.com/downloads. At the time of writing this, I’m using Qt Creator 2.2.1. I’m going to assume you’re going to be using Linux from now on, any distro should be fine as long as you are comfortable with it, however, I am using Debian(Squeeze). If you can’t make up your mind, just use Ubuntu. For Mac OS X and Windows steps should be similar.
  2. Decide on a project to use. I’m going to use Nmap since that’s what I’m working on currently and because it is the perfect example of a great open source project that’s low level enough to illustrate system programming using Qt Creator. You can download the latest version tarball from http://nmap.org/download(nmap-5.59BETA1.tar.bz2 is fine). After deciding on a project, you should install all of the development dependencies(the toolchain) that your chosen project needs, like the right compiler, libraries and other tools you might need. For Nmap, for e.g., we will need gcc, openssl libraries, libpcap, perl, python, etc. If you’re on a Debian like distribution(Debian, Ubuntu), luckily you can just do apt-get build-dep nmap and you get everything you need in one shot. If you do some tests builds from the command line, remember to clean the source tree before proceeding to the next steps, since you only want to add to the project only the base files and none of the auto generated files from the build system.
  3. Assuming you installed Qt Creator successfully, open it and go to File -> New File or Project -> Other Project and click on Import Existing Project. Advance to the next screen.
  4. In the current screen, give your project a name(that name will be used for your project files too so don’t go crazy with spaces or special chars) and select the location to your project source tree. In the nmap example, Nmap is a good project name and for Location browse to the path where you extracted the nmap source archive. Click on Next.
  5. The next screen, Project Management, is going to ask you if you want to use source control management(git, svn) for your project and if yes,then the project files will be the first to be added to the project. You should add these files to the scm repository only if you know that they would be usefull for others, otherwise you should keep them to your self, by using exclude directives like .gitignore files in git or svn:ignoreproperty in svn.  For the Nmap case, the project files are:
    • Nmap.config     – Project configuration settings like predefined Macros
    • Nmap.creator    – Qt Creator settings
    • Nmap.files         – A listing of all the files included in the project
    • Nmap.includes – Include directories
    • Nmap.creator.user – This one is excluded from adding to svn since it stores per user project settings.
  6. Assuming everything went fine, you should now have your project open in Qt Creator and ready to proceed to project settings. On the left side of Qt Creator click on Projects. Right now you’re looking at the Build Settings screen. This is where you set your project building and cleaning steps. For Nmap, the building process is made of the configure step and the make step. The clean process is made of the make cleanstep. Let’s add these steps to the build settings:
    1. On the Build Steps section click on Add Build Step -> Custom Process Step. Click on Enable Custom Process Step checkbox and add the following command to the Command: text box: ./configure. Move this step to the top of the stack by clicking on the upper arrow that fades in when you hover the build step. This step, the configure process, can only be run once and then disabled, since you don’t really need to run it again unless you run make distclean or modify the build system.
    2. Now expand the Make step and deselect the all checkbox in the Targets section. We don’t need that argument for Nmap, since Nmap’s Makefiles doesn’t have an “all” target. Now all the make step will do is issuing the make command.
  7. Now let’s proceed to the deployment steps, the Run Settings tab next to Build Settings, assuming that you would want to run Nmap in a basic form after a successful build just to know that everything runs smoothly. However for most cases, with tools like Nmap that have dozens of command line arguments you’re better of with running from an external terminal window, instead of modifying the arguments all over again in Run Settings when you need them changed. For this case, we’ll just want to run nmap with the version argument, ./nmap -V:
    1. In the Executable: text box input ./nmap.
    2. In the Arguments: text box input -V.
    3. Enable the Run in Terminal checkbox.
  8. Switch over to the Edit mode on the left sidebar and press Ctrl^Shift^s to save your changes and start Building by pressing Ctrl^b.

Wait for the build to finish and you are ready to run your executable by pressing Ctrl^r. In Nmap’s case you should see a window popping with Nmap version output:

That’s it! This is how simple it is to use Qt Creator with a project like Nmap, that has nothing to do with Qt or qmake whatsoever, all you need to do, is know a little bit about the specific project’s build process and toolchain and describe them to Qt Creator as build steps.

I’ve been using this process on many non Qt projects like John the Ripper, skipfish, VCMI(Heroes 3 oss clone), GNU Coreutils and many more besides Nmap, of course, projects which are in both C and C++ and all I can say is that Qt Creator helped me a lot in the cases where a text editor didn’t(and shouldn’t try to) excel at. None of the other choices available as free and open source IDE’s out there could match Qt Creator in my opinion and I really hope that the Creator will continue in the same manner it has so far, free and open source, cross-platform, actively developed and supported, flexible and not locked to the Qt framework. Here are other alternatives to Qt Creator that I’ve used in the paste and still use from time to time for specific certain tasks that they do well besides Qt Creator and adhere at least to the open source, cross-platform and good for native development rules:  KDevelop, Code::Blocks, Anjuta and Geany (no, I’m not going to mention Eclipse and Netbeans since they are not that good for native programming).

All in all, Qt Creator is a great IDE for general C/C++ development and even if it can’t currently beat the behemoth that is Visual Studio in certain aspects, it wouldn’t even be fair to compare them until Visual Studio will strive for cross platform compatibility, multiple compilers and debuggers support or the ability to use multiple revision control systems.

Give it a spin, you won’t regret.

Tagged with: