View unanswered posts | View active topics



Reply to topic  [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next
FlashDevelop Mac/Linux integration: the Bridge project 
Author Message
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11563
Location: Paris, France
Now available for testing!
Warning: these are alpha-quality builds + read the initial post to know what this is and what this isn't.

Compatibility:
- known to work with VirtualBox and VMWare Fusion,
- fails with Parallels: it doesn't allow Win/Mac socket communication by default; we're looking for help to configure it...

Installation:
Download latest FlashDevelop 4 and Bridge dev' build:
viewtopic.php?f=9&t=3529

VirtualBox configuration:
- VirtualBox: Virtual Machine Settings > Shared Folders, add 'Dev' as /Users/yourname/Dev
- MS Explorer: Tools > Map Network Drive, map Z:\ to \\VBOXSRV\Dev
- Mac Bridge: configure Z:\ as local /Users/yourname/Dev
- FlashDevelop: Program Settings > BridgeSettings, verify drive and set 'Active'
- restart FlashDevelop

VMWare Fusion configuration:
- VMWare: Virtual Machine Settings > Options > Shared Folders, add 'Dev' as /Users/yourname/Dev
- MS Explorer: Tools > Map Network Drive, map Z: to \\vmware-host\Shared Folders\Dev
- Mac Bridge: configure Z:\ as local /Users/yourname/Dev
- FlashDevelop: Program Settings > BridgeSettings, verify drive and set 'Active'
- restart FlashDevelop

Controlling connection:
- FD will output messages "connected to...", "location changed", etc.
- Bridge's Configure dialog will show a number of connected watchers & sockets; if it's non 0 it means it works.

Known issues:
- connections can be lost after going to sleep/interrupting the VM,
- lost connections don't auto-restore; you'll have to restard FD,
- Bridge CPU can go crazy (and stops working); please send me the log file to study the problem (~/.fdbridge_log).

Note: bridge will be active only for projects located on the Mac drive and shared with Win as a network, mapped, location.


Tue Jan 11, 2011 4:11 pm
Profile WWW
Member

Joined: Wed May 16, 2007 9:28 am
Posts: 20
Coool will test it asap.
Thx


Tue Jan 11, 2011 4:30 pm
Profile
Member

Joined: Wed Apr 04, 2007 12:10 pm
Posts: 36
Location: Hamburg, Germany
Oh wow, this would be extremely neat. I can't test anything (no mac yet), but I'm rather excited! Good luck with this project!


Tue Jan 11, 2011 5:55 pm
Profile
Member

Joined: Sat Jan 08, 2011 6:26 pm
Posts: 2
So excited about this! I just tried it out and FD4 tells me that it is "Unable to connect to FlashDevelop Mac Bridge" I'm using Parallels 6. This has not been implement yet, correct? :) Let me know!


Wed Jan 12, 2011 4:35 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11563
Location: Paris, France
vieko wrote:
So excited about this! I just tried it out and FD4 tells me that it is "Unable to connect to FlashDevelop Mac Bridge" I'm using Parallels 6. This has not been implement yet, correct? :) Let me know!

There is a problem with Parallels - the communication port (8009) doesn't seem to be open for Win/Mac communication.


Wed Jan 12, 2011 4:58 pm
Profile WWW
Member

Joined: Fri Dec 11, 2009 10:35 am
Posts: 14
Hi, Linux user here, I checked this and I must say Qt4 part is not good.
1. QFileSystemWatcher and connections should we created in constructor.
2. Before QFileSystemWatcher->addPaths is a good idea to check if path exist already in directories or files.
Code:
/* for all paths, maybe loop? */
if (!QFileSystemWatcher->directories.contains(path)) {
     QFileSystemWatcher->addPath(path);
}

3. Clean QFileSystemWatcher then FD4 is disconnecting
Code:
QFileSystemWatcher->removePaths(QFileSystemWatcher->directories);
QFileSystemWatcher->removePaths(QFileSystemWatcher->files);


That's it for now, do not fully understand how it works so it's probably something else I will add.

btw. sorry for my english


Thu Jan 13, 2011 9:33 am
Profile
Member

Joined: Wed May 16, 2007 9:28 am
Posts: 20
Quote:
Unable to connect to FlashDevelop Mac Bridge


i guess i didn't make the good settings ....
my bridge:
Image
the z mapping drive on virtual box:
Image
sttings in fd.
Image

am i doing wrong ?


Thu Jan 13, 2011 10:40 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11563
Location: Paris, France
@skynet1248: thanks for the advices, I'm a noob in Qt ;)
@bigop: your screens are broken.


Thu Jan 13, 2011 9:22 pm
Profile WWW
Member

Joined: Fri Dec 11, 2009 10:35 am
Posts: 14
Philippe maybe I little help you with Qt4, but you must explain me how it should work.

It seems to me that the easiest way would be to put the bot, who will perform the command, something like ssh, or maybe just use ssh with restrictions?.


Fri Jan 14, 2011 5:21 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11563
Location: Paris, France
skynet1248 wrote:
Philippe maybe I little help you with Qt4, but you must explain me how it should work.

It seems to me that the easiest way would be to put the bot, who will perform the command, something like ssh, or maybe just use ssh with restrictions?.

Well the job is to exchange message between the Win and Mac sides, so I went with a socket. Not sure how to use ssh here - It may be more restricted and would make the .Net code much more complex as Windows isn't so good with ssh. But I may be wrong and I'm definitely open to suggestions.


Fri Jan 14, 2011 10:01 am
Profile WWW
Member

Joined: Fri Dec 11, 2009 10:35 am
Posts: 14
Philippe wrote:
Well the job is to exchange message between the Win and Mac sides, so I went with a socket. Not sure how to use ssh here - It may be more restricted and would make the .Net code much more complex as Windows isn't so good with ssh.

ssh will be more complicated if you do not have library which takes care of the entire transmission, but you get a remote terminal, which is both in Linux as well as Mac.
And it is already running does not need to do anything on the Linux side or Mac side.
Would need only the ssh client in C#.

Can you write what commands you need, or what they are doing?
Qt4 have class QProcess which may be used to execute external programs and communicating with them, and it is very simple.


Fri Jan 14, 2011 10:14 am
Profile
Member

Joined: Tue Jul 15, 2008 3:36 am
Posts: 169
@skynet: What Linux distribution did you use ? Does the 'open' and 'explore' working for you (through the Bridge) ? I'm using Lubuntu and it's not working. I tried to debug the Bridge, but even after I set a breakpoint in the Qt Creator and run in Debug Mode, it never hit the breakpoint :-/. Maybe you can't share your setup/how you debug ?


Sat Jan 15, 2011 4:01 am
Profile
Member

Joined: Fri Dec 11, 2009 10:35 am
Posts: 14
I use Kubuntu and OpenSuse[both KDE4 :D ], explore not working because Philippe is a noob in Qt4 as he said and noob in C++ very possible too :mrgreen:
in
Code:
void BridgeServer::openDocument(QString path)
line
Code:
if (file.exists()) QProcess::startDetached("open \"" + localPath + "\"");
not working on Linux because we don't have program called open.
For such things is better to use QDesktopServices
just replace
Code:
QProcess::startDetached("open \"" + localPath + "\"");
to
Code:
QString path = QDir::toNativeSeparators(localPath);
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
add missing include and recompile
Code:
#include <QDesktopServices>
#include <QUrl>
And now 'open' and 'explore' works on linux.

aaulia wrote:
I tried to debug the Bridge, but even after I set a breakpoint in the Qt Creator and run in Debug Mode, it never hit the breakpoint :-/
Really strange.
If you build the project as a release, and later changed to debug and rebuild, you still have a binary release.
This happens because the debug and release share the same directory.
Try clean project, check if you have Debug configuration and build again.

To Philippe pls no joke more with.
Code:
path.replace('\\', '/');
u should use
Code:
QDir::toNativeSeparators(path);


Qt4 is cross-platform so you almost always find a method that operates according to the platform.


Last edited by skynet1248 on Sat Jan 15, 2011 11:26 am, edited 3 times in total.



Sat Jan 15, 2011 5:23 am
Profile
Member

Joined: Tue Jul 15, 2008 3:36 am
Posts: 169
skynet1248 wrote:
I use Kubuntu and OpenSuse[both KDE4 :D ], explore not working because Philippe is a noob in Qt4 as he said and noob in C++ very possible too :mrgreen:
in
.
.
.

Nice thanks, I'll try it :). Ah I hear a lot of good stuff around KDE (I'm also a Qt fan, although it's been a long time since I last used it :p), I might migrate to Kubuntu ;).

Ahh it did open in the host machine, but it open the browser (Chromium in my case) instead of the appropriate PCManFM for file explorer and stand alone flash player for SWF :-/. Is there any way in linux (from Qt) to invoke this based on filetype association ?


Sat Jan 15, 2011 9:43 am
Profile
Member

Joined: Fri Dec 11, 2009 10:35 am
Posts: 14
OpenSuse in my opinion is better[Kubuntu have too many bugs in KDE].
About Chromium, I'm sorry but I lost a slash in
Code:
QDesktopServices::openUrl(QUrl("file://" + path));
must be file:/// 3 slashes.

_edit: better way
Code:
QDesktopServices::openUrl(QUrl::fromLocalFile(path));


Sat Jan 15, 2011 11:03 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  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:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.