Difference between revisions of "WinMerge"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(WinMerge)
(WinMerge: Tidied up, but surely there's a simpler way to install 32-bit / 64-bit.)
 
Line 1: Line 1:
 
= WinMerge =
 
= WinMerge =
  
Silent install for WinMerge.
+
This is a silent installer for WinMerge, an Open Source visual text file differencing and merging tool. See [http://winmerge.org/ http://winmerge.org/].
  
WinMerge is an Open Source visual text file differencing and merging tool for Win32 platforms. See [http://winmerge.org/ WinMerge Homepage].
+
==WPKG Packages==
  
I am using the following unattended configuration:
 
  
 +
===32-bit or 64-bit===
 
<source lang="xml">
 
<source lang="xml">
<?xml version="1.0" encoding="utf-8" ?>
 
<packages>
 
  
 
<package  
 
<package  
Line 18: Line 16:
 
     reboot='false' >
 
     reboot='false' >
 
   <check type='uninstall' condition='exists' path='WinMerge 2.10.4.0' />
 
   <check type='uninstall' condition='exists' path='WinMerge 2.10.4.0' />
   <install cmd='"%SOFTWARE%\WinMerge v.2.10.4\unattended.cmd"' />
+
   <install cmd='"%SOFTWARE%\WinMerge\unattended.cmd"' />
   <remove cmd='"%SOFTWARE%\WinMerge v.2.10.4\unattended-uninstall.cmd"' />
+
   <remove cmd='"%SOFTWARE%\WinMerge\unattended-uninstall.cmd"' />
   <upgrade cmd='"%SOFTWARE%\WinMerge v.2.10.4\unattended.cmd"' />
+
   <upgrade cmd='"%SOFTWARE%\WinMerge\unattended.cmd"' />
 
</package>
 
</package>
  
</packages>
 
 
</source>
 
</source>
  
As you can see I am using a command-script to install WinMerge. Here is the code of the two scripts:
+
This uses a command-script to install WinMerge. Here is the code of the two scripts:
  
<code>unattended.cmd</code>:
+
====unattended.cmd====
 
<source lang="dos">
 
<source lang="dos">
 
@echo off
 
@echo off
Line 40: Line 37:
 
</source>
 
</source>
  
<code>unattended-uninstall.cmd</code>:
+
====unattended-uninstall.cmd====
 
<source lang="dos">
 
<source lang="dos">
 
@echo off
 
@echo off
Line 52: Line 49:
 
</source>
 
</source>
  
As you can see I am using the <code>unattended-uninstall.cmd</code> script to support the %ProgramFiles(x86)% location on Windows x64 editions.
+
This uses the <code>unattended-uninstall.cmd</code> script to support the %ProgramFiles(x86)% location on Windows x64 editions.
 +
 
 +
 
 +
===Just 32-bit===
  
 
If you do not need to support x64 editions you might simply include the command lines within the XML file:
 
If you do not need to support x64 editions you might simply include the command lines within the XML file:
  
 
<source lang="xml">
 
<source lang="xml">
<?xml version="1.0" encoding="utf-8" ?>
 
<packages>
 
  
 
<package  
 
<package  
Line 72: Line 70:
 
</package>
 
</package>
  
</packages>
 
 
</source>
 
</source>
 +
 +
 +
===Just 64-bit===
  
 
Or with X64 support, and no cmd files:
 
Or with X64 support, and no cmd files:

Latest revision as of 17:21, 7 October 2011

WinMerge

This is a silent installer for WinMerge, an Open Source visual text file differencing and merging tool. See http://winmerge.org/.

WPKG Packages

32-bit or 64-bit

<package 
    id='WinMerge' 
    name='WinMerge' 
    revision='21040' 
    priority='50' 
    reboot='false' >
  <check type='uninstall' condition='exists' path='WinMerge 2.10.4.0' />
  <install cmd='"%SOFTWARE%\WinMerge\unattended.cmd"' />
  <remove cmd='"%SOFTWARE%\WinMerge\unattended-uninstall.cmd"' />
  <upgrade cmd='"%SOFTWARE%\WinMerge\unattended.cmd"' />
</package>

This uses a command-script to install WinMerge. Here is the code of the two scripts:

unattended.cmd

@echo off

echo Installing WinMerge

set BINARY=WinMerge-2.10.4-Setup.exe
set INSTALL_LOC=%~dp0

start /wait "WinMerge" "%INSTALL_LOC%%BINARY%" /VERYSILENT /SP- /NORESTART

unattended-uninstall.cmd

@echo off

echo Removing WinMerge

set PROG_FILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROG_FILES=%ProgramFiles(x86)%

start /wait "WinMerge" "%PROG_FILES%\WinMerge\unins000.exe" /VERYSILENT /SP- /NORESTART

This uses the unattended-uninstall.cmd script to support the %ProgramFiles(x86)% location on Windows x64 editions.


Just 32-bit

If you do not need to support x64 editions you might simply include the command lines within the XML file:

<package 
    id='WinMerge' 
    name='WinMerge' 
    revision='21040' 
    priority='50' 
    reboot='false' >
  <check type='uninstall' condition='exists' path='WinMerge 2.10.4.0' />
  <install cmd='"%SOFTWARE%\WinMerge\WinMerge-2.10.4-Setup.exe" /VERYSILENT /SP- /NORESTART' />
  <remove cmd='"%ProgramFiles%\WinMerge\unins000.exe" /VERYSILENT /SP- /NORESTART' />
  <upgrade cmd='"%SOFTWARE%\WinMerge\WinMerge-2.10.4-Setup.exe" /VERYSILENT /SP- /NORESTART"' />
</package>


Just 64-bit

Or with X64 support, and no cmd files:

<package
	id="winmerge"
	name="WinMerge"
	revision="2"
	reboot="false"
	priority="1">
	<variable name="version" value="2.12.4" />
	<variable name="packagedir" value="%SOFTWARE%\Standard\WinMerge" />
	<check type="uninstall" condition="exists" path="WinMerge %version%" />

	<install cmd='%packagedir%\WinMerge-%version%-Setup.exe /VERYSILENT /SP- /NORESTART' />
	<upgrade cmd='%packagedir%\WinMerge-%version%-Setup.exe /VERYSILENT /SP- /NORESTART' />
	
	<remove  cmd='"%ProgramFiles%\WinMerge\unins000.exe" /VERYSILENT /SP- /NORESTART' architecture="x86" />
	<remove  cmd='"%ProgramFiles(x86)%\WinMerge\unins000.exe" /VERYSILENT /SP- /NORESTART' architecture="x64" />
</package>