View unanswered posts | View active topics



Reply to topic  [ 117 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
FlashDevelop For Linux Effort 
Author Message
Member

Joined: Thu Aug 21, 2008 10:13 pm
Posts: 119
Reply with quote
After several patches, I managed to put FlashDevelop *sort of* working on Linux.
The clean patches were already posted, and may end up in FlashDevelop's official source code. EDIT: They were already in the official source code as of revision 155.
The whole application is highly vulnerable to exceptions.
Most importantly, the lack of a docking system renders the whole interface mostly useless and the lack of the scintilla control makes it IMPOSSIBLE(notice I didn't use the word "hard" here, I used impossible).

TODO:
- Provide clean patches rather than fast and buggy solutions.
- Create a pseudo-scintilla control on top of plain text editor control.
- Try to make WeifenLuo work under Linux.
- Fix exceptions errors and provide support for standard FlashDevelop plugins. StartPage will be a good starting point.

I *intended* to post both the application and the source code, but I'm having trouble uploading it(the zip has 10.8MB and Google Pages doesn't seem to like it). So, I'll just post a screenshot for now:

FlashDevelop For Linux - Proof-of-Concept 1 (fd-linux-a1pre)
Image


Tue Oct 07, 2008 8:44 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
You can use DropBox (a very nice synchronization tool) to share large files.

I think scintilla wrapper could be ported. Scintilla is widely used under Linux (I'd say most Linux editors are using scintilla). And most of the work of the wrapper is to send messages to the native component.


Wed Oct 08, 2008 8:05 am
Profile WWW
Member

Joined: Thu Aug 21, 2008 10:13 pm
Posts: 119
Reply with quote
I am trying to start with very simple things and then slowly update FlashDevelop For Linux to support those features.


Wed Oct 08, 2008 1:07 pm
Profile
Member

Joined: Thu Aug 21, 2008 10:13 pm
Posts: 119
Reply with quote
New patch: http://luiscubal.googlepages.com/mono-compat-002.diff
Result: Fixes a compile error and an exception with Mono

Code:
-            if (e.printtype == (int)PrintType.LOCAL)
+            if (e.printtype == PrintType.LOCAL)


and

Code:
-            MutexAccessRule rule = new MutexAccessRule(identity, MutexRights.FullControl, AccessControlType.Allow);

-

-            MutexSecurity security = new MutexSecurity();

             try

-            {

+            {
+            MutexAccessRule rule = new MutexAccessRule(identity, MutexRights.FullControl, AccessControlType.Allow);

+            MutexSecurity security = new MutexSecurity();


from PluginMain and SingleInstanceApp, respectively, are the relevant part.
The first part removes an useless(and problematic) conversion to int.
The second part puts MutexAccessRule and MutexSecurity inside a try{} catch statement. This prevents an exception under Mono 1.9.1. .NET 2.0 and any correct framework(assuming it is a Mono bug) should note no difference at all.
However, I do NOT know all possible effects of patch 2. Heavy testing is highly recommended if the second part is applied.


Wed Oct 08, 2008 3:26 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3061
Location: Finland
Reply with quote
Hmm... maybe we should give you a specific SVN directory where you could continue this development. It's better to keep thing separate or do you have other ideas?


Wed Oct 08, 2008 4:00 pm
Profile WWW
Member

Joined: Thu Aug 21, 2008 10:13 pm
Posts: 119
Reply with quote
Actually, I was trying to keep the Linux version as close to the Windows version as possible.
At some point, I was hoping the Windows version would run under Linux without modification.
That's why I was committing these patches. They modify the Windows version to be more Mono-friendly while keeping it merged with the Windows version.
I may need to fork at some point but I was trying to delay that as much as possible.


Wed Oct 08, 2008 4:34 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3061
Location: Finland
Reply with quote
Patch 1 applied to the SVN. The second one is something i don't want to touch. :)


Wed Oct 08, 2008 5:36 pm
Profile WWW
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
luiscubal,

I have experience developing with C#, but primarily use Linux so I would be happy to give you a hand. Would you mind walking me through how you have your development environment set up so that I can contribute as well?


Thu Oct 09, 2008 6:47 am
Profile
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
In addition is this the scintilla that is being used?

http://www.scintilla.org/


Thu Oct 09, 2008 6:49 am
Profile
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
Ok well I went ahead and just opened up FD3 with Monodevelop and it loaded the project correctly (from what I can tell). Now it's a matter of trying to get it to compile.

Thus far I've had to rename a few resource files in order to get them to be recognized (linux is case-sensitive).... Now for the more challenging bits...


Thu Oct 09, 2008 7:04 am
Profile
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
By the way my guess would be that the exception is a bug in Mono itself.


Thu Oct 09, 2008 7:27 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
kroenecker wrote:
In addition is this the scintilla that is being used?

http://www.scintilla.org/

Yes - this component is widely used under Win & Linux.


Thu Oct 09, 2008 7:36 am
Profile WWW
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
Ok so I looked through the Mono 2.0 codebase and an exception is being intentionally thrown with a FIXME note attached. In other words, that portion of the 2.0 implementation must still be *beta*. Ahhhh. Well I might try contacting someone who works closely with mono to see what is going on there.

Oh and thanks for the reply Philippe!


Thu Oct 09, 2008 8:07 am
Profile
Member

Joined: Mon Oct 06, 2008 11:42 pm
Posts: 8
Reply with quote
Alright well it's already sitting in Mono's Bugzilla. I might do some research to see if I can 'fix' it, but no promises.


Thu Oct 09, 2008 8:32 am
Profile
Member

Joined: Thu Aug 21, 2008 10:13 pm
Posts: 119
Reply with quote
kroenecker, sorry for not answering you before.
I just got the code from the SVN and opened it with MonoDevelop.
I'm using Mono 1.9.1 so some of my bugs might not apply to you.
Anyway, that screenshot was obtained commenting several P/Invokes and code that relies on them.
Several plugins may cause problems. Compile/Run only PluginCore and FlashDevelop.
I am thinking about designing a ScintillaControl emulator using RichTextBox or just TextBox.
Could you provide the link for the Mono Bugzilla bug? I'd like to check it out too.


Thu Oct 09, 2008 10:30 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 117 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

Who is online

Users browsing this forum: No registered users and 2 guests


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:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.