} 402. catch (e) { 403. throw e; 404. } 405.} 406. 407.function GetTargetName(strName, strProjectName) { 408. try { 409. var strTarget = strName; 410. 411. var nIndex = strName.indexOf("root"); 412. 413. if (nIndex >= 0) { 414. strTarget = strName.substring(0, nIndex) + strProjectName + strName.substring(nIndex + 4, strName.length); 415. } 416. 417. var strTemp = "../../../../../scripting/lua"; 418. nIndex = strTarget.indexOf(strTemp); 419. if (nIndex >= 0) { 420. strTarget = "Classes" + strTarget.substring(nIndex + strTemp.length, strTarget.length); 421. } 422. 423. return strTarget; 424. } 425. catch (e) { 426. throw e; 427. } 428.} 429. 430.function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) { 431. try { 432. var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH'); 433. 434. var strTpl = ''; 435. var strName = ''; 436. 437. var strTextStream = InfFile.OpenAsTextStream(1, -2); 438. while (!strTextStream.AtEndOfStream) { 439. strTpl = strTextStream.ReadLine(); 440. if (strTpl != '') { 441. strName = strTpl; 442. var strTarget = GetTargetName(strName, strProjectName); 443. var strTemplate = strTemplatePath + '\\' + strTpl; 444.   << 上一页 [11] [12] [13] [14] [15] [16] 下一页
|