示例#1
0
LPCTSTR vmsCommandLine::getExeName() const
{
	LPCTSTR ptsz = _tcsrchr (getExe (), '\\');
	if (!ptsz)
		ptsz = _tcsrchr (getExe (), '/');
	if (ptsz)
		ptsz++;
	return ptsz;
}
示例#2
0
void ToolManager::symLinkTools(std::vector<DesuraId> &list, const char* path)
{
	if (!path)
		return;

	UTIL::FS::recMakeFolder(path);

	for (size_t x=0; x<list.size(); x++)
	{
		auto info = findItem(list[x].toInt64());

		if (!info || !info->isInstalled())
			continue;

		UTIL::FS::Path fp(info->getExe(), "", true);

		if (!UTIL::FS::isValidFile(fp))
			continue;

		UTIL::FS::Path dp(path, "", false);
		dp += fp.getFile();

		std::string src = fp.getFullPath();
		std::string dest = dp.getFullPath();

		int res = symlink(src.c_str(), dest.c_str());

		if (res != 0)
			Debug(gcString("Failed to sym link: [{0}] to [{1}]\n", src, dest));
	}
}
示例#3
0
文件: firm.c 项目: izzy420/ReiNand
//Setup for Sysnand
void loadSys(void){
    //Disable firm partition update if a9lh is installed
    if(!PDN_SPI_CNT){
        getExe(firmLocation, firmSize, &exeOffset);
        memcpy((u8*)exeOffset, "kek", 3);
    }
}
示例#4
0
int vmsCommandLine::CompareEXEs(const vmsCommandLine &cl) const
{
	LPCTSTR ptsz1 = getExe ();
	LPCTSTR ptsz2 = cl.getExe ();

	if (ptsz1 && ptsz2)
		return _tcsicmp (ptsz1, ptsz2);

	if (ptsz1 == NULL && ptsz2 == NULL)
		return 0;

	if (!ptsz1)
		return -1;

	return 1;
}
示例#5
0
/**
 * 获取进程的二进制文件绝对根目录
 * @param pszExe(char *): 根目录存放内存地址
 * @param uiExeLen(unsigned): 根目录存放内存长度
 * @see 
 * @return 0(成功)
 * @return -1(失败)
 */
int getExeRoot(char *pszExeRoot, unsigned uiExePathLen)
{
    int i = 0;
    int iRes = getExe(pszExeRoot, uiExePathLen);
    if (-1 == iRes)
    {
        return -1;
    }
    for (i = uiExePathLen - 1; i > 0; --i)
    {
        if ('/' == pszExeRoot[i])
        {
            pszExeRoot[i] = '\0';
            break;
        }
    }
    return 0;
}
示例#6
0
void _if(nodeADT node, Block * my_block) {

//	printf("IF -> N = %d\n", getParam(node));

	execute(getExe(node), my_block);

	if ((my_block->boolean) == TRUE) {

		execute(getNext(node), my_block);
	} else {
		nodeADT nodeENDIF = (nodeADT) getJump(node);

		if (getNext(nodeENDIF) != NULL ) {

			execute(getNext(nodeENDIF), my_block);
		}
	}
}