public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving application resource file: " + this.Location);

        string targetPath = Path.Combine(handler.TargetPath, "80\\" + PATH_NAME + "\\" + this.Location);
        string sourcePath = Path.Combine(handler.SourcePath, this.Location);

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
    }
Beispiel #2
0
    public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving resource file: " + this.Location);

        string targetPath = Path.Combine(handler.TargetPath, @"12\template\features\" + this.Location);
        string sourcePath = Path.Combine(handler.SourcePath, this.Location);

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
    }
Beispiel #3
0
    public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving DWP file: " + this.Location);

        string targetPath = Path.Combine(handler.TargetPath, @"80\wpcatalog\" + this.Location);
        string sourcePath = Path.Combine(handler.SourcePath, this.Location);

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
    }
Beispiel #4
0
    public void MoveManifest(Extractwsp handler)
    {
        Log.Verbose("Moving manifext file.");

        string filename   = "Manifest.xml";
        string sourcePath = Path.Combine(handler.SourcePath, filename);
        string targetPath = Path.Combine(handler.TargetPath, filename);

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
    }
Beispiel #5
0
    public void CreateSolutionIdFile(Extractwsp handler)
    {
        string targetPath = Path.Combine(handler.TargetPath, "solutionid.txt");

        if (!handler.Overwrite && File.Exists(targetPath))
        {
            return;
        }
        using (StreamWriter sw = File.CreateText(targetPath))
        {
            sw.WriteLine(this.SolutionId);
        }
    }
Beispiel #6
0
    public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving assembly file: " + this.Location);

        string sourcePath = Path.Combine(handler.SourcePath, this.Location);
        string targetPath = Path.Combine(handler.TargetPath, @"GAC\" + this.Location);

        if (this.DeploymentTargetSpecified)
        {
            if (this.DeploymentTarget == SolutionDeploymentTargetType.WebApplication)
            {
                targetPath = Path.Combine(handler.TargetPath, @"80\bin\" + this.Location);
            }
        }

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
    }
    public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving:" + this.Location);

        string folderName = Path.GetDirectoryName(this.Location);
        string targetPath = Path.Combine(handler.TargetPath, @"12\template\features\" + this.Location);
        string sourcePath = Path.Combine(handler.SourcePath, this.Location);

        FileSystem.Move(sourcePath, targetPath, handler.Overwrite);

        FeatureDefinition feature = FileSystem.Load <FeatureDefinition>(targetPath);

        if (feature.ElementManifests != null && feature.ElementManifests.Items != null)
        {
            foreach (ElementManifestReference elementManifestRef in feature.ElementManifests.Items)
            {
                targetPath = Path.Combine(handler.TargetPath, String.Format(@"12\template\features\{0}\{1}", folderName, elementManifestRef.Location));
                sourcePath = Path.Combine(handler.SourcePath, String.Format(@"{0}\{1}", folderName, elementManifestRef.Location));
                FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
            }
        }
    }
    public void Move(Extractwsp handler)
    {
        Log.Verbose("Moving site definition:" + this.Location);

        string sourcePath = Path.Combine(handler.SourcePath, this.Location);
        string targetPath = Path.Combine(handler.TargetPath, @"12\template\SiteTemplates\" + this.Location);

        DirectorySystem.Move(sourcePath, targetPath, handler.Overwrite);

        if (this.WebTempFile != null)
        {
            foreach (WebTempFileDefinition webTempFileDef in this.WebTempFile)
            {
                targetPath = Path.Combine(handler.TargetPath, String.Format(@"12\template\{0}", webTempFileDef.Location));
                sourcePath = Path.Combine(handler.SourcePath, webTempFileDef.Location);

                // The file may have been move previously
                if (File.Exists(sourcePath))
                {
                    FileSystem.Move(sourcePath, targetPath, handler.Overwrite);
                }
            }
        }
    }
Beispiel #9
0
    public void Move(Extractwsp handler)
    {
        if (this.FeatureManifests != null)
        {
            foreach (FeatureManifestReference featureRef in this.FeatureManifests)
            {
                featureRef.Move(handler);
            }
        }


        if (this.TemplateFiles != null)
        {
            foreach (TemplateFileReference templateFileRef in this.TemplateFiles)
            {
                templateFileRef.Move(handler);
            }
        }


        if (this.SiteDefinitionManifests != null)
        {
            foreach (SiteDefinitionManifestFileReference siteDefManifestFileRef in this.SiteDefinitionManifests)
            {
                siteDefManifestFileRef.Move(handler);
            }
        }


        // Move the wpresources and App_GlobalResources files
        if (this.ApplicationResourceFiles != null && this.ApplicationResourceFiles.Items != null)
        {
            foreach (object item in this.ApplicationResourceFiles.Items)
            {
                if (item is App_GlobalResourceFileDefinition)
                {
                    App_GlobalResourceFileDefinition globalItem = item as App_GlobalResourceFileDefinition;
                }
                else
                {
                    ApplicationResourceFileDefinition appResourceFileDef = item as ApplicationResourceFileDefinition;
                    appResourceFileDef.Move(handler);
                }
            }
        }

        if (this.DwpFiles != null)
        {
            foreach (DwpFileDefinition dwpFileDef in this.DwpFiles)
            {
                dwpFileDef.Move(handler);
            }
        }

        if (this.Resources != null)
        {
            foreach (ResourceDefinition resouceDef in this.Resources)
            {
                resouceDef.Move(handler);
            }
        }

        if (this.RootFiles != null)
        {
            foreach (RootFileReference rootFileRef in this.RootFiles)
            {
                rootFileRef.Move(handler);
            }
        }

        if (this.Assemblies != null)
        {
            foreach (AssemblyFileReference assemblyFileRef in this.Assemblies)
            {
                assemblyFileRef.Move(handler);
            }
        }

        // Move the manifest.xml
        MoveManifest(handler);

        // Create Solution ID file
        CreateSolutionIdFile(handler);
    }