This blog has moved to a new location! http://iqandreas.github.com/
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, January 17, 2012

Ubuntu: Adding FDT to the list of Applications

This post can be found on the new blog at Ubuntu: Adding FDT to the List of Applications
In this guide, we will add FDT to the list of installed applications, and optionally, install a script which "resets" the internal SWFViewer in case it won't open after closing improperly.




The following guide was written for 32bit FDT5, but may still work for future or previous versions of FDT. These instructions can of course also be used for any application that doesn't come with an Ubuntu installer, adjusting the  files appropriately.

If you are running Ubuntu, I'm assuming you already know how to use the basics of the command line and how to manipulate (create, delete, change permissions) of files. If anyone wants more details, post a comment and I'll clarify.

I'm assuming you have already downloaded FDT (they have a free version if you aren't already using FDT) and extracted the archive.

I would recommend saving the files to /opt/fdt5 (may require admin access, which is easily done without messing with the command line by running  gksu nautilus , assuming you are still using the default file browser) Depending on what extraction tool you use, you may also need to change the permission settings for the files to allow access for all users.

Download the FDT5 Launcher files

If you want to do this the easy way, download the pre-made files from the GitHub repository and install them to the locations specified in the README.
https://github.com/IQAndreas/FDT-Ubuntu-Launcher-Files/zipball/master

You are all done. Enjoy!

Alternatively, you can do all the dirty work yourself (if so, keep reading).

Creating the FDT5 Launcher Files manually

Create a new file named FDT5.desktop with the following contents:


If you want the file to be available to all users of the computer, save the file in /usr/share/applications/
Alternatively, if you only want the currently logged in user to have FDT show up in the application menu, save the file to ~/.local/share/applications/

Next, create the following script, and save it as /usr/bin/fdt5


Note that the script may be a tad more complicated than it needs to be, but this is the script I'm using since I had to jump through a few hoops getting FDT to work properly in Ubuntu.


You also need to set the icon for the application. The default Eclipse icon is okay, but on my system, both Eclipse for Java and FB4Linux use that same icon, so I would prefer being able to tell them apart.

I included FDT's fancy, blue dodecahedron icon in the repository, used with permission from Powerflasher GmbH. You can use the icon provided in the repository, or use your own, but which ever icon you use for FDT, make sure to save it to /opt/fdt5/fdt-icon.png

Finally, if you want FDT to stay in the launcher bar, start up FDT, right-click the icon in the launcher, and make sure "Keep in Launcher" is checked.



Cleaning the SWFViewer settings

If the built in FDT SWFViewer quits improperly (which happens from time to time when running into AS3 errors) it will not open the next time you run the SWF. The solution is to delete a few config files for the plugin, which is a simple task, but gets annoying when you need to constantly delete the files.

The following script will delete said config files (assuming FDT is installed to /opt/fdt5 as recommended) though I wish FDT had a button for this inside the IDE instead.


Save the script to /usr/bin/fdt5-clean and run it by typing fdt5-clean into the command prompt. The script does not require admin rights to run as long as your FDT install folder has full permission for all users.


Leave any further questions or problems in the comments and I'll try to help sort them out.

Sunday, April 11, 2010

[Solution] Flash sound stops working in FireFox on Linux Ubuntu 9.10

If you leave the browser open for too long, pretty soon all Flash content on all sites will no longer give off any sounds. Luckily, the fix was easy, just restart FireFox and you will be good as new. However, it still gets REALLY annoying, especially when you have 25+ tabs open (maybe that's what was causing the sound problems after too long?).

This would happen on a completely clean LiveCD system as well as the full installation with the following specs:
Ubuntu Linux 9.10
FireFox 3.5.8 with no extra add-ons installed
Flash Player 10.0.45.2


Instead of debugging and finding the source of the error, I took the easy way out and installed Flash Player 10.1 (currently in Beta I believe?)
http://labs.adobe.com/downloads/flashplayer10.html

I have been running FP 10.1 for almost two weeks now, and still haven't had any sound problems. :)


I could file a bug report for these old problems, but considering how much Adobe ignores Linux users, I doubt they would go back and update Flash Player 10.0 for these fixes. Instead, I'll file bug reports only if I receive problems in the new version.

See also blog entry Adobe TV crashes FireFox on Ubuntu 9.10

Wednesday, April 7, 2010

[Solution] Adobe TV crashes FireFox on Linux Ubuntu 9.10

I have no idea why, but whenever I would access AdobeTV, as soon as the video started loading, FireFox would freeze up and need a restart. Every single time.

This would happen on a completely clean LiveCD system as well as the full installation with the following specs:
Ubuntu Linux 9.10
FireFox 3.5.8 with no extra add-ons installed
Flash Player 10.0.45.2


Instead of debugging and finding the source of the error, I took the easy way out and installed Flash Player 10.1 (currently in Beta I believe?)
http://labs.adobe.com/downloads/flashplayer10.html


Perhaps the new Flash Player version will also fix some other issues I have had:
  • Playing sound stops working completely, and needs a browser restart in order to work again  [Yep. Fixed!]
  • SWF projects using computeSpectrum will not work (the sound plays, but it doesn't do anything on the stage)  [Hm... Still seems to not work...]
  • In the standalone Debug version of the player, even if you hit "Dismiss All", some errors will show up again, and no matter how fast you dismiss the errors, the dialog will keep popping up, forcing you to kill FlashPlayer manually  [No problems so far] 
  • Constant "flickering" between layers when playing games or apps with several layers  [Problem persists even in FP10.1]

I could file a bug report for these old problems, but considering how much Adobe ignores Linux users, I doubt they would go back and update Flash Player 10.0 for these fixes. Instead, I'll file bug reports only if I receive problems in the new version.

Thursday, March 25, 2010

Getting started with Flex/Flash Builder on Linux

"Windows Restore cannot continue. Please contact the manufacturer if this problem persists."

With those words I realized that my temporary fling with Linux had gone from a fun single date to a forced marriage proposal and an unexpected commitment. Yep, I am stuck with Linux for a while, and hopefully not for an entire 9 months.

It's not that I hate Linux, in fact I love using Linux, but I'm never getting those three hours of my life back spent on trying to get Flash CS4 working in Wine.


Instead of sitting on my hands doing nothing, I'm going to get back to Flash development. Since Flash Professional CS4 is now out of the question, I guess my next logical option is Flash/Flex Builder.

For anyone else getting started with building for Flash Player or AIR on Linux, I have compiled a small pool of information, so you don't have to dig through dozens of different sites for hours trying to make heads and tails of it all and sort it all out. Note that I have only been working with Flash in Linux for about two weeks, so please correct me (by leaving a comment) if I give any faulty or incomplete information.


What is Flex Builder 3 for Linux?

First of all, Flex Builder (now renamed Flash Builder so it won't be confused with the Flex SDK) is a plugin that Adobe developed for the already popular development environment Eclipse. Most of the features, such as code hinting, were already developed by the Eclipse team, so Adobe can safely charge almost $300 for relatively little effort. Of course, they also added a few new features to the plugin beyond Eclipse's current capabilities, and they didn't charge the full $700 for Flex Builder, so I will cut them some slack.

In an effort to connect to developers of all platforms, (and considering how Eclipse is already available in Linux, all they had to do was update the plugin to match) Adobe released Flex Builder 3 for Linux (currently alpha version 5). Note that Adobe considers this plugin separate from the "regular" Flex Builder. According to Adobe, "Although many of the features in Flex 3 are included in the Linux release, there are several features that are not yet included. Our main goal is to get the base features in place and then to solicit user feedback and their priorities for additional features, such as the profiler or design view."

Although it sounds like Adobe is making a great effort at making this world a better place, Adobe seems to have abandoned the project. Aside from releasing the alpha 5 version in November of 2009 that extended the trial period (from 1 Dec, 2009. I'm not sure of the new trial expiration date), there hasn't been any updates for Linux users since April 2009.

Despite the recent release of Flash Builder 4, Adobe still has not updated the Linux version, and the reply of choice when asked is "Adobe has not yet announced a release date for the Flex Builder Linux product."

Am I being too hard on Adobe? If you feel offended, please tell me, and then show me what progress they have made and steps toward finishing the Linux version. Then I will go back and correct any hateful remarks.


That's horrible! We need to do something!

The valour is honourable, and if you really feel like it you can vote on this bug:
http://bugs.adobe.com/jira/browse/FB-19053
However, unless you hold a major share of stock in Adobe, I doubt they will do anything about it. They will either drop the project, or will reinvest in it once it becomes obviously financially beneficial to them.


Oh well, I guess FB3 Beta is better than nothing

That's the spirit! The FlexBuilder trial can be downloaded from Adobe's site:
http://labs.adobe.com/technologies/flex/flexbuilder_linux/
The installation process is pretty straightforward. Remember to have Eclipse installed first, as the installed only includes the plugin. Eclipse can be found here:
http://www.eclipse.org/downloads/

WARNING: Several people have trouble installing the plugin on Eclipse version 3.5! (including me at first) Although there are fixes for this, it might be better to install version 3.3.

In Ubuntu, it should be as simple as going to "Applications > Ubuntu Software Center" and installing it from there (worked for me). If Eclipse doesn't show up in the list of available programs, make sure you have marked all the software sources in "System > Administration > Software Sources". If you have any problems, this walkthrough might be able to help (he beat me to writing the tutorial):
http://kbala.com/install-adobe-flex-builder-linux-alpha-in-ubuntu/
(and a second tutorial in case the first one wasn't enough)
http://www.insideria.com/2008/04/step-by-step-setting-up-flex-b.html


What about Wine?

I'm not complaining that much about Adobe... oh... you mean. Yes, I see now. My failure with Flash Professional and Wine caused me to give up, and I didn't even think about using it with Flash Builder. This section wasn't even added until after my try with fb4linux, so I have not personally tested this yet.

According to their website, Wine should be able to emulate Both Flex Builder 3 and Flash Builder 4 fairly well. It's definitely worth checking out.

This guy seems to have accomplished it, and has written a guide:
http://diariolinux.com/2009/06/22/how-to-install-flash-builder-on-linux/


So what other alternatives are there?

One name that appears a lot is Aptana (which I believe is free) and also Eclipse based. I still have not tried it, and I'm not sure how full fledged it is, so I would really appreciate any opinions on it or trustworthy reviews of it to link to.

Another one I have seen links to is IntelliJ IDEA, however, this one has a price tag of $249. They have a free "community version" on their site, but I have no idea of the difference between the two. According to their site, it should incorporate well into Flex without any major modifications. [source] This one I have not tested either, and would really appreciate any reviews.

AXDT seems to be another Eclipse plugin. No experience with that one either, but it uses the Flex SDK, so it should have about the same amount of features as if you were using FlashDevelop and the SDK.

FlexBean another plugin, but this one for NetBeans. Likely similar to AXDT.


Screw Adobe! I want Flash Builder 4 in Linux now!

I was hoping you would want that. Finally, there is Flash Builder 4 Linux (I'm not sure if the 4 is to match the version number of the newest Flash Builder, or if it's supposed to read "for").

This release is NOT by Adobe. This is a port of Flash Builder to Linux. I'm still not sure exactly how it is ported (possibly because Eclipse plugins are operating system independent due to being Java-based, and all they did was copy the data from the Windows version to the Linux version, however, I believe there was a bit more involved)

If you need hand with the installation, this site has a small tutorial:
http://mayboroda.blogspot.com/2009/11/flash-builder-on-linux.html


What now? It's installed, I want to learn Flex in Linux!

I'm still trying to dig up links for this. The good thing is most tutorials that work for Flex Builder should work just the same for the Linux version.

I have however found one video that specifically names Linux - Getting started with AIR on Linux. It's 'hosted' by Mike Chambers, and even though he says he has planned on releasing future tutorials on Linux development, I have not found any. GotoAndLearn has several other great videos on Flex development as well.


Additional reading

You could get these yourself from Google, but then you have to sort through which ones are on topic and which ones are just wasting bytes on a server.
http://gruchalski.com/2009/04/22/flex-builder-3-for-linux-on-hold/
http://www.infoq.com/news/2009/05/flex-builder-linux-dead
http://rachaelandtom.info/content/flex-builder-linux-canned-and-how-you-can-help-get-it-going-again
http://www.insideria.com/2009/06/flex-builder-linux-and-open-so.html


So what about you? Can we expect more Linux tutorials?

Definitely! If Windows keeps being evil, I'm likely to stay in Linux for a while, so hopefully I can be of some help to others who are also using Linux and developing for Flash.

I'm in the process of downloading Flash Builder 4 Linux right now, so I will give a full review and maybe even a guide some time soon!

I also got my hands on SWF Protector. Thank goodness they have a Linux version. Once I get everything up and running, I will give my thoughts and hopefully also a performance evaluation on how well it runs. There will also be both a drawing and a competition for free licenses, so stay tuned!


Any links or alternatives I missed?