Exemplo n.º 1
0
        private bool ModifyInstallationVersionInfo(SIBuilderInfo info)
        {
            Log("MODIFYING VERSION INFO");

            string version = String.Concat(info.majorVersion.ToString(), ".", info.minorVersion.ToString());

            version = String.Concat(version, ".", info.buildNumber.ToString());

            Log("Making ipr file writable");
            if (!MakeIprFileWritable(true))
            {
                return(false);
            }

            Log("Modifying Version number");
            if (!this.ModifyVersionNumber(info))
            {
                return(false);
            }

//			Log("Copying ipr file");
//			if (!this.CopyModifiedIprFile())
//				return false;

            Log("Making ipr file read only");
            if (!MakeIprFileWritable(false))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
 public Builder(SIBuilderInfo sib, MailInfo mi, ListView.ListViewItemCollection scDetails)
 {
     sibInfo              = sib;
     miInfo               = mi;
     IsBuilding           = false;
     IsPaused             = false;
     IsBuildAborted       = false;
     SourceControlDetails = scDetails;
 }
Exemplo n.º 3
0
 public Builder(SIBuilderInfo sib, MailInfo mi, ListView.ListViewItemCollection scDetails)
 {
     sibInfo = sib;
     miInfo = mi;
     IsBuilding = false;
     IsPaused = false;
     IsBuildAborted = false;
     SourceControlDetails = scDetails;
 }
Exemplo n.º 4
0
        private bool ModifyVersionNumber(SIBuilderInfo info)
        {
            string tempFileName   = Path.GetFileNameWithoutExtension(this.sibInfo.PackageScript);
            string iprFile        = String.Concat(Path.GetDirectoryName(this.sibInfo.PackageScript), Path.DirectorySeparatorChar.ToString(), tempFileName);
            string scriptFileName = Path.GetFileName(iprFile);

            string newVersionString = String.Concat(info.majorVersion.ToString(), ".", info.minorVersion.ToString(), ".", info.buildNumber.ToString());

            ArrayList FindReplaceList = new ArrayList();

            FindReplaceList.Add(new FindReplaceInfo("<row><td>ProductVersion</td><td>0.0.0</td><td/></row>", String.Concat("<row><td>ProductVersion</td><td>", newVersionString, "</td><td/></row>")));
            FindReplaceList.Add(new FindReplaceInfo("MajorVersion</td><td>#0", String.Concat("MajorVersion</td><td>#", info.majorVersion.ToString().Trim())));
            FindReplaceList.Add(new FindReplaceInfo("MinorVersion</td><td>#0", String.Concat("MinorVersion</td><td>#", info.minorVersion.ToString().Trim())));
            FindReplaceList.Add(new FindReplaceInfo("BuildNumber</td><td>#0", String.Concat("BuildNumber</td><td>#", info.buildNumber.ToString().Trim())));
            FindAndReplaceInFile(iprFile, FindReplaceList);

            return(true);
        }
Exemplo n.º 5
0
        private bool ModifyVersionNumber(SIBuilderInfo info)
        {
            string tempFileName = Path.GetFileNameWithoutExtension (this.sibInfo.PackageScript);
            string iprFile = String.Concat (Path.GetDirectoryName (this.sibInfo.PackageScript), Path.DirectorySeparatorChar.ToString(), tempFileName);
            string scriptFileName = Path.GetFileName (iprFile);

            string newVersionString = String.Concat (info.majorVersion.ToString(), ".", info.minorVersion.ToString(), ".", info.buildNumber.ToString());

            ArrayList FindReplaceList = new ArrayList();
            FindReplaceList.Add (new FindReplaceInfo ("<row><td>ProductVersion</td><td>0.0.0</td><td/></row>" , String.Concat ("<row><td>ProductVersion</td><td>", newVersionString, "</td><td/></row>")));
            FindReplaceList.Add (new FindReplaceInfo ("MajorVersion</td><td>#0", String.Concat ("MajorVersion</td><td>#", info.majorVersion.ToString().Trim())));
            FindReplaceList.Add (new FindReplaceInfo ("MinorVersion</td><td>#0", String.Concat ("MinorVersion</td><td>#", info.minorVersion.ToString().Trim())));
            FindReplaceList.Add (new FindReplaceInfo ("BuildNumber</td><td>#0", String.Concat ("BuildNumber</td><td>#", info.buildNumber.ToString().Trim())));
            FindAndReplaceInFile (iprFile, FindReplaceList);

            return true;
        }
Exemplo n.º 6
0
        private bool ModifyInstallationVersionInfo(SIBuilderInfo info)
        {
            Log("MODIFYING VERSION INFO");

            string version = String.Concat(info.majorVersion.ToString(), ".", info.minorVersion.ToString());
            version = String.Concat(version, ".", info.buildNumber.ToString());

            Log("Making ipr file writable");
            if (!MakeIprFileWritable(true))
                return false;

            Log("Modifying Version number");
            if (!this.ModifyVersionNumber(info))
                return false;

            //			Log("Copying ipr file");
            //			if (!this.CopyModifiedIprFile())
            //				return false;

            Log("Making ipr file read only");
            if (!MakeIprFileWritable(false))
                return false;

            return true;
        }