summaryrefslogtreecommitdiffstats
path: root/windows/batch_net
diff options
context:
space:
mode:
authorFang Guo <fangguo@ncsa.uiuc.edu>2005-06-10 19:16:54 (GMT)
committerFang Guo <fangguo@ncsa.uiuc.edu>2005-06-10 19:16:54 (GMT)
commit476c5ed1502c0d4af90d6758a6d7240ee99e8dad (patch)
tree452c49a4f949fe4cd6c1f29f3d72dfd866c36d41 /windows/batch_net
parent46323232f3cc160cee2ff29ec8e3fbdc8d37c758 (diff)
downloadhdf5-476c5ed1502c0d4af90d6758a6d7240ee99e8dad.zip
hdf5-476c5ed1502c0d4af90d6758a6d7240ee99e8dad.tar.gz
hdf5-476c5ed1502c0d4af90d6758a6d7240ee99e8dad.tar.bz2
[svn-r10896] Purpose:
Add convert.js Description: convert.js will be used to convert project files format from MSVS 6.0 to MSVS .Net Solution: Platforms tested: Windows XP Misc. update:
Diffstat (limited to 'windows/batch_net')
-rwxr-xr-xwindows/batch_net/convert.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/windows/batch_net/convert.js b/windows/batch_net/convert.js
new file mode 100755
index 0000000..c2e65fe
--- /dev/null
+++ b/windows/batch_net/convert.js
@@ -0,0 +1,34 @@
+/* Provided by: Microsoft
+ URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vclrfupgradingvisualcprojectstovisualstudionetinbatchmode.asp
+*/
+var vcProj = new ActiveXObject("VisualStudio.VCProjectEngine.7.1");
+var objFile = new ActiveXObject("Scripting.FileSystemObject");
+var objArgs = WScript.Arguments;
+
+// check the arguments to be sure it's right
+if (objArgs.Count() < 2)
+{
+ WScript.Echo("VC6 or 5 DSP Project File Conversion");
+ WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.");
+ WScript.Echo("Will create project file with .vcproj extension");
+ WScript.Echo("\n\tusage: <full path\project.dsp> <full path\project.vcproj>");
+ WScript.Quit(1);
+}
+
+WScript.Echo("\nConverting: "+ objArgs.Item(0));
+// If there is a file name of the .vcproj extension, do not convert
+var vcProject = vcProj.LoadProject(objArgs.Item(0));
+if (!objFile.FileExists(vcProject.ProjectFile))
+{
+ // specify name and location of new project file
+ vcProject.ProjectFile = objArgs.Item(1);
+
+ // call the project engine to save this off.
+ // when no name is shown, it will create one with the .vcproj name
+ vcProject.Save();
+ WScript.Echo("New Project Name: "+vcProject.ProjectFile+"\n");
+}
+else
+{
+ WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!\n");
+}