儲存庫 vbox 的更動 18376
- 時間撮記:
- 2009-3-27 上午10:43:29 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r18350 r18376 183 183 // VMware Workstation 6.5 uses "ensoniq1371" for example 184 184 185 Utf8Str strLicenseInfo; // license info if any; receives contents of VirtualSystem/EulaSection/Info186 185 Utf8Str strLicenseText; // license info if any; receives contents of VirtualSystem/EulaSection/License 186 187 Utf8Str strProduct; // product info if any; receives contents of VirtualSystem/ProductSection/Product 188 Utf8Str strVendor; // product info if any; receives contents of VirtualSystem/ProductSection/Vendor 189 Utf8Str strVersion; // product info if any; receives contents of VirtualSystem/ProductSection/Version 190 Utf8Str strProductUrl; // product info if any; receives contents of VirtualSystem/ProductSection/ProductUrl 191 Utf8Str strVendorUrl; // product info if any; receives contents of VirtualSystem/ProductSection/VendorUrl 187 192 188 193 VirtualSystem() … … 638 643 </EulaSection> */ 639 644 640 const xml::ElementNode *pelmInfo, *pelmLicense; 641 if ( ((pelmInfo = pelmThis->findChildElement("Info"))) 642 && ((pelmLicense = pelmThis->findChildElement("License"))) 643 ) 644 { 645 vsys.strLicenseInfo = pelmInfo->getValue(); 645 const xml::ElementNode *pelmLicense; 646 if ((pelmLicense = pelmThis->findChildElement("License"))) 646 647 vsys.strLicenseText = pelmLicense->getValue(); 647 } 648 } 649 if ( (!strcmp(pcszElemName, "ProductSection")) 650 || (!strcmp(pcszTypeAttr, "ovf:ProductSection_Type")) 651 ) 652 { 653 /* <Section ovf:required="false" xsi:type="ovf:ProductSection_Type"> 654 <Info>Meta-information about the installed software</Info> 655 <Product>VAtest</Product> 656 <Vendor>SUN Microsystems</Vendor> 657 <Version>10.0</Version> 658 <ProductUrl>http://blogs.sun.com/VirtualGuru</ProductUrl> 659 <VendorUrl>http://www.sun.com</VendorUrl> 660 </Section> */ 661 const xml::ElementNode *pelmProduct; 662 if ((pelmProduct = pelmThis->findChildElement("Product"))) 663 vsys.strProduct = pelmProduct->getValue(); 664 const xml::ElementNode *pelmVendor; 665 if ((pelmVendor = pelmThis->findChildElement("Vendor"))) 666 vsys.strVendor = pelmVendor->getValue(); 667 const xml::ElementNode *pelmVersion; 668 if ((pelmVersion = pelmThis->findChildElement("Version"))) 669 vsys.strVersion = pelmVersion->getValue(); 670 const xml::ElementNode *pelmProductUrl; 671 if ((pelmProductUrl = pelmThis->findChildElement("ProductUrl"))) 672 vsys.strProductUrl = pelmProductUrl->getValue(); 673 const xml::ElementNode *pelmVendorUrl; 674 if ((pelmVendorUrl = pelmThis->findChildElement("VendorUrl"))) 675 vsys.strVendorUrl = pelmVendorUrl->getValue(); 648 676 } 649 677 else if ( (!strcmp(pcszElemName, "VirtualHardwareSection")) … … 1261 1289 nameVBox); 1262 1290 1291 /* VM Product */ 1292 if (!vsysThis.strProduct.isEmpty()) 1293 pNewDesc->addEntry(VirtualSystemDescriptionType_Product, 1294 "", 1295 vsysThis.strProduct, 1296 vsysThis.strProduct); 1297 1298 /* VM Vendor */ 1299 if (!vsysThis.strVendor.isEmpty()) 1300 pNewDesc->addEntry(VirtualSystemDescriptionType_Vendor, 1301 "", 1302 vsysThis.strVendor, 1303 vsysThis.strVendor); 1304 1305 /* VM Version */ 1306 if (!vsysThis.strVersion.isEmpty()) 1307 pNewDesc->addEntry(VirtualSystemDescriptionType_Version, 1308 "", 1309 vsysThis.strVersion, 1310 vsysThis.strVersion); 1311 1312 /* VM ProductUrl */ 1313 if (!vsysThis.strProductUrl.isEmpty()) 1314 pNewDesc->addEntry(VirtualSystemDescriptionType_ProductUrl, 1315 "", 1316 vsysThis.strProductUrl, 1317 vsysThis.strProductUrl); 1318 1319 /* VM VendorUrl */ 1320 if (!vsysThis.strVendorUrl.isEmpty()) 1321 pNewDesc->addEntry(VirtualSystemDescriptionType_VendorUrl, 1322 "", 1323 vsysThis.strVendorUrl, 1324 vsysThis.strVendorUrl); 1325 1263 1326 /* VM description */ 1264 1327 if (!vsysThis.strDescription.isEmpty()) … … 2473 2536 pelmVirtualSystem->setAttribute("ovf:id", llName.front()->strVbox); 2474 2537 2538 // product info 2539 std::list<VirtualSystemDescriptionEntry*> llProduct = vsdescThis->findByType(VirtualSystemDescriptionType_Product); 2540 std::list<VirtualSystemDescriptionEntry*> llProductUrl = vsdescThis->findByType(VirtualSystemDescriptionType_ProductUrl); 2541 std::list<VirtualSystemDescriptionEntry*> llVendor = vsdescThis->findByType(VirtualSystemDescriptionType_Vendor); 2542 std::list<VirtualSystemDescriptionEntry*> llVendorUrl = vsdescThis->findByType(VirtualSystemDescriptionType_VendorUrl); 2543 std::list<VirtualSystemDescriptionEntry*> llVersion = vsdescThis->findByType(VirtualSystemDescriptionType_Version); 2544 if (llProduct.size() || 2545 llProductUrl.size() || 2546 llVendor.size() || 2547 llVendorUrl.size() || 2548 llVersion.size()) 2549 { 2550 /* <Section ovf:required="false" xsi:type="ovf:ProductSection_Type"> 2551 <Info>Meta-information about the installed software</Info> 2552 <Product>VAtest</Product> 2553 <Vendor>SUN Microsystems</Vendor> 2554 <Version>10.0</Version> 2555 <ProductUrl>http://blogs.sun.com/VirtualGuru</ProductUrl> 2556 <VendorUrl>http://www.sun.com</VendorUrl> 2557 </Section> */ 2558 xml::ElementNode *pelmAnnotationSection = pelmVirtualSystem->createChild("ProductSection"); 2559 pelmAnnotationSection->createChild("Info")->addContent("Meta-information about the installed software"); 2560 if (llProduct.size() && !llProduct.front()->strVbox.isEmpty()) 2561 pelmAnnotationSection->createChild("Product")->addContent(llProduct.front()->strVbox); 2562 if (llVendor.size() && !llVendor.front()->strVbox.isEmpty()) 2563 pelmAnnotationSection->createChild("Vendor")->addContent(llVendor.front()->strVbox); 2564 if (llVersion.size() && !llVersion.front()->strVbox.isEmpty()) 2565 pelmAnnotationSection->createChild("Version")->addContent(llVersion.front()->strVbox); 2566 if (llProductUrl.size() && !llProductUrl.front()->strVbox.isEmpty()) 2567 pelmAnnotationSection->createChild("ProductUrl")->addContent(llProductUrl.front()->strVbox); 2568 if (llVendorUrl.size() && !llVendorUrl.front()->strVbox.isEmpty()) 2569 pelmAnnotationSection->createChild("VendorUrl")->addContent(llVendorUrl.front()->strVbox); 2570 } 2571 2475 2572 // description 2476 2573 std::list<VirtualSystemDescriptionEntry*> llDescription = vsdescThis->findByType(VirtualSystemDescriptionType_Description);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器