Difference between revisions of "Ruby"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m
m
 
Line 51: Line 51:
 
)
 
)
 
</source>
 
</source>
 +
 +
[[Category: Silent Installers]]

Latest revision as of 04:36, 27 March 2013

Ruby installer can be downloaded from: http://rubyinstaller.org/downloads/

Ruby 1.9.3

The ruby installer seems to use an unusual registry location for the Uninstall entries, so we cannot use the uninstall check condition here, see comment.


There's documentation about the silent install options here: [1]

  <package id="ruby"
	name="Ruby"  
	revision="%PKG_VERSION%"
	reboot="false"
	priority="8">

	<check type="logical" condition="or">
		<check type="registry" condition="equals" path="HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\{17E73B15-62D2-43FD-B851-ACF86A8C9D25}_is1\DisplayName" value="%PKG_VERSION%" />
		<check type="file" condition="versiongreaterthan" path="%PKG_DESTINATION%\bin\ruby.exe" value="1.9.3.194" />
	</check>
<!--
	<check type="uninstall" condition="versiongreaterorequal" path="Ruby.+" value="%PKG_VERSION%" />
 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{17E73B15-62D2-43FD-B851-ACF86A8C9D25}_is1\DisplayName="Ruby 1.9.3-p194"]
 -->

	<variable name="PKG_VERSION" value="1.9.3-p194" />
	<variable name="PKG_EXEVERSION" value="1.9.3-p194" />
        <variable name="PKG_SOURCE"           value="%SOFTWARE%\packages\Ruby" />
        <variable name="%PKG_DESTINATION%"           value="C:\Ruby193" />


	<install include='remove' />
	<install cmd='%PKG_SOURCE%\rubyinstaller-%PKG_EXEVERSION%.exe /verysilent  /lang=de /tasks="addtk,assocfiles,modpath"' />
 
	<upgrade include='install' />
 
	<remove cmd='%comspec% /c %PKG_SOURCE%\uninstruby.cmd ' > <exit code="any" /> </remove>

  </package>

To uninstall old versions of ruby, the following script can be used:

@echo off
FOR /D %%f IN (C:\Ruby*) DO (
echo %%f
  for /L %%n IN (0, 1, 3) DO (
    if exist "%%f\unins00%%n.exe" echo "%%f\unins00%%n.exe"
    "%%f\unins00%%n.exe" /silent /norestart 
  ) 
)