Friday, September 17, 2010

Flash Player Square: Native 64 bit support

On 15 September, Adobe announced in a blog the availability of Flash Player Square: A preliminary release of a future version of Flash player offering full native 64 bit support.

You can find additional information about its features, as well as links to download this version on the Adobe website.

Since the installation instructions for Linux are rather terse, I wrote the following instructions for those wishing to install the player on computers with Ubuntu.

Install Flash Player "Square" on Ubuntu 10.04 x86_64




If we have a look to the filesystem of our computer running Ubuntu looking for the location of the Flash player related files, you will see references to it in multiple sites. We can also note that the installation has been done using the alternatives way, which we will benefit from in the installation of Square. Using alternatives we are going to install the prerelease version without removing the stable one. This is precisely the purpose of alternatives: To allow several pieces of software offering the same service to coexist without interfering to each other.

In the filesystem we can observe the following entries related to Flash Player (Remember that we are talking about a 64-bit distribution):

First, the library containing 32-bit version of the player:
/usr/lib/flashplugin-installer/libflashplayer.so


Furthermore, something to run the player through a wrapper. This wrapper allows the execution of 32-bit code on 64-bit environments:
/var/lib/flashplugin-installer/npwrapper.libflashplayer.so

And finally, the references used by various applications that may require the flash player:
/usr/lib/iceape/plugins/flashplugin-alternative.so
/usr/lib/iceweasel/plugins/flashplugin-alternative.so
/usr/lib/firefox/plugins/flashplugin-alternative.so
/usr/lib/midbrowser/plugins/flashplugin-alternative.so
/usr/lib/mozilla/plugins/flashplugin-alternative.so
/usr/lib/xulrunner-addons/plugins/flashplugin-alternative.so
/usr/lib/xulrunner/plugins/flashplugin-alternative.so


Note that the previous references are just symlinks to files in the directory that stores the configuration of the alternatives tool:
/etc/alternatives/iceape-flashplugin
/etc/alternatives/iceweasel-flashplugin
/etc/alternatives/firefox-flashplugin
/etc/alternatives/midbrowser-flashplugin
/etc/alternatives/mozilla-flashplugin
/etc/alternatives/xulrunner-addons-flashplugin
/etc/alternatives/xulrunner-flashplugin


All these entries are also symbolic links. This time pointing to a single target: The 32-bit version of the player ready to be executed through the wrapper:
/var/lib/flashplugin-installer/npwrapper.libflashplayer.so


In the next steps, we are going to install the Square version of Flash player using alternatives. Doing thing in this way, we do not need to uninnstall the current version. Additionally, if something goes wrong we can easily go back to the stable version.

Installation steps:

Go to the download page from Adobe and get the 64-bit version for Linux.

Then, create an installation directory (with a name and location consistent with the stable version) in order to uncompress the new player there.
sudo mkdir /usr/lib/flashplugin-square
cd /usr/lib/flashplugin-square
sudo tar -xzf ~/Descargas/flashplayer_square_p1_64bit_linux_091510.tar.gz


Install the alternatives for those programs that are going to use the new player. Note that Firefox does not use the entry called firefox, but the mozilla one. If you want to do some testing with Firefox, just execute the following command:
sudo update-alternatives --install /usr/lib/mozilla/plugins/flashplugin-alternative.so mozilla-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60


Restart the browser and you will have the 64-bit flash player (version 10.2.161.22) ready to be used with no wrapper.

At any time we can switch between the two versions with the following command:
sudo update-alternatives --config mozilla-flashplugin


And finally, if we to use the Square version of Flash player in any other product, just repeat these operations for the product in question
sudo update-alternatives --install /usr/lib/iceape/plugins/flashplugin-alternative.so iceape-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/iceweasel/plugins/flashplugin-alternative.so iceweasel-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/firefox/plugins/flashplugin-alternative.so firefox-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/midbrowser/plugins/flashplugin-alternative.so midbrowser-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/xulrunner-addons/plugins/flashplugin-alternative.so xulrunner-addons-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/xulrunner/plugins/flashplugin-alternative.so xulrunner-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60


After several tests we obtain excellent results: The player is very stable (no crashes) and everything seems to work properly.

If you want to do some kind of benchmark test or comparison, we recommend you to have a look to this site.

(You can find a Spanish version of this entry here)

Update (20110117): Updated the download link pointing to the new download location.

No comments: