News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Support for Interpreted Languages?

Started by dmoore, September 21, 2006, 10:58:46 PM

Previous topic - Next topic

MortenMacFly

Quote from: dmoore on June 11, 2007, 04:45:35 AM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

#46
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...
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

MortenMacFly

Quote from: dmoore 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 [...]
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

Quote from: MortenMacFly on June 13, 2007, 10:24:08 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.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

#49
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

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

MortenMacFly

Quote from: dmoore on June 16, 2007, 03:50:08 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:

#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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

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?

Quote from: MortenMacFly on June 17, 2007, 07:48:53 PM
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...
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

killerbot

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.

dmoore

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)

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

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)
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

MortenMacFly

Quote from: dmoore on June 19, 2007, 09:16:29 PM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

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.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

sonya

Wher I can download the source of CBILPlugin?

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]