Differences
This shows you the differences between two versions of the page.
— |
userspace:r-studio [2014/02/27 15:19] (current) adlerweb created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== R-Studio ====== | ||
+ | Tested with opsi 4.0.3\\ | ||
+ | requiredWinstVersion >= 4.10.8.6\\ | ||
+ | Tested with R-Studio 0.98.501\\ | ||
+ | By --- //[[florian.knodt@finzelberg.de|adlerweb]] 2014/02/27 14:43// | ||
+ | |||
+ | Files can be downloaded at https://www.rstudio.com/ide/download/desktop | ||
+ | |||
+ | Requires [[R]] to be installed | ||
+ | |||
+ | Tree:\\ | ||
+ | setup.ins\\ | ||
+ | uninstall.ins\\ | ||
+ | delsub.ins\\ | ||
+ | |||
+ | === setup.ins === | ||
+ | <code winst> | ||
+ | [Actions] | ||
+ | requiredWinstVersion >= "4.10.8.6" | ||
+ | |||
+ | DefVar $ProductId$ | ||
+ | DefVar $MinimumSpace$ | ||
+ | DefVar $UninstallProgram$ | ||
+ | |||
+ | Set $ProductId$ = "r-studio" | ||
+ | Set $MinimumSpace$ = "250 MB" | ||
+ | |||
+ | |||
+ | ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ | ||
+ | |||
+ | if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) | ||
+ | LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ | ||
+ | isFatalError | ||
+ | ; Stop process and set installation status to failed | ||
+ | else | ||
+ | if FileExists("%ScriptPath%\delsub.ins") | ||
+ | comment "start uninstall" | ||
+ | sub "%ScriptPath%\delsub.ins" | ||
+ | endif | ||
+ | |||
+ | comment "installing" | ||
+ | |||
+ | comment "Start setup program" | ||
+ | Winbatch_install | ||
+ | |||
+ | endif | ||
+ | |||
+ | [Winbatch_install] | ||
+ | "%ScriptPath%\RStudio-0.98.501.exe" /S | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ===uninstall.ins=== | ||
+ | <code winst> | ||
+ | [Actions] | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $UninstallProgram$ | ||
+ | |||
+ | Set $ProductId$ = "r-studio" | ||
+ | |||
+ | ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ | ||
+ | |||
+ | if FileExists("%ScriptPath%\delsub.ins") | ||
+ | comment "start uninstall" | ||
+ | sub "%ScriptPath%\delsub.ins" | ||
+ | endif | ||
+ | </code> | ||
+ | |||
+ | ===delsub.ins=== | ||
+ | <code winst> | ||
+ | Set $UninstallProgram$ = "%ProgramFilesSysnativeDir%\RStudio\Uninstall.exe" | ||
+ | if FileExists($UninstallProgram$) | ||
+ | Message "Found "+$ProductId$+" => uninstalling first" | ||
+ | Winbatch_uninstall | ||
+ | endif | ||
+ | |||
+ | [Winbatch_uninstall] | ||
+ | "$UninstallProgram$" /S | ||
+ | </code> | ||
+ | |||