Merge authors: poy (poy) ------------------------------------------------------------ revno: 33 [merge] committer: poy <p...@123gen.com> branch nick: SpellPlugin timestamp: Mon 2013-06-03 19:02:55 +0200 message: merge modified: packaging/README.txt packaging/packager/packager.cpp pluginsdk/Config.cpp pluginsdk/Config.h pluginsdk/PluginDefs.h projects/make/Makefile src/Plugin.cpp
-- lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin/+edit-subscription
=== modified file 'packaging/README.txt' --- packaging/README.txt 2013-06-02 11:17:26 +0000 +++ packaging/README.txt 2013-06-03 16:30:05 +0000 @@ -20,6 +20,7 @@ The <Files> tag is empty; should you want to distribute additional files, include them in there within <File> tags (again, more information in the above doc file). +It is recommended you provide a .pdb file to ease debugging. When you are done editing this file, rename it to "info.xml", move the relevant files to this directory and zip them; rename that .zip to .dcext and you are done! === modified file 'packaging/packager/packager.cpp' --- packaging/packager/packager.cpp 2013-05-23 16:06:31 +0000 +++ packaging/packager/packager.cpp 2013-06-03 16:30:05 +0000 @@ -45,7 +45,8 @@ "If you support Windows, include pe-x64 and pe-x86 platforms.\n" "If you support Linux, include elf-x64 and elf-x86 platforms.\n\n" "The <Files> tag is empty; should you want to distribute additional files, include them\n" - "in there within <File> tags (again, more information in the above doc file).\n\n" + "in there within <File> tags (again, more information in the above doc file).\n" + "It is recommended you provide a .pdb file to ease debugging.\n\n" "When you are done editing this file, rename it to \"info.xml\", move the relevant files\n" "to this directory and zip them; rename that .zip to .dcext and you are done!\n" "-->\n\n" @@ -62,6 +63,8 @@ "\t<Plugin Platform=\"pe-x64\">MyPlugin-x64.dll</Plugin>\n" "\t<Plugin Platform=\"pe-x86\">MyPlugin-x86.dll</Plugin>\n" "\t<Files>\n" + "\t\t<File Platform=\"pe-x64\">MyPlugin-x64.pdb</File>\n" + "\t\t<File Platform=\"pe-x86\">MyPlugin-x86.pdb</File>\n" "\t</Files>\n" "</dcext>\n"; === modified file 'pluginsdk/Config.cpp' --- pluginsdk/Config.cpp 2013-04-23 18:12:02 +0000 +++ pluginsdk/Config.cpp 2013-06-02 17:39:05 +0000 @@ -49,7 +49,12 @@ ConfigValuePtr Config::getCoreConfig(const char* name) { return config->get_cfg("CoreSetup", name, CFG_TYPE_UNKNOWN); } void Config::freeCoreConfig(ConfigValuePtr value) { config->release(value); } -string Config::getPath(PathType type) { return config->get_path(type); } +string Config::getPath(PathType type) { + auto cfg = config->get_path(type); + string ret(cfg->value); + config->release(reinterpret_cast<ConfigValuePtr>(cfg)); + return ret; +} string Config::getInstallPath() { auto cfg = config->get_install_path(guid.c_str()); === modified file 'pluginsdk/Config.h' --- pluginsdk/Config.h 2013-04-23 18:12:02 +0000 +++ pluginsdk/Config.h 2013-06-02 17:39:05 +0000 @@ -51,7 +51,6 @@ static void freeCoreConfig(ConfigValuePtr value); static string getPath(PathType type); - static string getInstallPath(); private: === modified file 'pluginsdk/PluginDefs.h' --- pluginsdk/PluginDefs.h 2013-06-02 11:56:15 +0000 +++ pluginsdk/PluginDefs.h 2013-06-03 17:02:55 +0000 @@ -338,7 +338,7 @@ /* Config API version */ uint32_t apiVersion; - const char* (DCAPI *get_path) (PathType type); + ConfigStrPtr (DCAPI *get_path) (PathType type); ConfigStrPtr (DCAPI *get_install_path) (const char* guid); void (DCAPI *set_cfg) (const char* guid, const char* setting, ConfigValuePtr val); === modified file 'projects/make/Makefile' --- projects/make/Makefile 2013-05-27 21:41:55 +0000 +++ projects/make/Makefile 2013-06-03 17:02:55 +0000 @@ -131,17 +131,28 @@ zlib/gzread.o zlib/gzwrite.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/ioapi.o \ zlib/trees.o zlib/uncompr.o zlib/unzip.o zlib/zutil.o +ifeq ($(findstring mingw, $(COMPILER_SPEC)),) + PDB = +else + PDB := $(OUTPUT_DIR)/$(TARGET).pdb +endif + TARGET := $(OUTPUT_DIR)/$(TARGET)$(LIBEXT) OBJS := $(addprefix $(OUTPUT_DIR)/, $(OBJS)) PACKAGER = $(OUTPUT_DIR)/packaging/packager$(BINEXT) PACK_INFO = ../../packaging/info_generated.xml -all: $(TARGET) $(PACK_INFO) +all: $(TARGET) $(PDB) $(PACK_INFO) $(TARGET): $(OBJS) $(CXX) $^ $(LINKFLAGS) $(LINKXXFLAGS) $(OUTPUT_OPTION) +ifneq ($(findstring mingw, $(COMPILER_SPEC)),) +$(PDB): $(TARGET) + strip --only-keep-debug $< $(OUTPUT_OPTION) && strip $< +endif + $(PACKAGER): $(OUTPUT_DIR)/packaging/packager/packager.o $(CXX) $^ $(subst -shared,,$(LINKFLAGS) $(LINKXXFLAGS)) $(OUTPUT_OPTION) === modified file 'src/Plugin.cpp' --- src/Plugin.cpp 2013-06-02 11:56:15 +0000 +++ src/Plugin.cpp 2013-06-03 17:02:55 +0000 @@ -260,8 +260,12 @@ void Plugin::refreshCommands() { UI::clearCommands(); + const auto active = Config::getConfig("Active"); + if(active.empty()) + return; + auto counter = 0; - const auto current = boost::lexical_cast<decltype(counter)>(Config::getConfig("Active")); + const auto current = boost::lexical_cast<decltype(counter)>(active); for(auto& dico: dicos) { auto text = "Select the " + dico.name + " dictionary"; if(counter == current) { text += " [Active]"; }
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp