Pregunta

Tengo una carpeta con la siguiente estructura, me pregunto cómo puedo crear un archivo WSP para él, y implementaré la definición del sitio para mí,

estructura

 - XML
 - -> ONET.xml
 - default.aspx
 - MasterPage.master
 - masterpageajax.master

vítores

¿Fue útil?

Solución

Necesitas crear manifest.xml:

<?xml version="1.0"?>
<Solution SolutionId="876a627d-7944-4c3e-a17f-d347e9234517" xmlns="http://schemas.microsoft.com/sharepoint/">
  <SiteDefinitionManifests>
    <SiteDefinitionManifest Location="MySiteDef">
      <WebTempFile Location="1033\XML\webtempMySiteDef.xml" />
    </SiteDefinitionManifest>
  </SiteDefinitionManifests>
</Solution>

y necesitas crear un tax.ddf:

.OPTION EXPLICIT                    ; Generate errors on variable typos
;
.Set CabinetNameTemplate=SiteDef.wsp        ; The name of the WSP file
.set DiskDirectoryTemplate=CDROM    ; All cabinets go in a single directory
.Set CompressionType=MSZIP          ; 
.Set Cabinet=on                     ; 
.Set Compress=on                    ;
.Set DiskDirectory1=.               ; Use the specified directory for the output CAB file 
;
;*** Disable size limits for wsp (cab) files ;
;
.Set CabinetFileCountThreshold=0 
.Set FolderFileCountThreshold=0 
.Set FolderSizeThreshold=0 
.Set MaxCabinetSize=0 
.Set MaxDiskFileCount=0
.Set MaxDiskSize=0
;
;*** Files to zip                   ;
;
"C:\Work\MySiteDef\12\template\1033\XML\webtempMySiteDef.xml" "1033\XML\webtempMySiteDef.xml"
"C:\Work\MySiteDef\12\template\sitetemplates\MySiteDef\default.aspx" "MySiteDef\default.aspx"
"C:\Work\MySiteDef\12\template\sitetemplates\MySiteDef\masterpage.master" "MySiteDef\masterpage.master"
"C:\Work\MySiteDef\12\template\sitetemplates\MySiteDef\masterpageajax.master" "MySiteDef\masterpageajax.master"
"C:\Work\MySiteDef\12\template\sitetemplates\MySiteDef\XML\onet.xml" "MySiteDef\XML\onet.xml"
"C:\Work\MySiteDef\manifest.xml" "manifest.xml"

y luego debe ejecutar Makecab:

makecab -f cabes.ddf

Licenciado bajo: CC-BY-SA con atribución
scroll top