TortoiseSVN

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Silent install for TortoiseSVN.
Tortoise SVN Project Homepage
Tortoise SVN Project Homepage at tigris

Combined 32-bit and 64-bit package[edit]

!!! This package requires wpkg.js 1.2.1-RC20 or higher !!!

<?xml version="1.0" encoding="UTF-8"?>

<packages
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../xsd/packages.xsd" >

    <package id="TortoiseSVN"
            name="Tortoise SVN Client"
            revision="%PKG_VERSION%"
            reboot="false"
            priority="10">

        <variable name="PKG_VERSION"        value="1.6.21511" />
        <variable name="PKG_EXE_VERSION"    value="1.6.16.21511" />
        <variable name="PKG_NAME"           value="TortoiseSVN" />
        <variable name="PKG_SOURCE"         value="%SOFTWARE%\TortoiseSVN\TortoiseSVN-1.6.16.21511-win32-svn-1.6.17.msi" architecture="x86"/>
        <variable name="PKG_SOURCE"         value="%SOFTWARE%\TortoiseSVN\TortoiseSVN-1.6.16.21511-x64-svn-1.6.17.msi"   architecture="x64"/>
        <variable name="PKG_DESTINATION"    value="%ProgramFiles%\TortoiseSVN"/>
        <variable name="PKG_INSTALL_SWITCH" value="ALLUSERS=1"/>

        <check type="uninstall" condition="versiongreaterorequal" path="TortoiseSVN %PKG_EXE_VERSION%.*"        value="%PKG_VERSION%" />
        <check type="file"      condition="versiongreaterorequal" path="%PKG_DESTINATION%\bin\TortoiseProc.exe" value="%PKG_EXE_VERSION%" />

        <install cmd='MsiExec.exe /passive /norestart /log "%TMP%\%PKG_NAME%.log" /i "%PKG_SOURCE%" %PKG_INSTALL_SWITCH%' >
            <exit code="3010" reboot="false"/>
        </install>

        <upgrade include="install" />

        <remove cmd='MsiExec.exe /passive /norestart /log "%TMP%\%PKG_NAME%.log" /x "%PKG_SOURCE%"' >
            <exit code="3010" reboot="false"/>
        </remove>
    </package>
</packages>

Separate 32-bit and 64-bit packages[edit]

<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
        id="tortoisesvn"
        name="TortoiseSVN"
        revision="166"
        priority="10"
        reboot="true">
        <!-- <check type="uninstall" condition="exists" path="TortoiseSVN 1.6.6.17493 (32 bit)" /> -->
        <!-- install 32bit tortoiseSVN only on 32bit OS -->
	<check type="logical" condition="or">
		<check type="registry" condition="equals" path="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE" value="AMD64" />
		<check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\TortoiseSVN\bin\TortoiseProc.exe" value="1.6.6.17493"/>
	</check>
        <install cmd='msiexec /qn /i "%SOFTWARE%\version_control\TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi" /norestart' >
          <exit code="0" reboot="false" />
          <exit code="3010" reboot="false" />
        </install>
        <upgrade cmd='msiexec /qn /i "%SOFTWARE%\version_control\TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi" /norestart' >
           <exit code="0" />
           <exit code="3010" reboot="false" />
        </upgrade>
       <remove cmd='MsiExec.exe /qn /x "{3BC1954F-F5C9-4ED2-BB2A-BAEEF4DAC74D}"' >
          <exit code="0" />
          <exit code="1641" reboot="false" />
        </remove>
</package>

<package
	id="tortoisesvn-64"
	name="TortoiseSVN 1.6.6"
	revision="167"
	priority="60"
	reboot="false">

	<!-- install 64bit tortoiseSVN only on 64bit OS -->
	<check type="logical" condition="or">
	    <check type="registry" condition="equals" path="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE" value="x86" />
    	    <check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\TortoiseSVN\bin\TortoiseProc.exe" value="1.6.6.17493"/>
	</check>
    <install cmd='msiexec /i "%SOFTWARE%\tortoisesvn\TortoiseSVN-1.6.6.17493-x64-svn-1.6.6.msi" /qn /norestart'>
        <exit code="0" />
        <exit code="3010" reboot="false" />
    </install>
    <upgrade cmd='msiexec /i "%SOFTWARE%\tortoisesvn\TortoiseSVN-1.6.6.17493-x64-svn-1.6.6.msi" /qn /norestart'>
        <exit code="0" />
        <exit code="3010" reboot="false" />
    </upgrade>
    <!-- remove command to be checked -->
    <remove cmd='MsiExec.exe /Q /x {E0B2264B-6BE4-4F8B-8300-A05BFA87AAA0}' />
</package>

</packages>
  • The "versiongreaterorequal" check gives the right to users to perform upgrade themselves before the upgrade is validated in wpkg. This is useful in environments where users have some administration rights.
  • The exit code 3010 command avoid a reboot after installation. Without it installation is not finished for WPKG, and TortoiseSVN will be reinstalled again and again.
  • 32 vs 64 bit : two packages. TortoiseSVN integrates in the explorer. On 32bit OS you need the 32bit application, on 64bit OS you need the 64bit application, or the explorer integration doesn't work. The checks in the packages ensure that the 32bit package is installed only on 32bit hosts, and the 64bit package is installed only on 64bit hosts,

Avoiding reboot with TortoiseSVN 1.6.4[edit]

The method above doesn't seem to prevent a reboot in 1.6.4.

We found that you need to use orca to create a transform for the msi in which you delete the entry ScheduleReboot under InstallExecuteSequence in the msi.

Windows 2000 Install[edit]

Recent versions of TortoiseSVN will not install on Windows 2000 unless the file gdiplus.dll exists in your system32 directory. Gdiplus can be downloaded from Microsoft. For Win2k add the following as the first install item.

     <install cmd='%COMSPEC% /C copy /Y "%SOFTWARE%\version_control\gdiplus.dll" "%WINDIR%\System32\"' />

Windows 2000 Uninstall[edit]

TortoiseSVN uninstall removes the file mfc90.dll from the Windows System directory. This will break your WPKG Client installation. This has been observed with WPKG Client version 1.3.6 on Windows 2000, but does not appear to affect XP installations.

Here is one possible workaround: Firstly, modify the wpkg client Checks, adding a check for mfc90.dll OR Windows XP.

<check type="logical" condition="and">
  <check type="uninstall" condition="exists" path="WPKG" />
  <check type="file" condition="versionequalto" path="%PROGRAMFILES%\wpkg\wpkgsrv.exe" value="1.0.0.11" />
  <check type="logical" condition="or">
    <check type="file" condition="exists" path="%WINDIR%\system32\mfc90.dll" />
    <check type="registry" condition="equals" path="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName"
      value="Microsoft Windows XP"/>
  </check>
</check>

This is ok, as far as it goes, but since the WPKG Client is broken, it will be unable to repair itself. So, the next step is an Active Directory Group Policy script.

set SOFTWARE=\\path\to\software
set WPKGROOT=\\your\wpkg\root

IF EXIST "%programfiles%\wpkg\WPKGSrv.exe" GOTO CHECKMFC
cscript "%WPKGROOT%\wpkg.js" /synchronize /quiet /nonotify
GOTO END
:CHECKMFC
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto END
IF EXIST "%WINDIR%\system32\mfc90.dll" GOTO END
cscript "%WPKGROOT%\wpkg.js" /synchronize /quiet /nonotify
:END

Alternatively, delete the tortoiseSVN "remove" Action and only uninstall manually, performing a manual repair of the WPKG Client immediately after.