Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
ThreadSearch plugin is born !
Pecan:
If you're going to compile on ubuntu, you're going to need this:
ThreadSearch-Lunix.cbp
--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="ThreadSearch-Lunix" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="debug">
<Option output="bin/debug/ThreadSearch.so" prefix_auto="1" extension_auto="1" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Compiler>
<Add option="`pkg-config --cflags codeblocks`" />
<Add option="`wx-config --cflags`" />
<Add option="-g" />
</Compiler>
<Linker>
<Add option="`pkg-config --libs codeblocks`" />
<Add option="`wx-config --libs`" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 ThreadSearch.zip manifest.xml" />
<Add after="zip -j9 ThreadSearch.cbplugin ThreadSearch.so ThreadSearch.zip" />
</ExtraCommands>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/wxFlatNotebook/include" />
<Add directory="$(#cb)/include/wxscintilla/include" />
<Add directory="$(#wx)/include" />
</Compiler>
<Unit filename="DirectoryParamsPanel.cpp" />
<Unit filename="DirectoryParamsPanel.h" />
<Unit filename="FindDataUtils.cpp" />
<Unit filename="FindDataUtils.h" />
<Unit filename="SearchInPanel.cpp" />
<Unit filename="SearchInPanel.h" />
<Unit filename="ThreadSearch.cbp" />
<Unit filename="ThreadSearch.cpp" />
<Unit filename="ThreadSearch.h" />
<Unit filename="ThreadSearchConfPanel.cpp" />
<Unit filename="ThreadSearchConfPanel.h" />
<Unit filename="ThreadSearchControlIds.h" />
<Unit filename="ThreadSearchEvent.cpp" />
<Unit filename="ThreadSearchEvent.h" />
<Unit filename="ThreadSearchThread.cpp" />
<Unit filename="ThreadSearchThread.h" />
<Unit filename="ThreadSearchView.cpp" />
<Unit filename="ThreadSearchView.h" />
<Unit filename="manifest.xml" />
<Extensions>
<code_completion />
</Extensions>
</Project>
</CodeBlocks_project_file>
--- End code ---
I call it "-Lunix" because the .so file is output only to the local directory. I install and test the .so after the code compiles cleanly.
You can make a production ThreadSearch-unix.cbp later.
I'll do some debugging soon, to see why the thread hangs/or never notifies the plugin.
mariocup:
Hi dje,
you are right the same problem occurs with find in files within the Code::Blocks editor?
Under linux utf-8 is the default encoding, so I will try the same with Code::Blocks under linux to see what happens.
Bye
Mario
dje:
Mario, did you try to play with the "Edit\File encoding" sub menu (at least for editors) ?
You may have a look at the "Settings\Editor" then "General settings" to set default encoding for file open.
Dje
dje:
Merging Pecan's and Killerbot's remarks I added the magical lines
--- Code: ---#include <sdk.h> // Code::Blocks SDK
#ifndef CB_PRECOMP
#include "messagemanager.h"
#include "configmanager.h"
#include "sdk_events.h"
#endif
--- End code ---
And I have finally a complete running environment on Linux.
--- Quote ---But the search doesn't work. It takes the search string, starts a thread, then goes zombie. So I'm guessing the thread ends, but no attention is paid to it. It's hung.
Also, after the thread starts, any resize of any window in CB causes refreshes to freeze. The main menu or task bars even disappear. This might be evidence that an event is stuck in the event queue, not allowing other events to get through.
--- End quote ---
I had the problem but it is strange... Some widgets are no more refreshed whereas other still continue to behave correctly.
Let's test C::B debugger ! :)
mariocup:
Hi dje,
I tried the same file with UTF-8 under linux. The Search in files show the correct character encoding. Code:Blocks does not use the character encoding of the file or the settings of the editor, but the system default encoding.
Under linux it is UTF-8 so the find in files or threadsearch plugin will show the correct content (also for special characters like ΓΌ), but windows has a different system default encoding.
Bye,
Mario
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version