TortoiseSVN

From WPKG | Open Source Software Deployment and Distribution
Revision as of 03:53, 20 July 2009 by Nebyah (Talk | contribs) (Version update plus Win2k and Uninstall fixes.)

Jump to: navigation, search

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

TortoiseSVN

<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
        id="tortoisesvn"
        name="TortoiseSVN"
        revision="1"
        priority="10"
        reboot="true">
        <!-- <check type="uninstall" condition="exists" path="TortoiseSVN 1.6.3.16613 (32 bit)" /> -->
        <check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\TortoiseSVN\bin\TortoiseProc.exe"   
          value="1.6.3.16613" />
        <install cmd='msiexec /qn /i "%SOFTWARE%\version_control\TortoiseSVN-1.6.3.16613-win32-svn-1.6.3.msi" /norestart' >
          <exit code="0" reboot="false" />
          <exit code="3010" reboot="false" />
        </install>
        <upgrade cmd='msiexec /qn /i "%SOFTWARE%\version_control\TortoiseSVN-1.6.3.16613-win32-svn-1.6.3.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>
</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.

Windows 2000

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\"' />

Uninstall

TortoiseSVN uninstall removes the file mfc90.dll from the Windows System directory. This will break your WPKG Client installation.

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

<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="file" condition="exists" path="%WINDIR%\system32\mfc90.dll" />
</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
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.