// This is called when the user clicks "Create..." on the New Project dialog CAppWizStepDlg* CConsAppAppWiz::Next(CAppWizStepDlg* pDlg) { ASSERT(pDlg == NULL); // By default, this custom AppWizard has no steps // Set template macros based on the project name entered by the user. // Get value of $$root$$ (already set by AppWizard) CString strRoot; m_Dictionary.Lookup(_T("root"), strRoot); // Set value of $$Doc$$, $$DOC$$ CString strDoc = strRoot.Left(6); m_Dictionary[_T("Doc")] = strDoc; strDoc.MakeUpper(); m_Dictionary[_T("DOC")] = strDoc; // Set value of $$MAC_TYPE$$ strRoot = strRoot.Left(4); int nLen = strRoot.GetLength(); if (strRoot.GetLength() < 4) { CString strPad(_T(' '), 4 - nLen); strRoot += strPad; } strRoot.MakeUpper(); m_Dictionary[_T("MAC_TYPE")] = strRoot; // diverse Guids zum dictionary hinzufügen AddGuid (_T("STDAFX_H_GUID"), TRUE); AddGuid (_T("MAINAPP_H_GUID"), TRUE); AddGuid (_T("ROOT_H_GUID"), TRUE); // aktuelles Datum erzeugen (für VersionsInfo) char buf[128]; time_t timeval; time(&timeval); buf[strftime(buf, sizeof(buf) - 1, "%y%m%d", localtime(&timeval))] = 0; m_Dictionary[_T("version_date")] = buf; buf[strftime(buf, sizeof(buf) - 1, "%d.%m.%Y %H:%M:%S", localtime(&timeval))] = 0; m_Dictionary[_T("date_n_time")] = buf; // Return NULL to indicate there are no more steps. (In this case, there are // no steps at all.) return NULL; }
static bool ParseDepedencyExpression(const Byte *p, UInt32 size, AString &res) { res.Empty(); for (UInt32 i = 0; i < size;) { unsigned command = p[i++]; if (command > ARRAY_SIZE(kExpressionCommands)) return false; res += kExpressionCommands[command]; if (command < 3) { if (i + kGuidSize > size) return false; res.Add_Space(); AddGuid(res, p + i, false); i += kGuidSize; } res += "; "; } return true; }