Author Topic: Support for Interpreted Languages?  (Read 32125 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Support for Interpreted Languages?
« Reply #45 on: June 13, 2007, 09:23:15 pm »
I've just commited Revision 15 of the Interpreted Langs plugins:
Hmmmm... whereas all previous versions work properly I have an issue with this one: First I had to point to the Python include/lib folder the first time for compilation which wasn't considered in the project files. It compiled/linked fine but now whenever I start C::B I receive an error, that the python plugin could not be loaded. What am I missing? Do I need to put e.g. the Python DLL somewhere?! What's behind the dependency on Python?!
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #46 on: June 13, 2007, 10:02:15 pm »
sorry about the current state of that plugin -- you should just remove py_embedder.cpp, py_embedder.h, libpython and any python related vars from the project as that is purely experimental stuff. I'm eventually going to implement symbol browsing and code completion for python using an embedded python interpreter. I'll remove the files from the default build target in a future commit (soon)

anyway, as soon as I'm done updating the InterpretedLangs plugin (currently working on a file explorer tab in the management pane -- Check out the latest SVN, then I'll do some more work on the menus and intepreter actions) I'm going to tie the Python plugin more closely to the InterpretedLangs plugin. so consider the current python plugin as being in a deprecated state until that time...
« Last Edit: June 13, 2007, 10:10:37 pm by dmoore »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Support for Interpreted Languages?
« Reply #47 on: June 13, 2007, 10:24:08 pm »
sorry about the current state of that plugin -- you should just remove py_embedder.cpp, py_embedder.h, libpython and any python related vars from the project [...]
Alright... will do that... thanks! :P Sounds interesting what you still have in mind! 8)
BTW: You can use a branch for this experimental stuff thus trunk would always be a "usable" version. SVN can do so much more that "just trunk". ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #48 on: June 13, 2007, 10:39:46 pm »
BTW: You can use a branch for this experimental stuff thus trunk would always be a "usable" version. SVN can do so much more that "just trunk". ;-)
With regards, Morten.

you've correctly surmised that I'm something of a vcs neophyte. :)
for now, I think having a second "experimental" build target will work just as well, because then I won't have to keep updating the branch for changes that i make to the trunk. There are lots of changes that I plan to make to the core python plugin that will remain compatible with the experimental bits.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #49 on: June 16, 2007, 03:50:08 pm »
latest build (rev 31), which includes a file explorer here:

http://developer.berlios.de/project/showfiles.php?group_id=7745&release_id=12952

Notes:
This self-extracting executable contains Code::Blocks, the CBIL plugins compiled for win32 using wxWidgets
 2.8.4 (dll included). Extract the file to your preferred directory and run codeblocks.exe

Disable plugins by starting codeblocks.exe and selecting Plugins->Management

IntepretedLangs and Python Plugin settings are available from Settings->Environment

Main features:
InterpetedLangs:
* Customizable Interpeter Actions that can be issued from the interpreters menu or with context clicks in Project Tree/File Explorer/Editor Pane. Customized actions support global/custom variable substitions, working directory specification, command line args, dockable vs console running mode
* File Explorer - provides a view of the file system (it's a tab in the management window).
* Launch multiple process with output piped to a tabbed "shells window". Run an interpreter action using option "W" in the action string (to run an interpreter in the cbconsole runnner use "C" in the action string). for example a python run action string to run a script in a dockable winodw tab might look like this: "Run;$interpeter -u $file;W;;" (the last to spaces are for setting the working directory and (not implemented) environment variable set)


Python Plugin (currently in a functional, though soon to be improved state)
* run python files with context clicks or from the Python menu
* debug python files (includes a watch, breakpoints, toolbar and code navigation in the cb editor)

Changes(from rev 15)

http://svn.berlios.de/wsvn/cbilplugin/?op=log&rev=0&sc=0&isdir=1

« Last Edit: June 17, 2007, 09:49:06 pm by dmoore »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Support for Interpreted Languages?
« Reply #50 on: June 17, 2007, 07:48:53 pm »
latest build (rev 31), which includes a file explorer here:
I guess it's rev 35 already...?! ;-)
Two notes I'd like to tell:
1.) in InterpretedLangs.h: You need to include sdk.h *first*. Please change the code to:
Code: [Select]
#include <sdk.h>
#include <cbplugin.h> // for "class cbPlugin"
2.) in FileExplorer.h: According to you path settings you need to use <sdk.h> instead of "sdk.h" for th include. (Notice that I have changed that on 1.) too).
After these changes I was able to compile... now I'm testing... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #51 on: June 17, 2007, 09:46:44 pm »
thanks for the notes morten. I still don't fully understand the plugin architecture in cb. Should the "#include <sdk.h>" still come after the wx includes?

I guess it's rev 35 already...?! ;-)

I'm using the berlios repository as my main repository for this project now, so all changes each day get commited. I still have lots to do... (not enough hours in the day)

Quote
After these changes I was able to compile... now I'm testing... ;-)

I'm sure you will encounter lots of bugs and missing features, so look forward to hearing from you. NB: the $paths specifier doesn't do anything useful at the moment because I still haven't implemented multi-select in the file explorer. anyway, the svn log will give you a good idea of what's there...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: Support for Interpreted Languages?
« Reply #52 on: June 17, 2007, 10:18:53 pm »
sdk.h and wx headers :

normally the order shouldn't matter, the headers files should play nice along.

However when including sdk.h first and then ifdef on CB_PRECOMP you can split further includes and when CB_PRECOMP is defined precompiled headers can kick in. But for this you need to check each time what sdk.h brings because if it brings a file you wanted to include, no need to include again in the ifdef part, but you have to include it in the #else part.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #53 on: June 17, 2007, 11:57:57 pm »
thanks for the info killerbot

---

rev 36,37: updated headers per Mortens advice and fixed a bunch of bugs in FileExplorer popup menu commands (copy, rename, delete etc) (mostly affect win32 - damn wx inconsistencies)


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #55 on: June 19, 2007, 09:16:29 pm »
rev 44 win32 build here: http://developer.berlios.de/project/showfiles.php?group_id=7745&release_id=12966

(fewer bugs and a couple more features including partially implemented multi file selections in the file explorer: move, copy and delete will still only handle one file at a time, but intepreter actions that have $mpaths in their command line will receive a space separated string containing the path of all the selected files - good for an svn stat command)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Support for Interpreted Languages?
« Reply #56 on: June 20, 2007, 08:32:28 am »
rev 44 win32 build
Just a minor note: For FileExplorer: IsFileWritable() is a wx28 method of wxFileName. This breaks compilation under wx26.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #57 on: June 20, 2007, 01:34:44 pm »
Yeah, I've switched to wx2.8 because (a) I couldn't get the sort override to work for the treectrl in 2.6 and (b) that wxFileName method isn't implemented (despite being documented in the wx2.6.3 manual -- WTF??). I guess I should use an #ifdef for that piece of code and people will just have to put up with the missing features in wx2.6.

sonya

  • Guest
Re: Support for Interpreted Languages?
« Reply #58 on: May 11, 2008, 09:02:59 pm »
Wher I can download the source of CBILPlugin?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Support for Interpreted Languages?
« Reply #59 on: May 12, 2008, 02:54:39 am »
http://developer.berlios.de/svn/?group_id=7745

two plugins there: "ShellExtensions" and "CBPythonPlugin"