major source structure and module name changes -continue
This commit is contained in:
6
CASA/tools/linux/abldimg32
Executable file
6
CASA/tools/linux/abldimg32
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
source /opt/SuSE/bin/.profile
|
||||
export BUILD_DIST=i386 build
|
||||
sudo build --clean
|
||||
|
||||
6
CASA/tools/linux/abldimg64
Executable file
6
CASA/tools/linux/abldimg64
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
source /opt/SuSE/bin/.profile
|
||||
export BUILD_DIST=x86_64
|
||||
sudo build --clean
|
||||
|
||||
94
CASA/tools/linux/mk-casa-tar
Executable file
94
CASA/tools/linux/mk-casa-tar
Executable file
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
if [ $# -gt 2 ] > /dev/null 2>&1
|
||||
then
|
||||
echo Working...
|
||||
|
||||
#create build temp directory
|
||||
mkdir -p ~/bld_tst
|
||||
rm -rf ~/bld_tst/*
|
||||
mkdir -p ~/bld_tst/CASA-$1.$2.$3
|
||||
|
||||
#copy the source to build temp directory
|
||||
cd ../..
|
||||
cp -R ./* ~/bld_tst/CASA-$1.$2.$3
|
||||
|
||||
#go to build temp directory
|
||||
cd ~/bld_tst/CASA-$1.$2.$3
|
||||
|
||||
#do dos2unx and remove unncessary directory
|
||||
|
||||
dos2unix c_micasad/startup/micasad > /dev/null 2>&1
|
||||
chmod +x c_micasad/startup/micasad
|
||||
rm -rf products bin bin64 lib lib64 obj obj64
|
||||
|
||||
find . -name "*.lux" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "mk*" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "mk*" | xargs chmod +x > /dev/null 2>&1
|
||||
find . -name "Make*" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.c" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.cs" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.cpp" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.java" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.h" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "link*" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name ".svn" | xargs rm -rf > /dev/null 2>&1
|
||||
find . -name "*.sh" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.sh" | xargs chmod +x > /dev/null 2>&1
|
||||
find . -name "*ver.txt" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*build.txt" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.mak" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.cl" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.spec" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.patch" | xargs dos2unix > /dev/null 2>&1
|
||||
find . -name "*.changes" | xargs dos2unix > /dev/null 2>&1
|
||||
|
||||
rm -rf ./casa-yast
|
||||
rm -rf ./c_kwallet
|
||||
|
||||
|
||||
#create spec file from spec template
|
||||
cp -f ./package/linux/CASA.spec.in ./package/linux/CASA.spec
|
||||
cp -f ./CASA.changes ./package/linux/CASA.changes
|
||||
|
||||
#do create spec file
|
||||
cd ./package/linux
|
||||
dos2unix CASA.spec CASA.changes > /dev/null 2>&1
|
||||
sed -i "s/@VERSION@/$1\.$2\.$3/" CASA.spec
|
||||
sed -i "s/@PACKAGE@/CASA/" CASA.spec
|
||||
cd ~/bld_tst/CASA-$1.$2.$3
|
||||
sed -i "s/\(AM_INIT_AUTOMAKE.*\))/\AM_INIT_AUTOMAKE\(CASA, 1\.6\.$SVN_REVISION\)/" ./configure.in
|
||||
|
||||
#create source tar file
|
||||
cd ~/bld_tst
|
||||
tar cjf CASA-$1.$2.$3.tar.bz2 ./CASA-$1.$2.$3/ > /dev/null 2>&1
|
||||
|
||||
#copy the tar,spec,changes file to package directory.
|
||||
cd CASA-$1.$2.$3
|
||||
mkdir -p SOURCE
|
||||
cp -f ../CASA-$1.$2.$3.tar.bz2 ./SOURCE
|
||||
cp -f ./package/linux/CASA.spec ./SOURCE
|
||||
cp -f ./CASA.changes ./SOURCE
|
||||
|
||||
#copy abldimg
|
||||
cd ~/bld_tst/CASA-$1.$2.$3/tools/linux
|
||||
chmod +x abldimg32 abldimg64
|
||||
ARCH=`uname -a | grep -c 64`
|
||||
if [ $ARCH -gt 0 ] > /dev/null 2>&1
|
||||
then cp -f ./abldimg32 ~/bld_tst/CASA-$1.$2.$3/SOURCE
|
||||
else
|
||||
cp -f ./abldimg64 ~/bld_tst/CASA-$1.$2.$3/SOURCE
|
||||
fi
|
||||
echo Done!
|
||||
|
||||
else
|
||||
echo
|
||||
echo Usage: mk-casa-tar maj min bld [d]
|
||||
echo maj = major version number
|
||||
echo min = minor version number
|
||||
echo bld = svn bld revision number
|
||||
echo "d = debug rpm (optional)"
|
||||
echo example = mk-patch-tar 1 5 187
|
||||
echo example = mk-patch-tar 2 5 236 d
|
||||
echo
|
||||
fi
|
||||
105
CASA/tools/w32/VersionVDProj/App.cs
Normal file
105
CASA/tools/w32/VersionVDProj/App.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
//
|
||||
// copyright 2003 Don Kackman - mailto:dkackman_2000@yahoo.com
|
||||
//
|
||||
// no warranty expressed or implied
|
||||
// use however you'd like
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace VersionVDProj
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the class that has the Main method. This class is responsible for parsing command line
|
||||
/// arguments and dispatching them to the correct classes
|
||||
/// </summary>
|
||||
class App
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static int Main(string[] args)
|
||||
{
|
||||
if ( args.Length != 0 )
|
||||
{
|
||||
try
|
||||
{
|
||||
ArgumentParser arguments = new ArgumentParser( args );
|
||||
VDProjectVersioner versioner = null;
|
||||
|
||||
switch ( arguments.Command )
|
||||
{
|
||||
case "msi":
|
||||
versioner = new MSIProjectVersioner( arguments.ProjectFile );
|
||||
break;
|
||||
case "msm":
|
||||
versioner = new MSMProjectVersioner( arguments.ProjectFile );
|
||||
break;
|
||||
default:
|
||||
throw new Exception( string.Format( "Unrecognized command {0}", arguments.Command ) );
|
||||
}
|
||||
|
||||
versioner.UpdateFile( arguments.Options );
|
||||
return 0;
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
Console.WriteLine( "ERROR" );
|
||||
Console.WriteLine( e.Message );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// with no arguments show the usage
|
||||
ShowUsage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static void ShowUsage()
|
||||
{
|
||||
Console.WriteLine( "VersionVDProj -msi <PATH> version=<VERSION> [package=<PACKAGECODE>]" );
|
||||
Console.WriteLine( "\t[product=<PRODUCTCODE>] [upgrade=<UPGRADECODE>]" );
|
||||
Console.WriteLine( "The -msi switch is used for updating MSI installer projects" );
|
||||
Console.WriteLine( "" );
|
||||
Console.WriteLine( "<PATH> is the path to the vdproj file (without braces)" );
|
||||
Console.WriteLine( "<VERSION> is the version to use in format #.#.# (without braces)" );
|
||||
Console.WriteLine( "<PACKAGECODE> Optional package guid (if not specified will be auto-generated)" );
|
||||
Console.WriteLine( "<PRODUCTCODE> Optional product guid (if not specified will be set to the" );
|
||||
Console.WriteLine( "\tsame value used to set the package guid)" );
|
||||
Console.WriteLine( "<UPGRADECODE> Optional upgrade guid (if not specified the upgrade code will" );
|
||||
Console.WriteLine( "\tnot be modified)" );
|
||||
Console.WriteLine( "" );
|
||||
Console.WriteLine( "VersionVDProj -msm <PATH> version=<VERSION> [signature=<SIGNATURE>]" );
|
||||
Console.WriteLine( "The -msm switch is used for updating merge module projects" );
|
||||
Console.WriteLine( "" );
|
||||
Console.WriteLine( "<PATH> is the path to the vdproj file (without braces)" );
|
||||
Console.WriteLine( "<VERSION> is the version to use in format #.#.# (without braces)" );
|
||||
Console.WriteLine( "<SIGNATURE> Optional unique id for the merge module (if not specified a guid" );
|
||||
Console.WriteLine( "\tbased signature will be auto-generated)" );
|
||||
Console.WriteLine( "" );
|
||||
Console.WriteLine( "Named arguments can be specified in any order" );
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
CASA/tools/w32/VersionVDProj/App.ico
Normal file
BIN
CASA/tools/w32/VersionVDProj/App.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
82
CASA/tools/w32/VersionVDProj/ArgumentParser.cs
Normal file
82
CASA/tools/w32/VersionVDProj/ArgumentParser.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
namespace VersionVDProj
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ArgumentParser.
|
||||
/// </summary>
|
||||
public class ArgumentParser
|
||||
{
|
||||
public readonly Hashtable Options;
|
||||
public readonly string Command;
|
||||
public readonly FileInfo ProjectFile;
|
||||
|
||||
public ArgumentParser( string[] args )
|
||||
{
|
||||
Options = new Hashtable();
|
||||
|
||||
if ( args.Length < 2 )
|
||||
throw new Exception( "Wrong number of arguments" );
|
||||
|
||||
Command = ParseCommand( args[0] );
|
||||
ProjectFile = ParseFileName( args[1] );
|
||||
|
||||
for ( int i = 2; i < args.Length; i++ )
|
||||
ParseArgument( args[i] );
|
||||
}
|
||||
|
||||
private string ParseCommand( string command )
|
||||
{
|
||||
if ( command.Substring( 0, 1 ) != "-" )
|
||||
throw new Exception( string.Format( "Unrecognized command {0}", command ) );
|
||||
|
||||
return command.Substring( 1 ).ToLower();
|
||||
}
|
||||
|
||||
private FileInfo ParseFileName( string path )
|
||||
{
|
||||
FileInfo file = new FileInfo( path );
|
||||
if ( !file.Exists )
|
||||
throw new Exception( string.Format( "The file {0} could not be found", path ) );
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
private void ParseArgument( string arg )
|
||||
{
|
||||
int eqPos = arg.IndexOf( '=', 0 );
|
||||
|
||||
if ( eqPos == -1 )
|
||||
throw new Exception( string.Format( "The argument {0} is not in the format NAME=VALUE", arg ) );
|
||||
|
||||
string name = arg.Substring( 0, eqPos );
|
||||
string val = arg.Substring( eqPos + 1 );
|
||||
|
||||
Options.Add( name.ToLower(), val );
|
||||
}
|
||||
}
|
||||
}
|
||||
86
CASA/tools/w32/VersionVDProj/AssemblyInfo.cs
Normal file
86
CASA/tools/w32/VersionVDProj/AssemblyInfo.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
//
|
||||
// copyright 2003 Don Kackman - mailto:dkackman_2000@yahoo.com
|
||||
//
|
||||
// no warranty expressed or implied
|
||||
// use however you'd like
|
||||
//
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("Deployment Project Versioning Tool")]
|
||||
[assembly: AssemblyDescription("Updates the version and guid of Visual Studio.Net deployment projects")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("2003 Don Kackman")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
93
CASA/tools/w32/VersionVDProj/MSIProjectVersioner.cs
Normal file
93
CASA/tools/w32/VersionVDProj/MSIProjectVersioner.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
//
|
||||
// copyright 2003 Don Kackman - mailto:dkackman_2000@yahoo.com
|
||||
//
|
||||
// no warranty expressed or implied
|
||||
// use however you'd like
|
||||
//
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
namespace VersionVDProj
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that updates the version info of MSI projects
|
||||
/// </summary>
|
||||
public class MSIProjectVersioner : VDProjectVersioner
|
||||
{
|
||||
private readonly static Guid MSI_PROJECT_TYPE = new Guid( "{2C2AF0D9-9B47-4FE5-BEF2-169778172667}" );
|
||||
|
||||
private Guid productCode = Guid.Empty;
|
||||
private Guid packageCode = Guid.Empty;
|
||||
private Guid upgradeCode = Guid.Empty;
|
||||
/// <summary>
|
||||
/// createas a new instance of the class
|
||||
/// </summary>
|
||||
/// <param name="file">the project file</param>
|
||||
public MSIProjectVersioner( FileInfo file ) : base( file, MSI_PROJECT_TYPE )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void SetOptions( Hashtable options )
|
||||
{
|
||||
// get the package code - generate if not specified
|
||||
if ( options.Contains("packagecode") )
|
||||
packageCode = new Guid( options["packagecode"].ToString() );
|
||||
else
|
||||
packageCode = Guid.NewGuid();
|
||||
|
||||
// get the product code - set to package code if not specified
|
||||
if ( options.Contains("productcode") )
|
||||
productCode = new Guid( options["productcode"].ToString() );
|
||||
else
|
||||
productCode = packageCode;
|
||||
|
||||
// get the upgrade code - leave empty if not specified
|
||||
if ( options.Contains("upgradecode") )
|
||||
upgradeCode = new Guid( options["upgradecode"].ToString() );
|
||||
}
|
||||
|
||||
protected override string TranslateLine( string line )
|
||||
{
|
||||
// look for the properties we are interested in changing
|
||||
// if we find them, replace the old value with the new and return the new line string
|
||||
// otherwise just return the line string
|
||||
if ( line.IndexOf( "\"ProductVersion\"" ) != -1 )
|
||||
line = ReplaceValue( line, "ProductVersion", version.ThreePartVersion );
|
||||
|
||||
else if ( productCode != Guid.Empty && line.IndexOf( "\"ProductCode\"" ) != -1 )
|
||||
line = ReplaceValue( line, "ProductCode", "{" + productCode.ToString().ToUpper() + "}" );
|
||||
|
||||
else if ( packageCode != Guid.Empty && line.IndexOf( "\"PackageCode\"" ) != -1 )
|
||||
line = ReplaceValue( line, "PackageCode", "{" + packageCode.ToString().ToUpper() + "}" );
|
||||
|
||||
else if ( upgradeCode != Guid.Empty && line.IndexOf( "\"UpgradeCode\"" ) != -1 )
|
||||
line = ReplaceValue( line, "UpgradeCode", "{" + upgradeCode.ToString().ToUpper() + "}" );
|
||||
|
||||
return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
76
CASA/tools/w32/VersionVDProj/MSMProjectVersioner.cs
Normal file
76
CASA/tools/w32/VersionVDProj/MSMProjectVersioner.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, Novell, Inc.
|
||||
*
|
||||
* To contact Novell about this file by physical or electronic mail,
|
||||
* you may find current contact information at www.novell.com.
|
||||
*
|
||||
***********************************************************************/
|
||||
//
|
||||
// copyright 2003 Don Kackman - mailto:dkackman_2000@yahoo.com
|
||||
//
|
||||
// no warranty expressed or implied
|
||||
// use however you'd like
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
namespace VersionVDProj
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that updates the version info of merge module projects
|
||||
/// </summary>
|
||||
public class MSMProjectVersioner : VDProjectVersioner
|
||||
{
|
||||
private readonly static Guid MSM_PROJECT_TYPE = new Guid( "{DD7A5B58-C2F9-40FF-B2EF-0773356FB978}" );
|
||||
|
||||
private string signature;
|
||||
|
||||
/// <summary>
|
||||
/// createas a new instance of the class
|
||||
/// </summary>
|
||||
/// <param name="file">the project file</param>
|
||||
public MSMProjectVersioner( FileInfo file ) : base( file, MSM_PROJECT_TYPE )
|
||||
{
|
||||
}
|
||||
|
||||
protected override void SetOptions( Hashtable options )
|
||||
{
|
||||
// get the signature - generate if not specified
|
||||
if ( options.Contains( "signature" ) )
|
||||
signature = options[signature].ToString();
|
||||
else
|
||||
signature = "MergeModule." + Guid.NewGuid().ToString().ToUpper().Replace( "-", "" );
|
||||
}
|
||||
|
||||
protected override string TranslateLine( string line )
|
||||
{
|
||||
// look for the properties we are interested in changing
|
||||
// if we find them, replace the old value with the new and return the new line string
|
||||
// otherwise just return the line string
|
||||
if ( line.IndexOf( "\"Version\"" ) != -1 )
|
||||
line = ReplaceValue( line, "Version", version.FourPartVersion );
|
||||
|
||||
// module signature cannot have dashes
|
||||
else if ( line.IndexOf( "\"ModuleSignature\"" ) != -1 )
|
||||
line = ReplaceValue( line, "ModuleSignature", signature );
|
||||
|
||||
return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
CASA/tools/w32/VersionVDProj/README
Normal file
18
CASA/tools/w32/VersionVDProj/README
Normal file
@@ -0,0 +1,18 @@
|
||||
This is a command line utility that updates the version and GUID of VS.NET project files.
|
||||
|
||||
The source for this tool has been downloaded from the following site.
|
||||
|
||||
http://www.codeproject.com/dotnet/VersionVDProj.asp#xx1436860xx
|
||||
|
||||
The copy right associated with this tool is as followings:
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// copyright 2003 Don Kackman - mailto:dkackman_2000@yahoo.com
|
||||
//
|
||||
// no warranty expressed or implied
|
||||
// use however you'd like
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
4/14/2006
|
||||
|
||||
|
||||
BIN
CASA/tools/w32/VersionVDProj/bin/VersionVDProj.exe
Executable file
BIN
CASA/tools/w32/VersionVDProj/bin/VersionVDProj.exe
Executable file
Binary file not shown.
BIN
CASA/tools/w32/VersionVDProj/bin/VersionVDProj.pdb
Normal file
BIN
CASA/tools/w32/VersionVDProj/bin/VersionVDProj.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user