Difference between revisions of "TortoiseSVN"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(integrate the exit code in the <install> and <upgrade> is better)
(Version update plus Win2k and Uninstall fixes.)
Line 7: Line 7:
 
<source lang="xml">
 
<source lang="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
 
 
<packages>
 
<packages>
<package  
+
<package
id="tortoisesvn"  
+
        id="tortoisesvn"
name="TortoiseSVN 1.5.7"  
+
        name="TortoiseSVN"
revision="157"  
+
        revision="1"
priority="60"  
+
        priority="10"
reboot="false">
+
        reboot="true">
         <!-- <check type="uninstall" condition="exists" path="TortoiseSVN 1.5.7.15182 (32 bit)" /> -->
+
         <!-- <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.5.7.15182" />
+
         <check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\TortoiseSVN\bin\TortoiseProc.exe"  
         <install cmd='msiexec /i "%SOFTWARE%\tortoisesvn\TortoiseSVN-1.5.7.15182-win32-svn-1.5.5.msi" /qn /norestart'>
+
          value="1.6.3.16613" />
            <exit code="0" />
+
         <install cmd='msiexec /qn /i "%SOFTWARE%\version_control\TortoiseSVN-1.6.3.16613-win32-svn-1.6.3.msi" /norestart' >
            <exit code="3010" reboot="false" />
+
          <exit code="0" reboot="false" />
 +
          <exit code="3010" reboot="false" />
 
         </install>
 
         </install>
         <upgrade cmd='msiexec /i "%SOFTWARE%\tortoisesvn\TortoiseSVN-1.5.7.15182-win32-svn-1.5.5.msi" /qn /norestart'>
+
         <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="0" />
            <exit code="3010" reboot="false" />
+
          <exit code="3010" reboot="false" />
 
         </upgrade>
 
         </upgrade>
<!-- <remove cmd='MsiExec.exe /Q /x {E0B2264B-6BE4-4F8B-8300-A05BFA87AAA0}' /> -->
+
      <remove cmd='MsiExec.exe /qn /x "{3BC1954F-F5C9-4ED2-BB2A-BAEEF4DAC74D}"' >
 +
          <exit code="0" />
 +
          <exit code="1641" reboot="false" />
 +
        </remove>
 
</package>
 
</package>
 
</packages>
 
</packages>
 
</source>
 
</source>
  
* The "versiongreterorequal" check gives the right to users to perform upgrade theirselves before the upgrade is validated in wpkg. This is usefull in environments where users have some administration rights.
+
* 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.
 
* 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.
 +
<source lang="XML">
 +
    <install cmd='%COMSPEC% /C copy /Y "%SOFTWARE%\version_control\gdiplus.dll" "%WINDIR%\System32\"' />
 +
</source>
 +
 +
== 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.
 +
<source lang="XML">
 +
<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>
 +
</source>
 +
 +
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.
 +
 +
<source lang="dos">
 +
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
 +
</source>
 +
 +
Alternatively, delete the tortoiseSVN "remove" Action and only uninstall manually, performing a manual repair of the WPKG Client immediately after.
  
 
[[category:Silent Installers|TortoiseSVN]]
 
[[category:Silent Installers|TortoiseSVN]]

Revision as of 03:53, 20 July 2009

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.