I'm trying to get rid of all of the interrelated repositories needed to build
the Windows installer, and leverage the Mercurial packaging scripts which simply
install everything into a staging area and dynamically generate the MSI files
based on that. I don't see any reason to hold these externally, since there are
already platform specific files in this repo, and having it locally simplifies
things.
This corresponds to winbuild[1] ee69ebca43e7.
[1] https://foss.heptapod.net/mercurial/tortoisehg/thg-winbuild
diff --git a/contrib/windows/diff-scripts/Readme.txt b/contrib/windows/diff-scripts/Readme.txt
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/Readme.txt
@@ -0,0 +1,13 @@
+This folder contains scripts which can be used to start other programs
+to diff non-text files.
+
+The scripts are named after the file extension they're able to diff.
+E.g. the script to diff word files is called 'diff-doc.vbs', the script
+to merge three word files is called 'merge-doc.vbs'.
+
+The scripts must be implemented so that they take the following parameters:
+diff-ext %base %mine
+merge-ext %merged %theirs %mine %base
+
+The scripts can then decide themselves if they need all the params or if
+they have to add additional params to the application they call.
diff --git a/contrib/windows/diff-scripts/SOURCE.txt b/contrib/windows/diff-scripts/SOURCE.txt
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/SOURCE.txt
@@ -0,0 +1,7 @@
+These files were downloaded from:
+
+http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/contrib/diff-scripts/
+
+username: guest, no password
+
+On Christmas day, 2009.
\ No newline at end of file
diff --git a/contrib/windows/diff-scripts/diff-dll.vbs b/contrib/windows/diff-scripts/diff-dll.vbs
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-dll.vbs
@@ -0,0 +1,108 @@
+' extensions: dll;exe
+'
+' TortoiseSVN Diff script for binary files
+'
+' Copyright (C) 2010-2014 the TortoiseSVN team
+' This file is distributed under the same license as TortoiseSVN
+'
+' Last commit by:
+' $Author$
+' $Date$
+' $Rev$
+'
+' Authors:
+' Casey Barton, 2010
+' Hans-Emil Skogh, 2011
+'
+dim objArgs, objFileSystem, sBaseVer, sNewVer, sMessage, sBaseMessage, sNewMessage, bDiffers
+
+bDiffers = False
+
+Set objArgs = WScript.Arguments
+num = objArgs.Count
+if num < 2 then
+ MsgBox "Usage: [CScript | WScript] diff-dll.vbs base.[dll|exe] new.[dll|exe]", vbCritical, "Invalid arguments"
+ WScript.Quit 1
+end if
+
+sBaseFile = objArgs(0)
+sNewFile = objArgs(1)
+
+Set objFileSystem = CreateObject("Scripting.FileSystemObject")
+If objFileSystem.FileExists(sBaseFile) = False Then
+ MsgBox "File " + sBaseFile + " does not exist. Cannot compare the files.", vbCritical, "File not found"
+ Wscript.Quit 1
+End If
+If objFileSystem.FileExists(sNewFile) = False Then
+ MsgBox "File " + sNewFile + " does not exist. Cannot compare the files.", vbCritical, "File not found"
+ Wscript.Quit 1
+End If
+
+' Compare file size
+dim fBaseFile, fNewFile
+Set fBaseFile = objFileSystem.GetFile(sBaseFile)
+Set fNewFile = objFileSystem.GetFile(sNewFile)
+
+If fBaseFile.size <> fNewFile.size Then
+ bDiffers = True
+ sBaseMessage = sBaseMessage + " Size: " + CStr(fBaseFile.Size) + " bytes" + vbCrLf
+ sNewMessage = sNewMessage + " Size: " + CStr(fNewFile.Size) + " bytes" + vbCrLf
+Else
+ sMessage = sMessage + "File sizes: " + CStr(fNewFile.Size) + " bytes" + vbCrLf
+End If
+
+' Compare files using fc.exe
+If bDiffers = False Then
+ Set WshShell = WScript.CreateObject("WScript.Shell")
+ exitStatus = WshShell.Run("fc.exe """ + sBaseFile + """ """ + sNewFile + """", 0, True)
+ If exitStatus = 1 Then
+ bDiffers = True
+ sMessage = sMessage + "File content differs!" + vbCrLf
+ ElseIf exitStatus > 1 Then
+ ' Todo: Handle error!
+ End If
+End If
+
+' Only compare versions if we are comparing exe:s or dll:s
+If LCase(Right(sBaseFile, 3)) = "exe" or LCase(Right(sNewFile, 3)) = "exe" or _
+ LCase(Right(sBaseFile, 3)) = "dll" or LCase(Right(sNewFile, 3)) = "dll" Then
+
+ ' Compare version
+ sBaseVer = objFileSystem.GetFileVersion(sBaseFile)
+ sNewVer = objFileSystem.GetFileVersion(sNewFile)
+
+ If Len(sBaseVer) = 0 and Len(sNewVer) = 0 Then
+ sMessage = sMessage + "No version information available."
+ ElseIf sBaseVer = sNewVer Then
+ sMessage = sMessage + "Version: " + sBaseVer
+ Else
+ sBaseMessage = sBaseMessage + " Version: " + sBaseVer + vbCrLf
+ sNewMessage = sNewMessage + " Version: " + sNewVer + vbCrLf
+ End If
+End If
+
+' Generate result message
+sBaseMessage = "Base" + vbCrLf _
+ + " File: " + sBaseFile + vbCrLf _
+ + sBaseMessage
+sNewMessage = + "New" + vbCrLf _
+ + " File: " + sNewFile + vbCrLf _
+ + sNewMessage
+
+If bDiffers = True Then
+ sMessage = "Files differ!" + vbCrLf _
+ + vbCrLf _
+ + sBaseMessage + vbCrLf _
+ + sNewMessage + vbCrLf _
+ + sMessage
+
+ MsgBox sMessage, vbExclamation, "File Comparison - Differs"
+Else
+ sMessage = "Files are identical" + vbCrLf _
+ + vbCrLf _
+ + sMessage
+
+ MsgBox sMessage, vbInformation, "File Comparison - Identical"
+End If
+
+Wscript.Quit
diff --git a/contrib/windows/diff-scripts/diff-doc.js b/contrib/windows/diff-scripts/diff-doc.js
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-doc.js
@@ -0,0 +1,218 @@
+// extensions: doc;docx;docm
+//
+// TortoiseSVN Diff script for Word Doc files
+//
+// Copyright (C) 2004-2008, 2011-2015 the TortoiseSVN team
+// This file is distributed under the same license as TortoiseSVN
+//
+// Last commit by:
+// $Author$
+// $Date$
+// $Rev$
+//
+// Authors:
+// Stefan Kueng, 2011, 2013
+// Jared Silva, 2008
+// Davide Orlandi and Hans-Emil Skogh, 2005
+//
+
+var objArgs, num, sBaseDoc, sNewDoc, sTempDoc, objScript, word, destination;
+// Microsoft Office versions for Microsoft Windows OS
+var vOffice2000 = 9;
+var vOffice2002 = 10;
+//var vOffice2003 = 11;
+var vOffice2007 = 12;
+var vOffice2013 = 15;
+// WdCompareTarget
+//var wdCompareTargetSelected = 0;
+//var wdCompareTargetCurrent = 1;
+var wdCompareTargetNew = 2;
+// WdViewType
+var wdMasterView = 5;
+var wdNormalView = 1;
+var wdOutlineView = 2;
+// WdSaveOptions
+var wdDoNotSaveChanges = 0;
+//var wdPromptToSaveChanges = -2;
+//var wdSaveChanges = -1;
+var wdReadingView = 7;
+
+objArgs = WScript.Arguments;
+num = objArgs.length;
+if (num < 2)
+{
+ WScript.Echo("Usage: [CScript | WScript] diff-doc.js base.doc new.doc");
+ WScript.Quit(1);
+}
+
+sBaseDoc = objArgs(0);
+sNewDoc = objArgs(1);
+
+objScript = new ActiveXObject("Scripting.FileSystemObject");
+
+if (!objScript.FileExists(sBaseDoc))
+{
+ WScript.Echo("File " + sBaseDoc + " does not exist. Cannot compare the documents.");
+ WScript.Quit(1);
+}
+
+if (!objScript.FileExists(sNewDoc))
+{
+ WScript.Echo("File " + sNewDoc + " does not exist. Cannot compare the documents.");
+ WScript.Quit(1);
+}
+
+try
+{
+ word = WScript.CreateObject("Word.Application");
+
+ if (parseInt(word.Version, 10) >= vOffice2013)
+ {
+ var f = objScript.GetFile(sBaseDoc);
+ if (f.attributes & 1)
+ {
+ f.attributes -= 1;
+ }
+ }
+}
+catch (e)
+{
+ // before giving up, try with OpenOffice
+ var OO;
+ try
+ {
+ OO = WScript.CreateObject("com.sun.star.ServiceManager");
+ }
+ catch (e)
+ {
+ WScript.Echo("You must have Microsoft Word or OpenOffice installed to perform this operation.");
+ WScript.Quit(1);
+ }
+ // yes, OO is installed - do the diff with that one instead
+ var objFile = objScript.GetFile(sNewDoc);
+ if ((objFile.Attributes & 1) === 1)
+ {
+ // reset the readonly attribute
+ objFile.Attributes &= ~1;
+ }
+ //Create the DesktopSet
+ var objDesktop = OO.createInstance("com.sun.star.frame.Desktop");
+ var objUriTranslator = OO.createInstance("com.sun.star.uri.ExternalUriReferenceTranslator");
+ //Adjust the paths for OO
+ sBaseDoc = sBaseDoc.replace(/\\/g, "/");
+ sBaseDoc = sBaseDoc.replace(/:/g, "|");
+ sBaseDoc = sBaseDoc.replace(/ /g, "%20");
+ sBaseDoc = sBaseDoc.replace(/#/g, "%23");
+ sBaseDoc = "file:///" + sBaseDoc;
+ sBaseDoc = objUriTranslator.translateToInternal(sBaseDoc);
+ sNewDoc = sNewDoc.replace(/\\/g, "/");
+ sNewDoc = sNewDoc.replace(/:/g, "|");
+ sNewDoc = sNewDoc.replace(/ /g, "%20");
+ sNewDoc = sNewDoc.replace(/#/g, "%23");
+ sNewDoc = "file:///" + sNewDoc;
+ sNewDoc = objUriTranslator.translateToInternal(sNewDoc);
+
+ //Open the %base document
+ var oPropertyValue = [];
+ oPropertyValue[0] = OO.Bridge_GetStruct("com.sun.star.beans.PropertyValue");
+ oPropertyValue[0].Name = "ShowTrackedChanges";
+ oPropertyValue[0].Value = true;
+ objDesktop.loadComponentFromURL(sNewDoc, "_blank", 0, oPropertyValue);
+
+ //Set the frame
+ var Frame = objDesktop.getCurrentFrame();
+
+ var dispatcher = OO.CreateInstance("com.sun.star.frame.DispatchHelper");
+
+ //Execute the comparison
+ dispatcher.executeDispatch(Frame, ".uno:ShowTrackedChanges", "", 0, oPropertyValue);
+ oPropertyValue[0].Name = "URL";
+ oPropertyValue[0].Value = sBaseDoc;
+ dispatcher.executeDispatch(Frame, ".uno:CompareDocuments", "", 0, oPropertyValue);
+ WScript.Quit(0);
+}
+
+if (parseInt(word.Version, 10) >= vOffice2007)
+{
+ sTempDoc = sNewDoc;
+ sNewDoc = sBaseDoc;
+ sBaseDoc = sTempDoc;
+}
+
+objScript = null;
+word.visible = true;
+
+// Open the new document
+try
+{
+ destination = word.Documents.Open(sNewDoc, true, parseInt(word.Version, 10) < vOffice2013);
+}
+catch (e)
+{
+ try
+ {
+ // open empty document to prevent bug where first Open() call fails
+ word.Documents.Add();
+ destination = word.Documents.Open(sNewDoc, true, parseInt(word.Version, 10) < vOffice2013);
+ }
+ catch (e)
+ {
+ WScript.Echo("Error opening " + sNewDoc);
+ // Quit
+ WScript.Quit(1);
+ }
+}
+
+// If the Type property returns either wdOutlineView or wdMasterView and the Count property returns zero, the current document is an outline.
+if (destination.ActiveWindow.View.Type === wdOutlineView || (destination.ActiveWindow.View.Type === wdMasterView || destination.ActiveWindow.View.Type === wdReadingView) && destination.Subdocuments.Count === 0)
+{
+ // Change the Type property of the current document to normal
+ destination.ActiveWindow.View.Type = wdNormalView;
+}
+
+// Compare to the base document
+if (parseInt(word.Version, 10) <= vOffice2000)
+{
+ // Compare for Office 2000 and earlier
+ try
+ {
+ destination.Compare(sBaseDoc);
+ }
+ catch (e)
+ {
+ WScript.Echo("Error comparing " + sBaseDoc + " and " + sNewDoc);
+ // Quit
+ WScript.Quit(1);
+ }
+}
+else
+{
+ // Compare for Office XP (2002) and later
+ try
+ {
+ destination.Compare(sBaseDoc, "Comparison", wdCompareTargetNew, true, true);
+ }
+ catch (e)
+ {
+ WScript.Echo("Error comparing " + sBaseDoc + " and " + sNewDoc);
+ // Close the first document and quit
+ destination.Close(wdDoNotSaveChanges);
+ WScript.Quit(1);
+ }
+}
+
+// Show the comparison result
+if (parseInt(word.Version, 10) < vOffice2007)
+{
+ word.ActiveDocument.Windows(1).Visible = 1;
+}
+
+// Mark the comparison document as saved to prevent the annoying
+// "Save as" dialog from appearing.
+word.ActiveDocument.Saved = 1;
+
+// Close the first document
+if (parseInt(word.Version, 10) >= vOffice2002)
+{
+ destination.Close(wdDoNotSaveChanges);
+}
diff --git a/contrib/windows/diff-scripts/diff-nb.vbs b/contrib/windows/diff-scripts/diff-nb.vbs
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-nb.vbs
@@ -0,0 +1,67 @@
+'
+' TortoiseSVN Diff script for Mathematica notebooks
+'
+' Last commit by:
+' $Author$
+' $Date$
+' $Rev$
+'
+' Authors:
+' Szabolcs Horvát, 2008
+' Chris Rodgers http://rodgers.org.uk/, 2008
+' (Based on diff-xlsx.vbs)
+'
+
+dim objArgs, objScript, objDiffNotebook
+
+Set objArgs = WScript.Arguments
+num = objArgs.Count
+if num < 2 then
+ MsgBox "Usage: [CScript | WScript] diff-nb.vbs base.nb new.nb", vbExclamation, "Invalid arguments"
+ WScript.Quit 1
+end if
+
+sBaseFile = objArgs(0)
+sNewFile = objArgs(1)
+
+Set objScript = CreateObject("Scripting.FileSystemObject")
+
+If objScript.FileExists(sBaseFile) = False Then
+ MsgBox "File " + sBaseFile + " does not exist. Cannot compare the notebooks.", vbExclamation, "File not found"
+ Wscript.Quit 1
+Else
+ sBaseFile = objScript.GetAbsolutePathName(sBaseFile)
+End If
+
+If objScript.FileExists(sNewFile) = False Then
+ MsgBox "File " + sNewFile + " does not exist. Cannot compare the notebooks.", vbExclamation, "File not found"
+ Wscript.Quit 1
+Else
+ sNewFile = objScript.GetAbsolutePathName(sNewFile)
+End If
+
+On Error Resume Next
+Dim tfolder, tname
+Const TemporaryFolder = 2
+
+Set tfolder = objScript.GetSpecialFolder(TemporaryFolder)
+
+tname = objScript.GetTempName + ".nb"
+Set objDiffNotebook = tfolder.CreateTextFile(tname)
+
+'Output a Mathematica notebook that will do the diff for us
+objDiffNotebook.WriteLine "Notebook[{" + vbCrLf + _
+"Cell[BoxData[ButtonBox[""\<\""Compare Notebooks\""\>""," + vbCrLf + _
+"ButtonFrame->""DialogBox"", Active->True, ButtonEvaluator->Automatic," + vbCrLf + _
+"ButtonFunction:>(Needs[""AuthorTools`""];" + vbCrLf + _
+"NotebookPut[Symbol[""NotebookDiff""][" + vbCrLf + _
+"""" + Replace(sBaseFile, "\", "\\") + """," + vbCrLf + _
+"""" + Replace(sNewFile, "\", "\\") + """" + vbCrLf + _
+"]])]], NotebookDefault]" + vbCrLf + _
+"}, Saveable->False, Editable->False, Selectable->False, WindowToolbars->{}, WindowFrame->ModelessDialog, WindowElements->{}, WindowFrameElements->CloseBox, WindowTitle->""Diff"", ShowCellBracket->False, WindowSize->{Fit,Fit}]"
+
+
+objDiffNotebook.Close
+
+Set objShell = CreateObject("WScript.Shell")
+objShell.Run tfolder + "\" + tname
diff --git a/contrib/windows/diff-scripts/diff-odt.vbs b/contrib/windows/diff-scripts/diff-odt.vbs
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-odt.vbs
@@ -0,0 +1,99 @@
+' extensions: odt;ods
+'
+' TortoiseSVN Diff script for Open Office Text files
+'
+' Copyright (C) 2004-2009, 2012-2014 the TortoiseSVN team
+' This file is distributed under the same license as TortoiseSVN
+'
+' Last commit by:
+' $Author$
+' $Date$
+' $Rev$
+'
+' Authors:
+' Jonathan Ashley, 2007
+' Stefan Küng, 2006, 2009
+'
+dim objArgs, num, sBaseDoc, sNewDoc, objScript
+
+Set objArgs = WScript.Arguments
+num = objArgs.Count
+if num < 2 then
+ MsgBox "Usage: [CScript | WScript] diff-odt.vbs base.odt new.odt", vbExclamation, "Invalid arguments"
+ WScript.Quit 1
+end if
+
+sBaseDoc = objArgs(0)
+sNewDoc = objArgs(1)
+
+Set objScript = CreateObject("Scripting.FileSystemObject")
+If objScript.FileExists(sBaseDoc) = False Then
+ MsgBox "File " + sBaseDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+If objScript.FileExists(sNewDoc) = False Then
+ MsgBox "File " + sNewDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+'remove the file write protection
+objScript.GetFile(sBaseDoc).Attributes = objScript.GetFile(sBaseDoc).Attributes And Not 1
+objScript.GetFile(sNewDoc).Attributes = objScript.GetFile(sNewDoc).Attributes And Not 1
+
+Set objScript = Nothing
+
+On Error Resume Next
+'The service manager is always the starting point
+'If there is no office running then an office is started
+Set objServiceManager = Wscript.CreateObject("com.sun.star.ServiceManager")
+If Err.Number <> 0 Then
+ Wscript.Echo "You must have OpenOffice installed to perform this operation."
+ Wscript.Quit 1
+End If
+
+On Error Goto 0
+
+'Because this is a diff, TortoiseSVN marks the files as read-only.
+'However, OpenOffice will not compare any file with that flag set.
+'Make sure we un-set that flag.
+Set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objFile = objFSO.GetFile(sNewDoc)
+If (objFile.Attributes AND 1) = 1 Then
+ objFile.Attributes = objFile.Attributes XOR 1
+End If
+
+'Create the DesktopSet
+Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+Set objUriTranslator = objServiceManager.createInstance("com.sun.star.uri.ExternalUriReferenceTranslator")
+'Adjust the paths for OO
+sBaseDoc = Replace(sBaseDoc, "\", "/")
+sBaseDoc = Replace(sBaseDoc, ":", "|")
+sBaseDoc = Replace(sBaseDoc, "%", "%25")
+sBaseDoc = Replace(sBaseDoc, " ", "%20")
+sBaseDoc = Replace(sBaseDoc, "#", "%23")
+sBaseDoc = "file:///"&sBaseDoc
+sBaseDoc = objUriTranslator.translateToInternal(sBaseDoc)
+sNewDoc = Replace(sNewDoc, "\", "/")
+sNewDoc = Replace(sNewDoc, ":", "|")
+sNewDoc = Replace(sNewDoc, "%", "%25")
+sNewDoc = Replace(sNewDoc, " ", "%20")
+sNewDoc = Replace(sNewDoc, "#", "%23")
+sNewDoc = "file:///"&sNewDoc
+sNewDoc = objUriTranslator.translateToInternal(sNewDoc)
+
+'Open the %base document
+Dim oPropertyValue(0)
+Set oPropertyValue(0) = objServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+oPropertyValue(0).Name = "ShowTrackedChanges"
+oPropertyValue(0).Value = true
+Set objDocument = objDesktop.loadComponentFromURL(sNewDoc, "_blank", 0, oPropertyValue)
+
+'Set the frame
+Set Frame = objDesktop.getCurrentFrame
+
+Set dispatcher = objServiceManager.CreateInstance("com.sun.star.frame.DispatchHelper")
+
+'Execute the comparison
+dispatcher.executeDispatch Frame, ".uno:ShowTrackedChanges", "", 0, oPropertyValue
+oPropertyValue(0).Name = "URL"
+oPropertyValue(0).Value = sBaseDoc
+dispatcher.executeDispatch Frame, ".uno:CompareDocuments", "", 0, oPropertyValue
diff --git a/contrib/windows/diff-scripts/diff-ppt.js b/contrib/windows/diff-scripts/diff-ppt.js
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-ppt.js
@@ -0,0 +1,99 @@
+// extensions: ppt;pptx;pptm
+//
+// TortoiseSVN Diff script for Powerpoint files
+//
+// Copyright (C) 2004-2009 the TortoiseSVN team
+// This file is distributed under the same license as TortoiseSVN
+//
+// Last commit by:
+// $Author$
+// $Date$
+// $Rev$
+//
+// Authors:
+// Arne Moor, 2006
+//
+
+/*
+This script starts PowerPoint and compares the two given presentations.
+To better see the changes and get the highlighting feature of PowerPoint
+click on "Apply all changes to the presentation" on the reviewing toolbar.
+*/
+
+function PptAppMajorVersion(PowerPoint)
+{
+ var pptVersion;
+ try
+ {
+ pptVersion = PowerPoint.Version.toString();
+ if (pptVersion.indexOf(".") > 0)
+ {
+ pptVersion = pptVersion.substr(0, pptVersion.indexOf("."));
+ }
+ if (pptVersion == "")
+ return 0;
+ else
+ return parseInt(pptVersion);
+ }
+ catch(e)
+ {
+ return 0;
+ }
+}
+
+var objArgs,num,sBasePpt,sNewPpt,objScript,powerpoint,source;
+
+objArgs = WScript.Arguments;
+num = objArgs.length;
+if (num < 2)
+{
+ WScript.Echo("Usage: [CScript | WScript] diff-ppt.js base.ppt new.ppt");
+ WScript.Quit(1);
+}
+
+sBasePpt = objArgs(0);
+sNewPpt = objArgs(1);
+
+objScript = new ActiveXObject("Scripting.FileSystemObject");
+if ( ! objScript.FileExists(sBasePpt))
+{
+ WScript.Echo("File " + sBasePpt + " does not exist. Cannot compare the presentations.");
+ WScript.Quit(1);
+}
+if ( ! objScript.FileExists(sNewPpt))
+{
+ WScript.Echo("File " + sNewPpt +" does not exist. Cannot compare the presentations.");
+ WScript.Quit(1);
+}
+
+objScript = null;
+
+try
+{
+ powerpoint = WScript.CreateObject("Powerpoint.Application");
+}
+catch(e)
+{
+ WScript.Echo("You must have Microsoft Powerpoint installed to perform this operation.");
+ WScript.Quit(1);
+}
+
+if (PptAppMajorVersion(powerpoint) >= 12 && PptAppMajorVersion(powerpoint) < 15)
+{
+ WScript.Echo("Microsoft Powerpoint 2007 doesn't provide the DIFF features any more. Sorry!\r\nYou can try diffing with OpenOffice...");
+ WScript.Quit(1);
+}
+else
+{
+ powerpoint.visible = true;
+
+ // Open the original (base) document
+ source = powerpoint.Presentations.Open(sBasePpt);
+
+ // Merge the new document, to show the changes
+ source.Merge(sNewPpt);
+
+ // Mark the comparison presentation as saved to prevent the annoying
+ // "Save as" dialog from appearing.
+ powerpoint.ActivePresentation.Saved = 1;
+}
diff --git a/contrib/windows/diff-scripts/diff-sxw.vbs b/contrib/windows/diff-scripts/diff-sxw.vbs
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-sxw.vbs
@@ -0,0 +1,70 @@
+'
+' TortoiseSVN Diff script for Open Office Calc files
+'
+' Copyright (C) 2004-2009, 2012-2014 the TortoiseSVN team
+' This file is distributed under the same license as TortoiseSVN
+'
+' Last commit by:
+' $Author$
+' $Date$
+' $Rev$
+'
+' Authors:
+' Jonathan Ashley, 2007
+' Stefan Küng, 2006
+'
+dim objArgs, num, sBaseDoc, sNewDoc, objScript
+
+Set objArgs = WScript.Arguments
+num = objArgs.Count
+if num < 2 then
+ MsgBox "Usage: [CScript | WScript] compare.vbs base.doc new.doc", vbExclamation, "Invalid arguments"
+ WScript.Quit 1
+end if
+
+sBaseDoc = objArgs(0)
+sNewDoc = objArgs(1)
+
+Set objScript = CreateObject("Scripting.FileSystemObject")
+If objScript.FileExists(sBaseDoc) = False Then
+ MsgBox "File " + sBaseDoc +" does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+If objScript.FileExists(sNewDoc) = False Then
+ MsgBox "File " + sNewDoc +" does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+
+Set objScript = Nothing
+
+On Error Resume Next
+'The service manager is always the starting point
+'If there is no office running then an office is started
+Set objServiceManager = Wscript.CreateObject("com.sun.star.ServiceManager")
+If Err.Number <> 0 Then
+ Wscript.Echo "You must have OpenOffice installed to perform this operation."
+ Wscript.Quit 1
+End If
+
+On Error Goto 0
+'Create the DesktopSet
+Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+'Adjust the paths for OO
+sBaseDoc = Replace(sBaseDoc, "\", "/")
+sBaseDoc = Replace(sBaseDoc, ":", "|")
+sBaseDoc = Replace(sBaseDoc, "%", "%25")
+sBaseDoc = Replace(sBaseDoc, " ", "%20")
+sBaseDoc = "file:///"&sBaseDoc
+sNewDoc = Replace(sNewDoc, "\", "/")
+sNewDoc = Replace(sNewDoc, ":", "|")
+sNewDoc = Replace(sNewDoc, "%", "%25")
+sNewDoc = Replace(sNewDoc, " ", "%20")
+sNewDoc = "file:///"&sNewDoc
+
+'Open the %base document
+Dim oPropertyValue(0)
+Set oPropertyValue(0) = objServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+oPropertyValue(0).Name = "ShowTrackedChanges"
+oPropertyValue(0).Value = true
+Set objDocument = objDesktop.loadComponentFromURL(sNewDoc, "_blank", 0, oPropertyValue)
+Set objDocument2 = objDesktop.loadComponentFromURL(sBaseDoc, "_blank", 0, oPropertyValue)
diff --git a/contrib/windows/diff-scripts/diff-xls.js b/contrib/windows/diff-scripts/diff-xls.js
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/diff-xls.js
@@ -0,0 +1,311 @@
+// extensions: xls;xlsx;xlsm;xlsb;xlam
+//
+// TortoiseSVN Diff script for Excel files
+//
+// Copyright (C) 2004-2008, 2012-2015 the TortoiseSVN team
+// This file is distributed under the same license as TortoiseSVN
+//
+// Last commit by:
+// $Author$
+// $Date$
+// $Rev$
+//
+// Authors:
+// Hiroki Najima <h.najima at gmail.com>, 2013
+// Michael Joras <mic...@joras.net>, 2008
+// Suraj Barkale, 2006
+//
+
+// ----- configuration -----
+// Fast mode switch
+// Fast mode does not copy Worksheets but require opened base document at the same time.
+var bFastMode = false;
+
+// ----- constants -----
+var vbCritical = 0x10;
+var vbExclamation = 0x30;
+//var vbInformation = 0x40;
+
+var xlNone = -4142;
+var xlMaximized = -4137;
+var xlArrangeStyleHorizontal = -4128;
+var xlCellValue = 1;
+//var xlExpression = 2;
+//var xlEqual = 3;
+var xlNotEqual = 4;
+
+//var vOffice95 = 7;
+//var vOffice97 = 8;
+//var vOffice2000 = 9;
+//var vOffice2002 = 10;
+var vOffice2003 = 11;
+//var vOffice2007 = 12;
+//var vOffice2010 = 14;
+//var vOffice2013 = 15;
+
+// ----- main -----
+
+var aWarningMessages = [];
+
+var objArgs = WScript.Arguments;
+if (objArgs.length < 2)
+{
+ Abort("Usage: [CScript | WScript] diff-xls.js base.xls new.xls", "Invalid arguments");
+}
+
+var sBaseDoc = objArgs(0);
+var sNewDoc = objArgs(1);
+
+var objScript = new ActiveXObject("Scripting.FileSystemObject");
+
+if (objScript.GetBaseName(sBaseDoc) === objScript.GetBaseName(sNewDoc))
+{
+ Abort("File '" + sBaseDoc + "' and '" + sNewDoc + "' is same file name.\nCannot compare the documents.", "Same file name");
+}
+
+if (!objScript.FileExists(sBaseDoc))
+{
+ Abort("File '" + sBaseDoc + "' does not exist.\nCannot compare the documents.", "File not found");
+}
+
+if (!objScript.FileExists(sNewDoc))
+{
+ Abort("File '" + sNewDoc + "' does not exist.\nCannot compare the documents.", "File not found");
+}
+
+sBaseDoc = objScript.GetAbsolutePathName(sBaseDoc);
+sNewDoc = objScript.GetAbsolutePathName(sNewDoc);
+objScript = null;
+
+var objExcelApp;
+try
+{
+ objExcelApp = WScript.CreateObject("Excel.Application");
+}
+catch (e)
+{
+ Abort("You must have Excel installed to perform this operation.", "Excel Instantiation Failed");
+}
+var fExcelVersion = parseInt(objExcelApp.Version, 10);
+
+// Open base Excel book
+var objBaseWorkbook;
+try
+{
+ objBaseWorkbook = objExcelApp.Workbooks.Open(sBaseDoc, null, true);
+}
+catch (e)
+{
+ Abort("Failed to open '" + sBaseDoc + "'\nIt might not be a valid Excel file.", "File open error");
+}
+
+// Open new Excel book
+var objNewWorkbook;
+try
+{
+ objNewWorkbook = objExcelApp.Workbooks.Open(sNewDoc, null, true);
+}
+catch (e)
+{
+ Abort("Failed to open '" + sNewDoc + "'\nIt might not be a valid Excel file.", "File open error");
+}
+
+// Show Excel window
+objExcelApp.Visible = true;
+
+// Arrange windows
+if (objBaseWorkbook.ProtectWindows || objNewWorkbook.ProtectWindows)
+{
+ StoreWarning("Unable to arrange windows because one or both Workbooks are protected.");
+}
+else
+{
+ // Make windows a compare side by side view
+ if (fExcelVersion >= vOffice2003)
+ {
+ objExcelApp.Windows.CompareSideBySideWith(objExcelApp.Windows(2).Caption);
+ }
+ objExcelApp.Application.WindowState = xlMaximized;
+ objExcelApp.Windows.Arrange(xlArrangeStyleHorizontal);
+}
+
+if (!bFastMode && objNewWorkbook.ProtectWindows)
+{
+ StoreWarning("Fall back to fast mode because " + objNewWorkbook.Name + " is protected.");
+ bFastMode = true;
+}
+
+// Create a special workbook for formula convertion.
+var objSpecialWorkbook = objExcelApp.Workbooks.Add;
+
+// Mark differences in sNewDoc red
+var length = objNewWorkbook.Worksheets.Count;
+for (var i = 1; i <= length; i++)
+{
+ var objBaseWorksheet = objBaseWorkbook.Worksheets(i);
+ var objNewWorksheet = objNewWorkbook.Worksheets(i);
+
+ UnhideWorksheet(objBaseWorksheet);
+ UnhideWorksheet(objNewWorksheet);
+
+ if (!bFastMode)
+ {
+ objBaseWorkbook.Sheets(i).Copy(null, objNewWorkbook.Sheets(objNewWorkbook.Sheets.Count));
+ var objDummyWorksheet = objNewWorkbook.Sheets(objNewWorkbook.Sheets.Count);
+ objDummyWorksheet.Name = "Dummy_for_Comparison" + i;
+ objDummyWorksheet.Visible = true;
+ if (fExcelVersion >= vOffice2003)
+ {
+ objDummyWorksheet.Tab.ColorIndex = 16; // 16:Dark gray RGB(128,128,128)
+ }
+ }
+
+ if (objNewWorksheet.ProtectContents)
+ {
+ StoreWarning("Unable to mark differences to " +
+ ToAbsoluteReference(objNewWorksheet) +
+ " because the Worksheet is protected.");
+ }
+ else
+ {
+ objNewWorksheet.Cells.FormatConditions.Delete();
+ var sFormula;
+ if (bFastMode)
+ {
+ sFormula = "=INDIRECT(\"" + ToAbsoluteReference(objBaseWorksheet) + "!\"&ADDRESS(ROW(),COLUMN()))";
+ }
+ else
+ {
+ sFormula = "=INDIRECT(\"Dummy_for_Comparison" + i + "!\"&ADDRESS(ROW(),COLUMN()))";
+ }
+ sFormula = convertFormula(sFormula);
+ objNewWorksheet.Cells.FormatConditions.Add(xlCellValue, xlNotEqual, sFormula);
+ objNewWorksheet.Cells.FormatConditions(1).Interior.ColorIndex = 3; // 3:Red RGB(128,0,0)
+ }
+}
+
+// Close the special workbook quietly
+objSpecialWorkbook.Saved = true;
+objSpecialWorkbook.Close();
+
+// Activate first Worksheet
+objBaseWorkbook.Sheets(1).Activate();
+objNewWorkbook.Sheets(1).Activate();
+
+// Suppress save dialog if nothing changed
+objBaseWorkbook.Saved = true;
+objNewWorkbook.Saved = true;
+
+// Show warnings if exist
+ShowWarning();
+
+WScript.Quit(0);
+
+
+// ----- functions -----
+
+// Show Message Dialog
+// VBcript's MsgBox emulation
+function MsgBox(sMessage, iButtons, sTitle)
+{
+ var objShell = new ActiveXObject("WScript.Shell");
+ objShell.popup(sMessage, 0, sTitle, iButtons);
+}
+
+// Show an error message and quit script with cleanup Excel Application Object.
+function Abort(sMessage, sTitle)
+{
+ MsgBox(sMessage, vbCritical, sTitle);
+ if (objExcelApp)
+ {
+ objExcelApp.Quit();
+ }
+ WScript.Quit(1);
+}
+
+// Unhide the Worksheet if it is hidden.
+// This also sets color to the tab, if Office2003 or later.
+// - 46(Orange) : Hidden Worksheet
+// - xlNone(default) : Not hidden Worksheet
+function UnhideWorksheet(objWorksheet)
+{
+ if (objWorksheet.Visible)
+ {
+ if (fExcelVersion >= vOffice2003)
+ {
+ if (objWorksheet.Tab.ColorIndex !== xlNone)
+ {
+ if (objWorksheet.Parent.ProtectStructure)
+ {
+ StoreWarning("Unable to set tab color to " +
+ ToAbsoluteReference(objWorksheet) +
+ " because the Workbook's structure is protected.");
+ }
+ else
+ {
+ objWorksheet.Tab.ColorIndex = xlNone;
+ }
+ }
+ }
+ }
+ else if (objWorksheet.Parent.ProtectStructure)
+ {
+ StoreWarning("Unable to unhide " +
+ ToAbsoluteReference(objWorksheet) +
+ " because the Workbook's structure is protected.");
+ }
+ else
+ {
+ objWorksheet.Visible = true;
+ if (fExcelVersion >= vOffice2003)
+ {
+ objWorksheet.Tab.ColorIndex = 10; // 10:Green RGB(0,128,0)
+ }
+ }
+
+}
+
+// Generate Absolute Reference Formula of Worksheet.
+function ToAbsoluteReference(objWorksheet)
+{
+ return "[" + objWorksheet.Parent.Name + "]" + objWorksheet.Name;
+}
+
+// Convert a formula for workaround in some situation.
+// Actually I don't know what will be changed between sFormula and FormulaLocal.
+function convertFormula(sFormula)
+{
+ var worksheet = objSpecialWorkbook.Sheets(1);
+ var originalContent = worksheet.Cells(1, 1).Formula;
+ worksheet.Cells(1, 1).Formula = sFormula;
+ sFormula = worksheet.Cells(1, 1).FormulaLocal;
+ worksheet.Cells(1, 1).Formula = originalContent;
+ return sFormula;
+}
+
+// Accumulate a warning message.
+function StoreWarning(sMessage)
+{
+ aWarningMessages[aWarningMessages.length] = sMessage;
+}
+
+// Show accumulated warning messages if exist.
+// To avoid make huge message dialog, this limits message count to show.
+function ShowWarning()
+{
+ if (aWarningMessages.length === 0)
+ {
+ return;
+ }
+ var sMessage = "The following warnings occurred while processing.\n";
+ for (var j = 0; j < aWarningMessages.length; j++)
+ {
+ if (j >= 10)
+ {
+ sMessage += "... And more " + (aWarningMessages.length - j) + " messages";
+ break;
+ }
+ sMessage += "[" + (j + 1) + "] " + aWarningMessages[j] + "\n";
+ }
+ MsgBox(sMessage, vbExclamation, "Warning");
+}
diff --git a/contrib/windows/diff-scripts/merge-doc.js b/contrib/windows/diff-scripts/merge-doc.js
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/merge-doc.js
@@ -0,0 +1,130 @@
+// extensions: doc;docx;docm
+//
+// TortoiseSVN Merge script for Word Doc files
+//
+// Copyright (C) 2004-2008, 2011-2015 the TortoiseSVN team
+// This file is distributed under the same license as TortoiseSVN
+//
+// Last commit by:
+// $Author$
+// $Date$
+// $Rev$
+//
+// Authors:
+// Dan Sheridan, 2008
+// Davide Orlandi and Hans-Emil Skogh, 2005
+// Richard Horton, 2011
+//
+
+var objArgs, num, sTheirDoc, sMyDoc, sBaseDoc, sMergedDoc,
+ objScript, word, baseDoc, myDoc, WSHShell;
+
+// ----- constants -----
+//var vbCritical = 0x10;
+var vbExclamation = 0x30;
+//var vbInformation = 0x40;
+
+// Microsoft Office versions for Microsoft Windows OS
+var vOffice2000 = 9;
+var vOffice2002 = 10;
+//var vOffice2003 = 11;
+var vOffice2007 = 12;
+var vOffice2010 = 14;
+// WdCompareTarget
+var wdCompareTargetSelected = 0;
+//var wdCompareTargetCurrent = 1;
+var wdCompareTargetNew = 2;
+var wdMergeTargetCurrent = 1;
+
+objArgs = WScript.Arguments;
+num = objArgs.length;
+if (num < 4)
+{
+ WScript.Echo("Usage: [CScript | WScript] merge-doc.js merged.doc theirs.doc mine.doc base.doc");
+ WScript.Quit(1);
+}
+
+sMergedDoc = objArgs(0);
+sTheirDoc = objArgs(1);
+sMyDoc = objArgs(2);
+sBaseDoc = objArgs(3);
+
+objScript = new ActiveXObject("Scripting.FileSystemObject");
+
+if (!objScript.FileExists(sTheirDoc))
+{
+ WScript.Echo("File " + sTheirDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found");
+ WScript.Quit(1);
+}
+
+if (!objScript.FileExists(sMergedDoc))
+{
+ WScript.Echo("File " + sMergedDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found");
+ WScript.Quit(1);
+}
+
+objScript = null;
+
+try
+{
+ word = WScript.CreateObject("Word.Application");
+}
+catch (e)
+{
+ WScript.Echo("You must have Microsoft Word installed to perform this operation.");
+ WScript.Quit(1);
+}
+
+word.visible = true;
+
+// Open the base document
+baseDoc = word.Documents.Open(sTheirDoc);
+
+// Merge into the "My" document
+if (parseInt(word.Version, 10) < vOffice2000)
+{
+ baseDoc.Compare(sMergedDoc);
+}
+else if (parseInt(word.Version, 10) < vOffice2007)
+{
+ baseDoc.Compare(sMergedDoc, "Comparison", wdCompareTargetNew, true, true);
+}
+else if (parseInt(word.Version, 10) < vOffice2010)
+{
+ baseDoc.Merge(sMergedDoc);
+}
+else
+{
+ //2010 - handle slightly differently as the basic merge isn't that good
+ //note this is designed specifically for svn 3 way merges, during the commit conflict resolution process
+ baseDoc = word.Documents.Open(sBaseDoc);
+ myDoc = word.Documents.Open(sMyDoc);
+
+ baseDoc.Activate(); // required otherwise it compares the wrong docs !!!
+ baseDoc.Compare(sTheirDoc, "theirs", wdCompareTargetSelected, true, true);
+
+ baseDoc.Activate(); // required otherwise it compares the wrong docs !!!
+ baseDoc.Compare(sMyDoc, "mine", wdCompareTargetSelected, true, true);
+
+ myDoc.Activate(); // required? just in case
+ myDoc.Merge(sTheirDoc, wdMergeTargetCurrent);
+}
+
+// Show the merge result
+if (parseInt(word.Version, 10) < vOffice2007)
+{
+ word.ActiveDocument.Windows(1).Visible = 1;
+}
+
+// Close the first document
+if (parseInt(word.Version, 10) >= vOffice2002 && parseInt(word.Version, 10) < vOffice2010)
+{
+ baseDoc.Close();
+}
+
+// Show usage hint message
+WSHShell = WScript.CreateObject("WScript.Shell");
+if (WSHShell.Popup("You have to accept or reject the changes before\nsaving the document to prevent future problems.\n\nWould you like to see a help page on how to do this?", 0, "TSVN Word Merge", 4 + 64) === 6)
+{
+ WSHShell.Run("http://office.microsoft.com/en-us/assistance/HP030823691033.aspx");
+}
diff --git a/contrib/windows/diff-scripts/merge-ods.vbs b/contrib/windows/diff-scripts/merge-ods.vbs
new file mode 100644
--- /dev/null
+++ b/contrib/windows/diff-scripts/merge-ods.vbs
@@ -0,0 +1,88 @@
+' extensions: ods;odt;sxw
+'
+' TortoiseSVN Merge script for Open Office Calc files
+'
+' Copyright (C) 2004-2009, 2012-2014 the TortoiseSVN team
+' This file is distributed under the same license as TortoiseSVN
+'
+' Last commit by:
+' $Author$
+' $Date$
+' $Rev$
+'
+' Authors:
+' Jonathan Ashley, 2007
+' Stefan Küng, 2006, 2009
+'
+dim objArgs, num, sBaseDoc, sMergedDoc, sTheirDoc, sMyDoc, objScript
+
+Set objArgs = WScript.Arguments
+num = objArgs.Count
+if num < 4 then
+ MsgBox "Usage: [CScript | WScript] merge-ods.vbs %merged %theirs %mine %base", vbExclamation, "Invalid arguments"
+ WScript.Quit 1
+end if
+
+sMergedDoc = objArgs(0)
+sTheirDoc = objArgs(1)
+sMyDoc = objArgs(2)
+sBaseDoc = objArgs(3)
+
+Set objScript = CreateObject("Scripting.FileSystemObject")
+If objScript.FileExists(sMyDoc) = False Then
+ MsgBox "File " + sMyDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+If objScript.FileExists(sTheirDoc) = False Then
+ MsgBox "File " + sTheirDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"
+ Wscript.Quit 1
+End If
+'remove the file write protection
+objScript.GetFile(sMyDoc).Attributes = objScript.GetFile(sMyDoc).Attributes And Not 1
+objScript.GetFile(sTheirDoc).Attributes = objScript.GetFile(sTheirDoc).Attributes And Not 1
+
+Set objScript = Nothing
+
+On Error Resume Next
+'The service manager is always the starting point
+'If there is no office running then an office is started
+Set objServiceManager = Wscript.CreateObject("com.sun.star.ServiceManager")
+If Err.Number <> 0 Then
+ Wscript.Echo "You must have OpenOffice installed to perform this operation."
+ Wscript.Quit 1
+End If
+
+On Error Goto 0
+'Create the DesktopSet
+Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
+'Adjust the paths for OO
+sMyDoc = Replace(sMyDoc, "\", "/")
+sMyDoc = Replace(sMyDoc, ":", "|")
+sMyDoc = Replace(sMyDoc, "%", "%25")
+sMyDoc = Replace(sMyDoc, " ", "%20")
+sMyDoc = Replace(sMyDoc, "#", "%23")
+sMyDoc = "file:///"&sMyDoc
+sTheirDoc = Replace(sTheirDoc, "\", "/")
+sTheirDoc = Replace(sTheirDoc, ":", "|")
+sTheirDoc = Replace(sTheirDoc, "%", "%25")
+sTheirDoc = Replace(sTheirDoc, " ", "%20")
+sTheirDoc = Replace(sTheirDoc, "#", "%23")
+sTheirDoc = "file:///"&sTheirDoc
+
+'Open the %mine document
+Dim oPropertyValue(0)
+Set oPropertyValue(0) = objServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
+oPropertyValue(0).Name = "ShowTrackedChanges"
+oPropertyValue(0).Value = true
+Set objDocument = objDesktop.loadComponentFromURL(sMyDoc, "_blank", 0, oPropertyValue)
+
+'Set the frame
+Set Frame = objDesktop.getCurrentFrame
+
+Set dispatcher = objServiceManager.CreateInstance("com.sun.star.frame.DispatchHelper")
+
+'Execute the comparison
+Dispatcher.executeDispatch Frame, ".uno:ShowTrackedChanges", "", 0, oPropertyValue
+oPropertyValue(0).Name = "URL"
+oPropertyValue(0).Value = sTheirDoc
+Dispatcher.executeDispatch Frame, ".uno:CompareDocuments", "", 0, oPropertyValue
diff --git a/win32/wix/diff-scripts.guids.wxi b/win32/wix/diff-scripts.guids.wxi
new file mode 100644
--- /dev/null
+++ b/win32/wix/diff-scripts.guids.wxi
@@ -0,0 +1,10 @@
+<Include>
+
+ <!-- These are component GUIDs used for TortoiseHg installers.
+ YOU MUST CHANGE ALL GUIDs below when copying this file
+ and replace 'TortoiseHg' in this notice with the name of
+ your project. Component GUIDs have global namespace! -->
+
+ <?define diffscripts.guid = {27107363-29E3-4F13-9A8C-5B7B0C757BF3} ?>
+
+</Include>
diff --git a/win32/wix/diff-scripts.wxs b/win32/wix/diff-scripts.wxs
new file mode 100644
--- /dev/null
+++ b/win32/wix/diff-scripts.wxs
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+
+ <?include diff-scripts.guids.wxi ?>
+
+ <?if $(var.Platform) = "x64" ?>
+ <?define IsX64 = yes ?>
+ <?else?>
+ <?define IsX64 = no ?>
+ <?endif?>
+
+ <Fragment>
+ <ComponentGroup Id='DiffScripts'>
+ <ComponentRef Id='diffscripts' />
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="INSTALLDIR">
+ <Directory Id='DiffScriptsDir' Name='diff-scripts' FileSource='$(var.SourceDir)'>
+ <Component Id='diffscripts' Guid='$(var.diffscripts.guid)' Win64='$(var.IsX64)'>
+ <File Id='diffscripts.diffdoc.js' Name='diff-doc.js' KeyPath='yes' />
+ <File Id='diffscripts.diffnb.vbs' Name='diff-nb.vbs' />
+ <File Id='diffscripts.diffodt.vbs' Name='diff-odt.vbs' />
+ <File Id='diffscripts.diffppt.js' Name='diff-ppt.js' />
+ <File Id='diffscripts.diffsxw.vbs' Name='diff-sxw.vbs' />
+ <File Id='diffscripts.diffxls.js' Name='diff-xls.js' />
+ <File Id='diffscripts.diffdll.vbs' Name='diff-dll.vbs' />
+ <File Id='diffscripts.mergedoc.js' Name='merge-doc.js' />
+ <File Id='diffscripts.mergeods.vbs' Name='merge-ods.vbs' />
+ <File Id='diffscripts.Readme.txt' Name='Readme.txt' />
+ <File Id='diffscripts.SOURCE.txt' Name='SOURCE.txt' />
+ </Component>
+ </Directory>
+ </DirectoryRef>
+ </Fragment>
+
+</Wix>