Author Topic: remote development  (Read 13641 times)

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
remote development
« on: October 20, 2005, 11:16:56 am »
Hi guys, I started a few weeks ago to hack the CB to add remote devel capabilities. In fact that's the way I found CB, looking for a good, free  IDE. I mainly program on Unix/Linux but I'm too lazy to use Linux as a desktop OS. So I use XP on my laptop and connect to a unix machine.
  I like CB so I decided to add myself the remote devel code. I started to write some code but it turns out that I gotta modify some core functionalities, XML project file format, FileOpen dialog, etc. My question is, would you incorporate my code intro the CB ?. I ask this because with the new functionalities/ bug fixes added everyday, it will be a pain in the ass to report each time my modifications into the main trunk.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: remote development
« Reply #1 on: October 20, 2005, 11:42:04 am »
As you have probably read in the forums, a major compiler framework re-design will take place after 1.0. Maybe you should wait until then and participate in the discussion...
Most of the current design shortcomings have been identified, hence the need to redesign the framework. So, any work you put now might be invalidated then...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: remote development
« Reply #2 on: October 20, 2005, 11:45:58 am »
I would very much appreciate being able to compile on my Linux box using Code::Blocks from my XP desktop. Currently, I edit my files on the XP box via samba and open a console to the Linux box to invoke a makefile by hand, which is a nuisance (admitted, I could install wxGTK and just compile C::B for Linux, but installing wxGTK is a nuisance, too, and the X servers for Windows aren't great, either).

I started to write some code but it turns out that I gotta modify some core functionalities, XML project file format, FileOpen dialog, etc. My question is, would you incorporate my code intro the CB ?.
Can't you pack the functionality into a plugin? This would cause a lot less trouble both for you and for the devs.

What if the user edits sources on a SMB volume, that way the sources are on the Linux box already. Then you make a modified compilergcc "compile remotely" plugin which does some network wizardry (use plink or rsh to connect to the Linux box and invoke gcc with the parameters that you get from the project).
This would require zero changes to the application, and would probably not be an awful lot of work, either. The compilergcc plugin already exists and works reliably, all you need to do is call plink instead of running mingw-gcc directly. Then you need one extra configuration screen, and it should do.

I ask this because with the new functionalities/ bug fixes added everyday, it will be a pain in the ass to report each time my modifications into the main trunk.
Is this not just what cvs update does? You can update regularly while making changes, and the modifications to the main trunk will be merged to your working copy. And when you have reached a point where you want to release your changes, you make a patch against the current release. Does that not work out?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: remote development
« Reply #3 on: October 20, 2005, 01:14:43 pm »
I would very much appreciate being able to compile on my Linux box using Code::Blocks from my XP desktop. Currently, I edit my files on the XP box via samba and open a console to the Linux box to invoke a makefile by hand, which is a nuisance (admitted, I could install wxGTK and just compile C::B for Linux, but installing wxGTK is a nuisance, too, and the X servers for Windows aren't great, either).

Moreover, I work sometimes on a unix/linux machine and I need to develop & debug on another unix machine which doesn't have an X server.

Can't you pack the functionality into a plugin? This would cause a lot less trouble both for you and for the devs.

What if the user edits sources on a SMB volume, that way the sources are on the Linux box already. Then you make a modified compilergcc "compile remotely" plugin which does some network wizardry (use plink or rsh to connect to the Linux box and invoke gcc with the parameters that you get from the project).
This would require zero changes to the application, and would probably not be an awful lot of work, either. The compilergcc plugin already exists and works reliably, all you need to do is call plink instead of running mingw-gcc directly. Then you need one extra configuration screen, and it should do.

what if you have only ftp or sftp access to that machine ?

I ask this because with the new functionalities/ bug fixes added everyday, it will be a pain in the ass to report each time my modifications into the main trunk.
Is this not just what cvs update does? You can update regularly while making changes, and the modifications to the main trunk will be merged to your working copy. And when you have reached a point where you want to release your changes, you make a patch against the current release. Does that not work out?
Quote

It might be an idea.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: remote development
« Reply #4 on: October 20, 2005, 01:19:49 pm »
As you have probably read in the forums, a major compiler framework re-design will take place after 1.0. Maybe you should wait until then and participate in the discussion...
Most of the current design shortcomings have been identified, hence the need to redesign the framework. So, any work you put now might be invalidated then...

I know, I just asked to see if there's anybody else that needs this feature. The programming would be more challenging  :D this way.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: remote development
« Reply #5 on: October 20, 2005, 01:23:38 pm »
I know, I just asked to see if there's anybody else that needs this feature. The programming would be more challenging  :D this way.

Sure enough, many people would like to see this functionality implemented (I know I would).
Btw, you know about BVRDE, right?
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: remote development
« Reply #6 on: October 20, 2005, 01:48:07 pm »
what if you have only ftp or sftp access to that machine ?
Well, you sure do have ssh on that machine, or how do you access it at all  ;)
Mirror the local directory to the remote machine using pscp (comes with putty). The tool is called scp on Unix and is available everywhere (part of every normal ssh package).

Or use psftp or the standard ftp client that comes with every OS - to you it does not make a difference at all. Have the user configure which executable to use (plus username/password). Then you just need to write a minimal wrapper that folds a few commandline options (most are likely identical anyway), and that's all.
Finally, you can even write your own minimalist FTP client if you think that is necessary... not too hard.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: remote development
« Reply #7 on: October 20, 2005, 01:55:54 pm »
I know, I just asked to see if there's anybody else that needs this feature. The programming would be more challenging  :D this way.

Sure enough, many people would like to see this functionality implemented (I know I would).
Btw, you know about BVRDE, right?

I know, but I didn't like the class browser, for instance. If the job is simple, I use directly vi, but if it's so complex that I need an IDE for sure I do need an class browser.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: remote development
« Reply #8 on: October 20, 2005, 02:01:53 pm »
what if you have only ftp or sftp access to that machine ?
Well, you sure do have ssh on that machine, or how do you access it at all  ;)
Mirror the local directory to the remote machine using pscp (comes with putty). The tool is called scp on Unix and is available everywhere (part of every normal ssh package).

Or use psftp or the standard ftp client that comes with every OS - to you it does not make a difference at all. Have the user configure which executable to use (plus username/password). Then you just need to write a minimal wrapper that folds a few commandline options (most are likely identical anyway), and that's all.
Finally, you can even write your own minimalist FTP client if you think that is necessary... not too hard.

I're saying that I can use the standard ftp and wrap the command into a plugin ?
There's no hook when the CB open a file so I don't have any posibility to replace the standard open file dialog with my own ftp enabled open file dialog(in case someone want to add an source file located on another machine.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: remote development
« Reply #9 on: October 20, 2005, 02:12:50 pm »
 :shock: Hooks are the devil's tool.

Your files live in a plain normal project folder which is on your hard drive (and you choose "remote compile" in target settings). When you compile the project, the remote-compile-plugin scps the source files onto the target machine, then opens a plink session and executes the build commands that it would normally execute locally via the ssl tunnel (of course you have to replace minw32-gcc with gcc, but that is about everything).
A more advanced version would check the file modification times, so it does not need to blindly copy 200 files every time, but the basic idea would still work just fine.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."