View unanswered posts | View active topics



Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next
FlashDevelop 4 Mod for Wine on Linux 
Author Message
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
What is Wine?
Wine is a compatibility layer that allows users install and run Windows applications on other operating system, especially Linux.

Why I created this mod?
Basically, FD4 can be installed and run on Linux via Wine. However, there are some incomplete or unimplemented features in windows-substitute libraries of Wine that prevent FD4 from running properly. Besides, there are some features in FD4 that were hardcoded for Windows operations (for e.g. file browsing, command line...) and that should be modified to work with Linux native ones.
For those reasons, I have decided to modify some parts of FD4 to make it work better on Linux.

Why running FD through Wine instead of full virtualization?
Although there are still a lot of issues and it may run slower on Linux through Wine, there are some advantages you may consider:
- You don’t need to own a copy of Windows
- Less resource usage, you computer don’t need to spend extra RAM & CPU for Windows OS virtualization
- Better integration with native OS (without bridge): drag & drop file from Linux (currently just from Nautilus to FD), run / debug with native Flash Player, open files with native applications...

SCREENSHOT: http://twitpic.com/5467ep/full

CURRENT MOD FOR: FlashDevelop 4 RTM (viewtopic.php?f=11&t=9252)

HOW TO INSTALL AND USE
My tutorial is based on Ubuntu 11.10 64-bit (32-bit should be the same). Please adapt if your Linux distro is different.

1. Install Wine 1.3+
Visit http://www.winehq.org/download/ for download and install instruction. For Ubuntu users, I recommend install it via PPA.
(tested with Wine beta 1.3.28, may work with newer versions)

2. Get winetricks script and place it at home folder: http://winetricks.org/winetricks. (On Ubuntu wintricks is installed together with Wine 1.3 from PPA)

[NEW]
3. Download and run my interactive script to install FlashDevelop4 and WineMod automatically.

Open your terminal and type in below commands:
Code:
~$ wget -N http://int3ractive.com/get/fd4winemod
~$ chmod +x fd4winemod
~$ sh ./fd4winemod

(if you run the script in a sub-folder, make sure winetricks script is in the same folder or it can be find in $PATH environment)
After installation, configure Flex SDK and try compile and test an AS3 project.
_________________

What work (all basic functions):
- Code editing
- Code hinting & completion
- Create, manage projects
- Search & replace
- Plugins
- Compile & debug (advanced)
- Drag drop files from Nautilus to project manager (currently not the other way around)

What have been patched/fixed:
- Write automate script to reduce hassle of setting up
NEW: Installer script let user install Trace plugin optionally.
- Set default layout with floating panels to work around docking issue
- Fix tooltip’s height and blank issues
- Fix missing tool bar issue (although tool bar now will appear on top of menu)
- Fix document editor resize issue (when you resize the main windows or just start FD, the opened documents don’t update with new size)
- Open native command prompts
- Explore folders with Nautilus (Since r2044, Native Explorer should work every where)
- [Integrate to trunk, no more separate patch] Patch fdbuild so that FD will not crash when start compiling projects.
- Fix if FD is minimized and restored, the combobox Debug/Release on tool bar disappear
- When creating new project, you can now create new folders via folder tree view dialog <- This is a Wine bug and it is fixed inrecent Wine version

What doesn’t work / known issues:
Of course there are a lot of issues when running on non-native environment. Below are just some remarkable:
- Docking panels on main windows (That why I detach all of them via LayoutData.fdl)
- Scrolling for long tool tips (because the patch deliberately disables scroll bars of tool tip)
- Shell menu (DO NOT try to access it)
- If FD is minimized for a while and then restored, the floating panels doesn’t seem to remember its last normal size and appear very small.
- Buggy behaviours when trying to create files, folders in subfolders from Project Manager
- [NEW] Popup windows sometimes appear at wrong position. This is a Wine bug that start to occur with new Unity in Ubuntu 11.10.
- [NEW] Tooltips may appear cropped if the UI font size is not integer (i.e 8.25pt). -> Work around: go to Tools > Program Settings > FlashDevelop (click away and then click FlashDevelop again) > At UI Default Font > Select a integer font size (for e.g. 9pt)

FEATURES NOT LISTED ABOVE CAN BE CONSIDERED NOT TESTED YET

Plan for next releases:
- Try to fix some of the above know issues.
- Improve automate installation script
- Include more goodies (read: plugins, template) that default FD4 doesn't include
- Investigate if ToirtoseSVN & source control plugin work
- Investigate ways to improve project manager’s folder and file handling. (May consider using Linux bridge)

Downloads:
This mode only apply to a specific revision of FD4:
- FD4 R2188 (i.e FD4 RTM) WineMod: http://code.google.com/p/thanhtran-sour ... od.tar.bz2
(If you want to install it manually and look for the .patch file)

Archive: Go here if you want to download old mod: http://code.google.com/p/thanhtran-sour ... loads/list
----
Use this mod at your own risks. Please let me know your experience with FD on Wine/Linux and recommend any issues that should be fixed first.

_________________
You know who.


Last edited by ttt_conan on Mon Jan 09, 2012 8:26 am, edited 12 times in total.



Mon Jun 13, 2011 5:13 pm
Profile WWW
Member

Joined: Tue Jun 05, 2007 9:26 am
Posts: 54
Hi,

Tried your setup on Natty and everything went smooth, even the panels dock OK

I used the installer to download the SDK and it worked.

Image

I then created a Flex4 project and try to compile it and SUCCESS!!!

Just a side note, I only can get it to work when launching from terminal, even when a create the launcher it still fails to compile.

Thank you for all the hard work, there is no excuse now to make the big jumb :D


Wed Jun 15, 2011 10:30 pm
Profile
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
Based on the screenshot you attached, it looks like the debugger cannot initialize due to JRE problem. Have you added environment variable JAVA_HOME ?

_________________
You know who.


Thu Jun 16, 2011 5:23 am
Profile WWW
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3034
Location: Finland
Could you create a patch file against the latest trunk so that we could validate the possibilitites of trunk integration of the required changes?


Thu Jun 16, 2011 6:37 am
Profile WWW
Member

Joined: Tue Jun 05, 2007 9:26 am
Posts: 54
I did inserted the enviroment var and then test it in the console and it was OK.
I didn't test the debugging cause it was kind of late for me :)

Can we bundle that standalone java into the installer? I mean is it legal?
I didn't search enough but if its possible, by reading the registry, to know that the installer is in a wine system, with that information the installer can provide all the stuff we need, or just add a section to do that, I can make that hack in the nsi.

Or just a make a dedicated wine installer.


Thu Jun 16, 2011 9:32 am
Profile
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
@ Mika: I'll prepare the patch soon. I'm wondering what is your strategy to integrate the patch because some of them may not be suitable for the mainstream build? I have contacted Phillippe to address some issues that should work for both builds but some are only suitable for Wine. Therefore, I intend to maintain this mod in parallel with the main build.

@ tiagojanz: I think the easiest way to prepare the Wine installer is to write a bash script file which will do all the download, installation and configuration. If you know bash script, you can help writing for some steps.

_________________
You know who.


Thu Jun 16, 2011 2:11 pm
Profile WWW
Member

Joined: Tue Jun 05, 2007 9:26 am
Posts: 54
This is the error I have when it trys to compile the project when flshdevelop is launched by the desktop launcher.

Unhandled Exception: System.IO.IOException: Parametro inválido

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.Console.set_OutputEncoding(Encoding value)
at FDBuild.Program.Main(String[] args)


Thu Jun 16, 2011 7:34 pm
Profile
Member

Joined: Wed Feb 02, 2011 12:13 pm
Posts: 2
Nice work on this...can't wait for FD to be more stable under Ubuntu


Fri Jun 17, 2011 5:04 am
Profile
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
I've just uploaded new patch for FD4 rev1944.
This patch also includes some new fixes:
- FD crash when start compiling
- Debug/Release combobox on tool bar disappear when resized/minimized

Source code patch is enclosed in the download.

_________________
You know who.


Sat Jun 18, 2011 1:55 pm
Profile WWW
Member

Joined: Tue Jun 05, 2007 9:26 am
Posts: 54
Patch applied :D
Now I can launch FD by the desktop launcher and compiles fine.
One thing I noticed is if I try to compile a second time it crashes.
Other thing strange is that code completion is screwed, I only have local vars, not even inherited, code completion was fine last time I tried before the patch


Sat Jun 18, 2011 4:05 pm
Profile
Member

Joined: Fri Sep 28, 2007 11:32 am
Posts: 7
I've installed it on Ubuntu 11.04 following your instructions and it worked a lot better than my previous attempts.
The panels keep acting funny, but changing back and forth between them, makes them show the right items.
Also, I had the weird acting autocompletion bug, but it was gone after a FlashDevelop restart and I wasn't able to reproduce it again.
I've made a blog post in spanish for anyone interested. http://camboris.blogspot.com/2011/06/in ... -1104.html

I was wondering if it's possible to use FD Bridge to compile natively in linux, instead of installing the jre and compiling under Wine.


Sat Jun 18, 2011 11:46 pm
Profile
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
@ tiagojanz: Make sure you uninstall existing FD4 (using program Uninstall Wine Software) before installing new one and applying new patch. I've tried compiling second time without any crash and program works as expected.

@ marioGP: Thank you for spreading the words. Let's make Linux a more friendly platform for Flash dev. :)

Regarding auto complete bugs, it is likely those bugs are from the main application itself (FD4 is still in beta, remember). I my patch hasn't touched that part of the program.

About compiling with native Linux, I think it's a possibility since fdbuild can be run with Linux's Mono. I'll look into that in next builds.

_________________
You know who.


Sun Jun 19, 2011 3:55 am
Profile WWW
Member

Joined: Sun May 11, 2008 3:01 pm
Posts: 895
Hi, the link to FD4 R1944 official build seems to be broken, do I need to make any changes, if I build it myself / download one from the FD download page?
Thank you!

EDIT: Just for the record, I've got it working on Ubuntu 10.4 (yeah... I'm lazy :)) 64 bit. I can see some glitches in panels / docking (mostly related to that some panels won't expand to the full size) but overall impression is very nice. If you have any insights of how to get FlashDevelop to work with command line, I'd try to update Ant plugin to do that, and that would cover my needs in building projects more then entirely, I think :)
Thanks again!

_________________
http://www.couchsurfing.com/people/wvxvw


Mon Jun 20, 2011 6:24 pm
Profile
Member

Joined: Thu Aug 28, 2008 3:16 pm
Posts: 47
Location: Ho Chi Minh city, Vietnam
The download seems to be removed from the host. I have reuploaded the official build here.

Regarding command line, you can start gnome-terminal from FD's tool bar right now. Being able to use ANT panel is a good idea. I'll look into that.

_________________
You know who.


Tue Jun 21, 2011 1:59 am
Profile WWW
Member

Joined: Wed Jun 22, 2011 8:19 pm
Posts: 2
Hello!

I followed the instructions to the 8th step, so I was expecting to able to open FD without problems.

But I'm getting lots of messages like:
"Unable to load an incompatible plugin: C:\Program Files\FlashDevelop\Plugins\ResultsPanel.dll"
for exactly 23 different dll files, all in same folder as above.

Did I forget anything? Is it fixable?


Thanks!


Wed Jun 22, 2011 8:24 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 36 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.