Hi !
After many tests, I don't succeed in installing my plugin pngs :oops:
My manifest.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
<SdkVersion major="1" minor="11" release="10" />
<Plugin name="ThreadSearch">
<Value title="ThreadSearch" />
<Value version="0.7" />
<Value description="Multi-threaded 'Search in files' with preview window." />
<Value author="Jerome ANTOINE" />
<Value authorEmail="" />
<Value authorWebsite="" />
<Value thanksTo="wxWidgets team
Code::Blocks team
wxGlade team" />
<Value license="GPL" />
</Plugin>
<Extra file="images/findf.png" />
<Extra file="images/findfdisabled.png" />
<Extra file="images/options.png" />
<Extra file="images/optionsdisabled.png" />
<Extra file="images/stop.png" />
<Extra file="images/stopdisabled.png" />
</CodeBlocks_plugin_manifest_file>
My structure :
ThreadSearch.cbplugin
findf.png
findfdisabled.png
options.png
optionsdisabled.png
stop.png
stopdisabled.png
ThreadSearch.dll
ThreadSearch.png
ThreadSearch-off.png
ThreadSearch.zip
manifest.xml
I also tried to put pngs (all except ThreadSearch.png and ThreadSearch-off.png) in ThreadSearch.zip but only settings pngs are copied.
Is there anything wrong ?
XP SP2, SVN 4229.
Dje
In fact, I just checked the tree.
extra pngs are not copied at the right (expected) place.
i first tried to copy them with <Extra file="images/ThreadSearch/findf.png" />
As it didn't work, I tried with <Extra file="images/findf.png" />
I also tried with <Extra file="images\ThreadSearch\findf.png" />
Shouldn't they be copied at install whatever my code is ?
It is
wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
...
pBtnSearch->SetBitmapDisabled(wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG));
@dmoore You already saw it isn't it ?
Dje
Hi all !
So, there were 2 errors.
The first:
my cbplugin did not contain path info, in my case images\ThreadSearch\
The second:
there is a bug.
Sorry for not submitting a patch but I'm not at home and pc A is my dev pc and pc B has internet...
in PluginManager::ExtractFile, the expression:
wxFileName(dst_filename).GetPath(wxPATH_GET_SEPARATOR)
returns on my PC \Dev\codeblocks\src\devel\share\codeblocks\images\ThreadSearch\
The problem is that the volume is missing in the string.
CreateDirRecursively fails at line 399 in globals.cpp because currdir value is :\Dev due to missing volume.
I hope it helps and it is clear enough to be useful.
I'll submit a bug and a patch when I'm back at home if problem is not solved.
My conf:
WinXP SP2, dev SVN 0 on my built C::B ??
It is recent (less than one week).
Dje
Hi !
Problem :
during plugin install, directories are not created on windows.
Solution:
Still not at home so I give the line instead of the patch:
Replace line 629 in pluginmanager.cpp in bool PluginManager::ExtractFile(...)
CreateDirRecursively(wxFileName(dst_filename).GetPath(wxPATH_GET_SEPARATOR));
by
CreateDirRecursively(wxFileName(dst_filename).GetPath(wxPATH_GET_SEPARATOR|wxPATH_GET_VOLUME));
That works on windows and was not tested on other OSs.
Dje
OK. I have a fix. This should solve the issue. :)
Index: src/sdk/pluginmanager.cpp
===================================================================
--- src/sdk/pluginmanager.cpp (revision 4337)
+++ src/sdk/pluginmanager.cpp (working copy)
@@ -335,8 +335,9 @@
ReadExtraFilesFromManifestFile(localName, extraFiles);
for (size_t i = 0; i < extraFiles.GetCount(); ++i)
{
+ wxFileName extraFileName(extraFiles[i]);
ExtractFile(actualName,
- extraFiles[i],
+ extraFileName.GetFullName(),
resourceDir + _T("/") + extraFiles[i],
false);
}
@@ -592,13 +593,9 @@
wxFileInputStream in(extrafiles[i]);
- wxString f = extrafiles[i];
- if (f.StartsWith(ConfigManager::GetFolder(sdDataUser)))
- f.Remove(0, ConfigManager::GetFolder(sdDataUser).Length());
- else if (f.StartsWith(ConfigManager::GetFolder(sdDataGlobal)))
- f.Remove(0, ConfigManager::GetFolder(sdDataGlobal).Length());
+ wxFileName extraFileName(extrafiles[i]);
- zip.PutNextEntry(f);
+ zip.PutNextEntry(extraFileName.GetFullName());
zip << in;
}
zip.SetComment(_T("This is a redistributable plugin for the Code::Blocks IDE.\n"
You have to keep all the icon files (extra) in the root of zip file just as you do with the setting icons. But in the manifest.xml file, you should provide the relative output dir.
I'm not sure if this method is correct or not and I've to get it confirmed from Yiannis before I put it in repo. :)
Best Regards,
Biplab
Hi Biplab !
It seems the correction does not work...
manifest.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
<SdkVersion major="1" minor="11" release="10" />
<Plugin name="ThreadSearch">
<Value title="ThreadSearch" />
<Value version="0.8beta" />
<Value description="Multi-threaded 'Search in files' with preview window." />
<Value author="Jerome ANTOINE" />
<Value authorEmail="" />
<Value authorWebsite="" />
<Value thanksTo="wxWidgets team
Code::Blocks team
wxGlade team" />
<Value license="GPL" />
</Plugin>
<Extra file="images/ThreadSearch/findf.png" />
<Extra file="images/ThreadSearch/findfdisabled.png" />
<Extra file="images/ThreadSearch/options.png" />
<Extra file="images/ThreadSearch/optionsdisabled.png" />
<Extra file="images/ThreadSearch/stop.png" />
<Extra file="images/ThreadSearch/stopdisabled.png" />
</CodeBlocks_plugin_manifest_file>
zip content, see picture
After plugin install, the directory is created but is empty.
Sorry for late feedback...
Dje
[attachment deleted by admin]