示例#1
0
	void makeMCF(const char* path)
	{
		MCFCore::MCFI* mcfHandle = mcfFactory();
		mcfHandle->getProgEvent() += delegate((UtilFunction*)this, &UtilFunction::printProgress);
		mcfHandle->getErrorEvent() += delegate((UtilFunction*)this, &UtilFunction::mcfError);

		mcfHandle->setFile("temp.mcf");
		mcfHandle->parseFolder(path);
		mcfHandle->saveMCF();

		mcfDelFactory(mcfHandle);
	}
示例#2
0
    virtual int performAction(std::vector<std::string> &args)
    {
        MCFCore::MCFI* mcfSrc = mcfFactory();
        MCFCore::MCFI* mcfPrev = mcfFactory();

        mcfSrc->setFile(args[1].c_str());
        mcfPrev->setFile(args[2].c_str());

        mcfSrc->parseFolder(args[0].c_str());
        mcfSrc->hashFiles();

        mcfPrev->parseMCF();

        mcfSrc->makePatch(mcfPrev);
        mcfSrc->saveMCF();


        mcfDelFactory(mcfSrc);
        mcfDelFactory(mcfPrev);

        return 0;
    }