Thursday, February 5, 2009

How to use XFLR5 in Linux

The XLFR5 is a easier to use interface built on top of the X-foil engine. The X-foil also features wing and whole airplane analysis functions.

The downside of the program has been that is only available for Windows. However, it can be run nowadays in Linux without porting the program to e.g. Qt (which is a big task), so in the mean time before any cross-platform version appears, you can live with the wine in Linux environment:

- Make sure your wine version is a pretty recent one, version greater than 1.0.

I am using the Ubuntu Intrepid version. apt-cache policy wine reports the following:
wine:
Installed: 1.0.1-0ubuntu2
Candidate: 1.0.1-0ubuntu2
Version table:
*** 1.0.1-0ubuntu2 0
500 http://archive.ubuntu.com intrepid/universe Packages
100 /var/lib/dpkg/status
W: Duplicate sources.list entry http://archive.ubuntu.com intrepid/universe Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_intrepid_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://archive.ubuntu.com intrepid/multiverse Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_intrepid_multiverse_binary-i386_Packages)

If you are running the latest stable Ubuntu (Intrepid - 8.10), you can use the Ubuntu supplied one and it will work fine with XFLR5. However, if you are running Ubuntu Hardy or some other distro that does not have the post-1.0 version available, you can install it from winehq repository. For debian based distros like Ubuntu, the instructions can be found from here:

http://www.winehq.org/download/deb

Our living room computer is not yet updated and it is still running the older Hardy. I updated the wine by adding the following line to /etc/apt/sources.list:

deb http://wine.budgetdedicated.com/apt hardy main #WineHQ - Ubuntu 8.04 "Hardy Heron"

Then I did apt-get update and apt-get install wine

The new version of wine got installed and the XFLR5 started working fine.

Download the XFLR5 from here:
http://xflr5.sourceforge.net/xflr5.htm

Go to download page and click download. At the time of writing this, the 4.15 was the latest version.

Download the zip file XFLR5_v415.zip to a new subfolder into your home directory, because the zip file does not contain directories and when you unzip it, if you was in your home directory, you get the package contents directly there which messes up your home with lots of unnecessary files.

Run the XFLR5_Setup.exe by typing on a terminal:

wine ./XFLR5_Setup.exe

The setup runs and finishes.

After this you can notice that a new entry appeared to your Applications menu (in Gnome):
Applications - Wine
Select submenu Programs, and there XFLR5 and on that submenu XFLR5.
XFLR5 should now start successfully.

It works on my computer without problems now.

3 comments:

Exo Cruiser said...

Sometimes I just wonder why the Linux people just can't install one computer to run Windows? And why do the Linux people copy everything from Windows?

Unknown said...

Claim 1: Because Windows is bad. Some program I need made for the inferior OS is not an excuse to use the inferior OS.

Claim 2: Simply not true.

Unknown said...

By the way, in addition to Linux, I use Mac. I am typing this from iMac. Using wine is easier in Linux than on Mac, and besides of that there is a Qt-version of the XFLR5 coming after all now as Nokia made Qt LGPL (it is announced on the XFLR5 dev forum).

Why would I install Windows on some computer? I would need to pay for a Windows license just to run some old version of XFLR5 which does not yet work on Linux or Mac.

Paying the Windows license (because it is inferior OS compared to either MacOSX or Linux) would be money for nothing. I am not that rich, I have lots of better uses for money. For example for getting the Snow Leopard and iLife 09...

I can run about all software I need on the combination of the Mac and Linux, and I do all the gaming on a Playstation 3 so I don't care about Windows games. I run X-plane of course on Linux and Mac. Mac is more flexible because it doesn't suffer from multiple OpenGL context problem and I can run two OpenGL programs (the plane maker and the sim) at the same time. To sum, there is very little if any use for Windows OS in any use.

The new version compiles on Linux and Mac and I have it already running on my work Linux laptop (you know, all development for Maemo happens on Linux).

Haven't yet compiled it (the QFLR5 branch) on the Mac, it requires a little patching to avoid a compilation error which results from a missign macro which would come from windows.h in the Windows, so I haven't done it yet on the Mac side as I use the Linux computer for all kinds of development work usually, and the Mac is mainly for making music and videos.

And of course, last but not least, Kate has concluded our house to be a Windows-free-zone. One shall not connect to our home network any Windows computer which is a security threat with viruses, worms etc. It would be pretty hard to use any Windows machine without networking. To make running the Windows safe, we would need to setup a more complicated firewall and we don't want to get into that game, it is a swamp where there is no other side visible. Easier just to have a rule - never connect any Windows machine to our home network. It is safe and effective and easy.